Documentation ¶
Overview ¶
Package orchestrator writes syslog drain bindings to adapters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterPool ¶
type AdapterPool struct { Pool map[string]v1.AdapterClient // contains filtered or unexported fields }
func NewAdapterPool ¶
func NewAdapterPool(addrs []string, h HealthEmitter, m MetricEmitter, opts ...grpc.DialOption) AdapterPool
func (AdapterPool) Add ¶
func (p AdapterPool) Add(ctx context.Context, adapter, task interface{}) error
type BindingReader ¶
type Communicator ¶
type Communicator interface { // List returns the workload from the given adapter. List(ctx context.Context, adapter interface{}) ([]interface{}, error) // Add adds the given task to the worker. The error only logged (for now). // It is assumed that if the worker returns an error trying to update, the // next term will fix the problem and move the task elsewhere. Add(ctx context.Context, adapter, binding interface{}) error // Removes the given task from the worker. The error is only logged (for // now). It is assumed that if the worker is returning an error, then it // is either not doing the task because the worker is down, or there is a // network partition and a future term will fix the problem. Remove(ctx context.Context, adapter, binding interface{}) error }
type HealthEmitter ¶
type MetricEmitter ¶
type MetricEmitter interface { NewGaugeMetric(name, unit string, opts ...pulseemitter.MetricOption) pulseemitter.GaugeMetric NewCounterMetric(name string, opts ...pulseemitter.MetricOption) pulseemitter.CounterMetric }
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
Orchestrator manages writes to a number of adapters.
func NewOrchestrator ¶
func NewOrchestrator( adapterPool AdapterPool, r BindingReader, c Communicator, h HealthEmitter, m MetricEmitter, ) *Orchestrator
NewOrchestrator creates a new orchestrator.
func (*Orchestrator) NextTerm ¶
func (o *Orchestrator) NextTerm()
func (*Orchestrator) Run ¶
func (o *Orchestrator) Run(interval time.Duration)
Run starts the orchestrator.
Click to show internal directories.
Click to hide internal directories.