Documentation ¶
Index ¶
- type LiteralLogHandler
- type MetricsEventHandler
- func (h *MetricsEventHandler) BuildFinished(args *core.BuildFinishedArgs)
- func (h *MetricsEventHandler) BuildStarted(args *core.BuildStartedArgs)
- func (h *MetricsEventHandler) BuildStepFinished(args *core.BuildStepFinishedArgs)
- func (h *MetricsEventHandler) BuildStepStarted(args *core.BuildStepStartedArgs)
- func (h *MetricsEventHandler) BuildStepsAdded(args *core.BuildStepsAddedArgs)
- func (h *MetricsEventHandler) ListenTo(e *core.NormalizedEmitter)
- type MetricsPayload
- type ReportHandler
- func (h *ReportHandler) Close() error
- func (h *ReportHandler) FullPipelineFinished(args *core.FullPipelineFinishedArgs)
- func (h *ReportHandler) ListenTo(e *core.NormalizedEmitter)
- func (h *ReportHandler) Logs(args *core.LogsArgs)
- func (h *ReportHandler) PipelineFinished(args *core.BuildFinishedArgs)
- func (h *ReportHandler) StepFinished(args *core.BuildStepFinishedArgs)
- func (h *ReportHandler) StepStarted(args *core.BuildStepStartedArgs)
- func (h *ReportHandler) StepsAdded(args *core.BuildStepsAddedArgs)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LiteralLogHandler ¶
type LiteralLogHandler struct {
// contains filtered or unexported fields
}
A LiteralLogHandler logs all events using Logrus.
func NewLiteralLogHandler ¶
func NewLiteralLogHandler(options *core.PipelineOptions) (*LiteralLogHandler, error)
NewLiteralLogHandler will create a new LiteralLogHandler.
func (*LiteralLogHandler) ListenTo ¶
func (h *LiteralLogHandler) ListenTo(e *core.NormalizedEmitter)
ListenTo will add eventhandlers to e.
func (*LiteralLogHandler) Logs ¶
func (h *LiteralLogHandler) Logs(args *core.LogsArgs)
Logs will handle the Logs event.
type MetricsEventHandler ¶
type MetricsEventHandler struct {
// contains filtered or unexported fields
}
A MetricsEventHandler reporting to keen.io.
func NewMetricsHandler ¶
func NewMetricsHandler(opts *core.PipelineOptions) (*MetricsEventHandler, error)
NewMetricsHandler will create a new NewMetricsHandler.
func (*MetricsEventHandler) BuildFinished ¶
func (h *MetricsEventHandler) BuildFinished(args *core.BuildFinishedArgs)
BuildFinished responds to the BuildFinished event.
func (*MetricsEventHandler) BuildStarted ¶
func (h *MetricsEventHandler) BuildStarted(args *core.BuildStartedArgs)
BuildStarted responds to the BuildStarted event.
func (*MetricsEventHandler) BuildStepFinished ¶
func (h *MetricsEventHandler) BuildStepFinished(args *core.BuildStepFinishedArgs)
BuildStepFinished responds to the BuildStepFinished event.
func (*MetricsEventHandler) BuildStepStarted ¶
func (h *MetricsEventHandler) BuildStepStarted(args *core.BuildStepStartedArgs)
BuildStepStarted responds to the BuildStepStarted event.
func (*MetricsEventHandler) BuildStepsAdded ¶
func (h *MetricsEventHandler) BuildStepsAdded(args *core.BuildStepsAddedArgs)
BuildStepsAdded handles the BuildStepsAdded event.
func (*MetricsEventHandler) ListenTo ¶
func (h *MetricsEventHandler) ListenTo(e *core.NormalizedEmitter)
ListenTo will add eventhandlers to e.
type MetricsPayload ¶
type MetricsPayload struct { Keen *metricsKeenPayload `json:"keen"` Timestamp int64 `json:"timestamp"` Event string `json:"event"` Stack int `json:"stack,omitempty"` SentCli *util.Versions `json:"sentcli,omitempty"` Grappler *util.Versions `json:"grappler,omitempty"` PipelineName string `json:"pipelineName,omitempty"` RunID string `json:"runId,omitempty"` NumSteps int `json:"numSteps,omitempty"` NumAfterSteps int `json:"numAfterSteps,omitempty"` BoxName string `json:"box,omitempty"` BoxTag string `json:"boxTag,omitempty"` Step *metricStepPayload `json:"step,omitempty"` // Required for backwards compatibility: StepName string `json:"stepName,omitempty"` // <- owner/name@version StepOrder int `json:"stepOrder,omitempty"` Success *bool `json:"success,omitempty"` Message string `json:"message,omitempty"` Duration *int64 `json:"duration,omitempty"` StartedBy string `json:"startedBy,omitempty"` VCS string `json:"versionControl,omitempty"` MetricsApplicationPayload *metricsApplicationPayload `json:"application,omitempty"` }
MetricsPayload is the data we're sending to keen.
type ReportHandler ¶
type ReportHandler struct {
// contains filtered or unexported fields
}
A ReportHandler reports all events to the wercker-api.
func NewReportHandler ¶
func NewReportHandler(werckerHost, token string) (*ReportHandler, error)
NewReportHandler will create a new ReportHandler.
func (*ReportHandler) Close ¶
func (h *ReportHandler) Close() error
Close will call close on any log writers that have been created.
func (*ReportHandler) FullPipelineFinished ¶
func (h *ReportHandler) FullPipelineFinished(args *core.FullPipelineFinishedArgs)
FullPipelineFinished closes current writers, making sure they have flushed their logs.
func (*ReportHandler) ListenTo ¶
func (h *ReportHandler) ListenTo(e *core.NormalizedEmitter)
ListenTo will add eventhandlers to e.
func (*ReportHandler) Logs ¶
func (h *ReportHandler) Logs(args *core.LogsArgs)
Logs will handle the Logs event.
func (*ReportHandler) PipelineFinished ¶
func (h *ReportHandler) PipelineFinished(args *core.BuildFinishedArgs)
BuildFinished will handle the BuildFinished event.
func (*ReportHandler) StepFinished ¶
func (h *ReportHandler) StepFinished(args *core.BuildStepFinishedArgs)
BuildStepFinished will handle the BuildStepFinished event.
func (*ReportHandler) StepStarted ¶
func (h *ReportHandler) StepStarted(args *core.BuildStepStartedArgs)
BuildStepStarted will handle the BuildStepStarted event.
func (*ReportHandler) StepsAdded ¶
func (h *ReportHandler) StepsAdded(args *core.BuildStepsAddedArgs)
BuildStepsAdded will handle the BuildStepsAdded event.