agent

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: May 3, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const REJOIN_BACKOFF = 3 * time.Second
View Source
const SSE_BLANK_LINE = ""
View Source
const SSE_DATA_PREFIX = "data:"
View Source
const SSE_EVENT_PREFIX = "event:"

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Resolver   *nameserver.Resolver
	Janitor    *janitor.JanitorServer
	HttpServer *HttpServer
	SerfServer *SerfServer

	Config config.AgentConfig
}

func New

func New(agentConf config.AgentConfig) (*Agent, error)

func (*Agent) StartAndJoin added in v0.1.11

func (agent *Agent) StartAndJoin(ctx context.Context) error

type HttpServer added in v0.1.11

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

func NewHttpServer added in v0.1.11

func NewHttpServer(listener string, a *Agent) *HttpServer

func (*HttpServer) Start added in v0.1.11

func (aas *HttpServer) Start(ctx context.Context, started chan bool) error

type SerfServer added in v0.1.11

type SerfServer struct {
	SerfNode *serf.Serf
	EventCh  chan serf.Event

	SerfListenAddr string
	SerfJoinAddr   string
	// contains filtered or unexported fields
}

func NewSerfServer added in v0.1.11

func NewSerfServer(listenerAddr, joinAddr string) *SerfServer

func (*SerfServer) Publish added in v0.1.11

func (ss *SerfServer) Publish(eventType string, payload []byte)

func (*SerfServer) Start added in v0.1.11

func (ss *SerfServer) Start(ctx context.Context, started chan bool) error

Jump to

Keyboard shortcuts

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