Documentation
¶
Index ¶
- Constants
- type Event
- func (e Event) DurationAsStr(later Event) string
- func (e Event) DurationSinceStartAsStr() string
- func (e Event) IsSame(other Event) bool
- func (e Event) IsSameGroup(other Event) bool
- func (e Event) IsWorthKeeping() bool
- func (e Event) Time() time.Time
- func (e Event) TimeAsHoursStr() string
- func (e Event) TimeAsStr() string
- type EventData
- type EventError
- type Reporter
- type ReporterImpl
- type Task
Constants ¶
View Source
const (
EventTypeDeprecation = "deprecation"
EventStateStarted = "started"
EventStateFinished = "finished"
EventStateFailed = "failed"
EventStateInProgress = "in_progress"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
UnixTime int64 `json:"time"` // e.g 1451020321
Type string // e.g. "deprecation"
Message string
State string // e.g. "started"
Stage string // e.g. "Preparing deployment"
Task string // e.g. "Binding deployment"
Tags []string // e.g. ["api"]
Total int // e.g. 0
Index int // e.g. 0
Progress int // e.g. 0
Data EventData
Error *EventError
StartEvent *Event
}
func (Event) DurationAsStr ¶
func (e Event) DurationAsStr(later Event) string
func (Event) DurationSinceStartAsStr ¶
func (e Event) DurationSinceStartAsStr() string
func (Event) IsSameGroup ¶
func (e Event) IsSameGroup(other Event) bool
func (Event) IsWorthKeeping ¶
func (e Event) IsWorthKeeping() bool
func (Event) TimeAsHoursStr ¶
func (e Event) TimeAsHoursStr() string
type EventData ¶
type EventData struct {
Error string // e.g. "'api2/2' is not running after update"
}
type EventError ¶
type EventError struct {
Code int // e.g. 100
Message string // e.g. "Bosh::Director::Lock::TimeoutError"
}
type Reporter ¶
type Reporter interface {
TaskStarted(int)
TaskFinished(int, string)
TaskOutputChunk(int, []byte)
}
type ReporterImpl ¶
type ReporterImpl struct {
// contains filtered or unexported fields
}
func NewReporter ¶
func NewReporter(ui boshui.UI, isForEvents bool) *ReporterImpl
func (ReporterImpl) TaskFinished ¶
func (r ReporterImpl) TaskFinished(id int, state string)
func (*ReporterImpl) TaskOutputChunk ¶
func (r *ReporterImpl) TaskOutputChunk(id int, chunk []byte)
func (ReporterImpl) TaskStarted ¶
func (r ReporterImpl) TaskStarted(id int)
Click to show internal directories.
Click to hide internal directories.