core

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ReconnectSleepTime = 10 * time.Second
)
View Source
const (
	ReturnExpire = 300
)

Variables

View Source
var (
	Branch   = "{branch}"
	Revision = "{revision}"
	Dirty    = "{dirty}"
)

Functions

func StartSinks

func StartSinks(mgr *pm.PM, sinks map[string]SinkClient)

StartSinks starts the long polling routines and feed the manager with received commands

func Version added in v1.0.0

func Version() fmt.Stringer

Types

type Local

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

func NewLocal

func NewLocal(s string) (*Local, error)

func (*Local) Serve

func (l *Local) Serve()

type LocalCmd

type LocalCmd struct {
	Sync    bool            `json:"sync"`
	Content json.RawMessage `json:"content"`
}

type LocalResult

type LocalResult struct {
	State  string          `json:"state"`
	Error  string          `json:"error,omitempty"`
	Result *core.JobResult `json:"result,omitempty"`
}

type Sink

type Sink interface {
	Run()
}

func NewSink

func NewSink(key string, mgr *pm.PM, client SinkClient) Sink

type SinkClient

type SinkClient interface {
	GetNext(command *core.Command) error
	Respond(result *core.JobResult) error
}

func NewSinkClient

func NewSinkClient(cfg *settings.SinkConfig, id string, responseQueue ...string) (SinkClient, error)

NewSinkClient gets a new sink connection with the given identity. Identity is used by the sink client to introduce itself to the sink terminal.

Directories

Path Synopsis
pm

Jump to

Keyboard shortcuts

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