Documentation ¶
Index ¶
- Variables
- type Option
- func WithConcurrency(c int) Option
- func WithConditionDefs(defs rctypes.Definitions) Option
- func WithFacility(f string) Option
- func WithListenAddress(addr string) Option
- func WithLogger(logger *logrus.Logger) Option
- func WithNotifier(s notify.Sender) Option
- func WithReplicas(c int) Option
- func WithStore(repository store.Repository) Option
- func WithStreamBroker(broker events.Stream) Option
- type Orchestrator
Constants ¶
This section is empty.
Variables ¶
var ( ErrPublishEvent = errors.New("error publishing event") ErrInvalidEvent = errors.New("invalid event message") )
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Orchestrator)
Option type sets a parameter on the Orchestrator type.
func WithConcurrency ¶
WithConcurrency sets the Orchestrator event concurrency, defaults to 1.
func WithConditionDefs ¶ added in v0.1.5
func WithConditionDefs(defs rctypes.Definitions) Option
WithConditionDefs sets the configured condition definitions where the orchestrator can access them at runtime.
func WithFacility ¶ added in v0.1.4
WithFacility sets a site-specific descriptor to focus the orchestrator's work.
func WithListenAddress ¶
WithListenAddress sets the Orchestrator listen address - for health checks.
func WithLogger ¶
WithLogger sets the logger on the Orchestrator type.
func WithNotifier ¶ added in v0.1.2
WithNotifier sets a notifier for condition state transition updates
func WithReplicas ¶ added in v0.0.3
WithReplicas sets the number of replicas we'll use when instaintiating the NATS liveness and status KV buckets. This is only used in the rare case when the buckets do not already exist (e.g. when operating in the sandbox environment).
func WithStore ¶
func WithStore(repository store.Repository) Option
WithStore sets the storage repository on the Orchestrator type.
func WithStreamBroker ¶
WithStreamBroker sets the event stream broker on the Orchestrator type.
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
Orchestrator type holds attributes of the condition orchestrator service
func New ¶
func New(opts ...Option) *Orchestrator
New returns a new orchestrator service with the given options set.
func (*Orchestrator) Run ¶
func (o *Orchestrator) Run(ctx context.Context)
Run runs the orchestrator which listens for events to action.