eventlogger

package
v0.0.0-...-e2c346a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Time    time.Time
	Stage   string
	Task    string
	State   EventState
	Message string
}

type EventFilter

type EventFilter interface {
	Filter(*Event) error
}

func NewTimeFilter

func NewTimeFilter(timeService boshtime.Service) EventFilter

type EventLogger

type EventLogger interface {
	NewStage(string) Stage
	AddEvent(event Event) error
	StartStage(string)
	FinishStage(string)
}

func NewEventLogger

func NewEventLogger(ui bmui.UI) EventLogger

func NewEventLoggerWithFilters

func NewEventLoggerWithFilters(ui bmui.UI, filters []EventFilter) EventLogger

type EventState

type EventState string
const (
	Started  EventState = "started"
	Finished EventState = "finished"
	Failed   EventState = "failed"
	Skipped  EventState = "skipped"
)

type SkippedStepError

type SkippedStepError struct {
	// contains filtered or unexported fields
}

func NewSkippedStepError

func NewSkippedStepError(msg string) SkippedStepError

func (SkippedStepError) Error

func (e SkippedStepError) Error() string

type Stage

type Stage interface {
	NewStep(string) Step
	PerformStep(string, func() error) error
	Name() string
	Start()
	Finish()
}

func NewStage

func NewStage(name string, eventLogger EventLogger) Stage

type Step

type Step interface {
	Start()
	Finish()
	Skip(string)
	Fail(string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL