orchestrator

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func WithConcurrency(c int) Option

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

func WithFacility(f string) Option

WithFacility sets a site-specific descriptor to focus the orchestrator's work.

func WithListenAddress

func WithListenAddress(addr string) Option

WithListenAddress sets the Orchestrator listen address - for health checks.

func WithLogger

func WithLogger(logger *logrus.Logger) Option

WithLogger sets the logger on the Orchestrator type.

func WithNotifier added in v0.1.2

func WithNotifier(s notify.Sender) Option

WithNotifier sets a notifier for condition state transition updates

func WithReplicas added in v0.0.3

func WithReplicas(c int) Option

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

func WithStreamBroker(broker events.Stream) Option

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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