agent

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoopUpdateFunc = func(*model.Work) {}
View Source
var TermLoggerFunc = func(line *build.Line) {
	fmt.Println(line)
}

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Update    UpdateFunc
	Logger    LoggerFunc
	Engine    build.Engine
	Timeout   time.Duration
	Platform  string
	Namespace string
	Extension []string
	Escalate  []string
	Netrc     []string
	Local     string
	Pull      bool
}

func (*Agent) Poll

func (a *Agent) Poll() error

func (*Agent) Run

func (a *Agent) Run(payload *model.Work, cancel <-chan bool) error

type Logger

type Logger interface {
	Write(*build.Line)
}

type LoggerFunc

type LoggerFunc func(*build.Line)

LoggerFunc handles buid pipeline logging updates.

func NewClientLogger

func NewClientLogger(client *stomp.Client, id int64, limit int64) LoggerFunc

type SecretReplacer

type SecretReplacer interface {
	// Replace conceals instances of secrets found in s.
	Replace(s string) string
}

SecretReplacer hides secrets from being exposed by the build output.

func NewSecretReplacer

func NewSecretReplacer(secrets []*model.Secret) SecretReplacer

NewSecretReplacer creates a SecretReplacer based on whether any value in secrets requests it be hidden.

type UpdateFunc

type UpdateFunc func(*model.Work)

UpdateFunc handles buid pipeline status updates.

func NewClientUpdater

func NewClientUpdater(client *stomp.Client) UpdateFunc

NewClientUpdater returns an updater that sends updated build details to the drone server.

Jump to

Keyboard shortcuts

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