Documentation
¶
Index ¶
- Variables
- func ActionOf(running bool) string
- func Addr(networks map[string]string) string
- func PipeEvents(ctx context.Context, reporter *Reporter, watchers ...WatchFunc) (<-chan *types.WorkloadEventMessage, <-chan error)
- type EmitFunc
- type Log
- type Meta
- type Multi
- func (m *Multi) Alive(ctx context.Context) bool
- func (m *Multi) Events(ctx context.Context) (<-chan *types.WorkloadEventMessage, <-chan error)
- func (m *Multi) Get(ctx context.Context, ID string) (*Workload, error)
- func (m *Multi) List(ctx context.Context) ([]*Workload, error)
- func (m *Multi) Refresh(ID string) (*Workload, error)
- type Refresher
- type Reporter
- type Source
- type WatchFunc
- type Workload
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownWorkload = errors.New("no runtime on this node knows this workload")
Functions ¶
func ActionOf ¶
ActionOf turns a runtime's liveness answer into the event action the manager handles.
func PipeEvents ¶
Types ¶
type EmitFunc ¶
type EmitFunc func(ID, action string)
EmitFunc hands one workload's state change to the manager.
type Meta ¶
type Meta struct {
Appname string
Entrypoint string
Ident string
Podname string
Nodename string
CoreID string
Labels map[string]string
HealthCheck *coretypes.HealthCheck
Networks map[string]string
}
Meta is the workload metadata core wrote when it created the workload.
type Multi ¶
type Multi struct {
// contains filtered or unexported fields
}
Multi presents every runtime a node hosts as one source.
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter drops the state changes that repeat what a source last said about a workload.
func NewReporter ¶
func NewReporter() *Reporter
type Source ¶
type Source interface {
List(ctx context.Context) ([]*Workload, error)
Get(ctx context.Context, ID string) (*Workload, error)
Events(ctx context.Context) (<-chan *types.WorkloadEventMessage, <-chan error)
Alive(ctx context.Context) bool
}
Source is one runtime's view of the workloads this node runs.
Click to show internal directories.
Click to hide internal directories.