Documentation
¶
Index ¶
- type ChanneledTransport
- func (t *ChanneledTransport) Close() error
- func (t *ChanneledTransport) IsClosed() bool
- func (t *ChanneledTransport) Off() (sigSent bool)
- func (t *ChanneledTransport) On() (sigSent bool)
- func (t *ChanneledTransport) OnOff() <-chan struct{}
- func (t *ChanneledTransport) OnOn() <-chan struct{}
- func (t *ChanneledTransport) OnPing() <-chan struct{}
- func (t *ChanneledTransport) OnPong() <-chan struct{}
- func (t *ChanneledTransport) OnReload() <-chan Config
- func (t *ChanneledTransport) OnScaleTo() <-chan int
- func (t *ChanneledTransport) OnStart() <-chan Config
- func (t *ChanneledTransport) OnStop() <-chan struct{}
- func (t *ChanneledTransport) Ping() (sigSent bool)
- func (t *ChanneledTransport) Pong() (sigSent bool)
- func (t *ChanneledTransport) Reload(cfg Config) (sigSent bool)
- func (t *ChanneledTransport) ScaleTo(n int) (sigSent bool)
- func (t *ChanneledTransport) Start(cfg Config) (sigSent bool)
- func (t *ChanneledTransport) Stop() (sigSent bool)
- type Config
- type Governor
- type Orchestrator
- func (o *Orchestrator) Off(name string) error
- func (o *Orchestrator) On(name string) error
- func (o *Orchestrator) Register(name string, s Service)
- func (o *Orchestrator) Reload(name string, cfg Config) error
- func (o *Orchestrator) ScaleTo(name string, n int) error
- func (o *Orchestrator) Start(name string, cfg Config) error
- func (o *Orchestrator) Stop()
- type Scalable
- type Service
- type ServiceState
- type State
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChanneledTransport ¶
type ChanneledTransport struct {
// contains filtered or unexported fields
}
func NewChanneledTransport ¶
func NewChanneledTransport() *ChanneledTransport
func (*ChanneledTransport) Close ¶
func (t *ChanneledTransport) Close() error
func (*ChanneledTransport) IsClosed ¶
func (t *ChanneledTransport) IsClosed() bool
func (*ChanneledTransport) Off ¶
func (t *ChanneledTransport) Off() (sigSent bool)
func (*ChanneledTransport) On ¶
func (t *ChanneledTransport) On() (sigSent bool)
func (*ChanneledTransport) OnOff ¶
func (t *ChanneledTransport) OnOff() <-chan struct{}
func (*ChanneledTransport) OnOn ¶
func (t *ChanneledTransport) OnOn() <-chan struct{}
func (*ChanneledTransport) OnPing ¶
func (t *ChanneledTransport) OnPing() <-chan struct{}
func (*ChanneledTransport) OnPong ¶
func (t *ChanneledTransport) OnPong() <-chan struct{}
func (*ChanneledTransport) OnReload ¶
func (t *ChanneledTransport) OnReload() <-chan Config
func (*ChanneledTransport) OnScaleTo ¶
func (t *ChanneledTransport) OnScaleTo() <-chan int
func (*ChanneledTransport) OnStart ¶
func (t *ChanneledTransport) OnStart() <-chan Config
func (*ChanneledTransport) OnStop ¶
func (t *ChanneledTransport) OnStop() <-chan struct{}
func (*ChanneledTransport) Ping ¶
func (t *ChanneledTransport) Ping() (sigSent bool)
func (*ChanneledTransport) Pong ¶
func (t *ChanneledTransport) Pong() (sigSent bool)
func (*ChanneledTransport) Reload ¶
func (t *ChanneledTransport) Reload(cfg Config) (sigSent bool)
func (*ChanneledTransport) ScaleTo ¶
func (t *ChanneledTransport) ScaleTo(n int) (sigSent bool)
func (*ChanneledTransport) Start ¶
func (t *ChanneledTransport) Start(cfg Config) (sigSent bool)
func (*ChanneledTransport) Stop ¶
func (t *ChanneledTransport) Stop() (sigSent bool)
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
func New ¶
func New() *Orchestrator
func (*Orchestrator) Off ¶
func (o *Orchestrator) Off(name string) error
func (*Orchestrator) On ¶
func (o *Orchestrator) On(name string) error
func (*Orchestrator) Register ¶
func (o *Orchestrator) Register(name string, s Service)
func (*Orchestrator) Stop ¶
func (o *Orchestrator) Stop()
type ServiceState ¶
type ServiceState struct {
Name string
State State
DesiredEnabled bool
DesiredInst int
Active bool
Instances int
Failures int
LastError string
LastCheck time.Time
Uptime time.Duration
CfgHash string
}
ServiceState is a cheap snapshot for UIs and tests.
type State ¶
type State int32
Public, externally visible states of a service group supervised by the governor.
type Transport ¶
type Transport interface {
Start(cfg Config) (sigSent bool)
Ping() (sigSent bool) // orchestrator -> ping -> worker
Pong() (sigSent bool) // worker -> pong -> orchestrator
On() (sigSent bool)
Off() (sigSent bool)
Reload(cfg Config) (sigSent bool)
ScaleTo(n int) (sigSent bool)
Stop() (sigSent bool)
IsClosed() bool
Close() error
OnStart() <-chan Config
OnPing() <-chan struct{}
OnPong() <-chan struct{}
OnOn() <-chan struct{}
OnOff() <-chan struct{}
OnReload() <-chan Config
OnScaleTo() <-chan int
OnStop() <-chan struct{}
}
Click to show internal directories.
Click to hide internal directories.