incident

package
v0.0.0-...-f620936 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Incident

type Incident struct {
	Tasks    tasks.OptionsSlice
	Selector selector.Request
	// contains filtered or unexported fields
}

func (Incident) Description

func (i Incident) Description() (string, error)

func (Incident) Events

func (i Incident) Events() *reporter.Events

func (Incident) Execute

func (i Incident) Execute() error

func (Incident) ExecutionCompletedAt

func (i Incident) ExecutionCompletedAt() time.Time

func (Incident) ExecutionStartedAt

func (i Incident) ExecutionStartedAt() time.Time

func (Incident) HasKillTask

func (i Incident) HasKillTask() bool

func (Incident) ID

func (i Incident) ID() string

func (Incident) ShortDescription

func (i Incident) ShortDescription() (string, error)

func (Incident) TaskTypes

func (i Incident) TaskTypes() []string

type IncidentNotFoundError

type IncidentNotFoundError struct {
	ID string
}

func (IncidentNotFoundError) Error

func (e IncidentNotFoundError) Error() string

type IncidentsResp

type IncidentsResp []Response

func NewResponses

func NewResponses(incidents []Incident) IncidentsResp

type Repo

type Repo interface {
	ListAll() ([]Incident, error)
	Create(Request) (Incident, error)
	Read(string) (Incident, error)
}

func NewRepo

func NewRepo(
	uuidGen boshuuid.Generator,
	notifier RepoNotifier,
	reporter reporter.Reporter,
	director director.Director,
	tasksRepo tasks.Repo,
	logger boshlog.Logger,
) Repo

type RepoNotifier

type RepoNotifier interface {
	IncidentWasCreated(Incident)
}

type Request

type Request struct {
	Tasks    tasks.OptionsSlice
	Selector selector.Request
}

type Response

type Response struct {
	ID string

	Tasks    tasks.OptionsSlice
	Selector selector.Request

	ExecutionStartedAt   string
	ExecutionCompletedAt string

	Events []reporter.EventResponse
	// contains filtered or unexported fields
}

func NewResponse

func NewResponse(incident Incident) Response

func (Response) Description

func (r Response) Description() (string, error)

func (Response) HasEventErrors

func (r Response) HasEventErrors() bool

func (Response) TaskTypes

func (r Response) TaskTypes() string

func (Response) URL

func (r Response) URL() string

type Worker

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

func NewWorker

func NewWorker(logger boshlog.Logger) Worker

func (Worker) IncidentWasCreated

func (w Worker) IncidentWasCreated(incident Incident)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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