reporter

package
v0.0.0-...-efe39f3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedExecutor

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

func NewBufferedExecutor

func NewBufferedExecutor() *BufferedExecutor

func (*BufferedExecutor) Submit

func (r *BufferedExecutor) Submit(fn func() error)

Submit sends the deployment status via HTTP to the given address. This function returns immediately, and sends the HTTP requests in the background. If the HTTP endpoint responds slower than Report is called, only the latest deploy status is sent.

func (*BufferedExecutor) Wait

func (r *BufferedExecutor) Wait(ctx context.Context) error

type CompositeReporter

type CompositeReporter []reporter

func (CompositeReporter) Report

func (cr CompositeReporter) Report(status *deployer.DeployStatus)

func (CompositeReporter) Wait

func (cr CompositeReporter) Wait(ctx context.Context) error

type GrafanaCreateAnnotationRequest

type GrafanaCreateAnnotationRequest struct {
	DashboardID int64    `json:"dashboardId,omitempty"`
	IsRegion    bool     `json:"isRegion,omitempty"`
	PanelID     int64    `json:"panelId,omitempty"`
	Tags        []string `json:"tags,omitempty"`
	Text        string   `json:"text,omitempty"`
	Time        int64    `json:"time,omitempty"`
	TimeEnd     int64    `json:"timeEnd,omitempty"`
}

type GrafanaReporter

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

func NewGrafanaReporter

func NewGrafanaReporter(grafanaURL, authToken string) *GrafanaReporter

func (*GrafanaReporter) Report

func (r *GrafanaReporter) Report(status *deployer.DeployStatus)

func (GrafanaReporter) Wait

func (r GrafanaReporter) Wait(ctx context.Context) error

type HTTPReporter

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

func NewHTTPReporter

func NewHTTPReporter(address, token string) (*HTTPReporter, error)

func (*HTTPReporter) Report

func (r *HTTPReporter) Report(status *deployer.DeployStatus)

func (*HTTPReporter) Wait

func (r *HTTPReporter) Wait(ctx context.Context) error

type SlackReporter

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

func NewSlackReporter

func NewSlackReporter(token, channel string) *SlackReporter

func (*SlackReporter) Report

func (r *SlackReporter) Report(status *deployer.DeployStatus)

func (*SlackReporter) Wait

func (r *SlackReporter) Wait(ctx context.Context) error

type TerminalReporter

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

func (*TerminalReporter) Report

func (r *TerminalReporter) Report(status *deployer.DeployStatus)

func (*TerminalReporter) Wait

func (r *TerminalReporter) Wait(ctx context.Context) error

Jump to

Keyboard shortcuts

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