Documentation
¶
Index ¶
- func EventExtractor(diff tuple.Pair[SchemaState, SchemaState]) iter.Seq[SchemaEvent]
- func NewInMemoryRunnerState(ctx context.Context) eventstream.EventStream[RunnerState, RunnerEvent]
- func NewInMemorySchemaState(ctx context.Context) *statemachine.SingleQueryHandle[struct{}, SchemaState, SchemaEvent]
- type Deployment
- type DeploymentActivatedEvent
- type DeploymentArtefact
- type DeploymentCreatedEvent
- type DeploymentDeactivatedEvent
- type DeploymentReplicasUpdatedEvent
- type DeploymentSchemaUpdatedEvent
- type Runner
- type RunnerDeletedEvent
- type RunnerEvent
- type RunnerRegisteredEvent
- type RunnerState
- type SchemaEvent
- type SchemaState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventExtractor ¶ added in v0.421.0
func EventExtractor(diff tuple.Pair[SchemaState, SchemaState]) iter.Seq[SchemaEvent]
EventExtractor calculates controller events from changes to the state.
func NewInMemoryRunnerState ¶ added in v0.421.0
func NewInMemoryRunnerState(ctx context.Context) eventstream.EventStream[RunnerState, RunnerEvent]
func NewInMemorySchemaState ¶ added in v0.421.0
func NewInMemorySchemaState(ctx context.Context) *statemachine.SingleQueryHandle[struct{}, SchemaState, SchemaEvent]
Types ¶
type Deployment ¶
type DeploymentActivatedEvent ¶
type DeploymentActivatedEvent struct {
Key model.DeploymentKey
ActivatedAt time.Time
MinReplicas int
}
func (*DeploymentActivatedEvent) Handle ¶
func (r *DeploymentActivatedEvent) Handle(t SchemaState) (SchemaState, error)
type DeploymentArtefact ¶
type DeploymentCreatedEvent ¶
type DeploymentCreatedEvent struct {
Key model.DeploymentKey
CreatedAt time.Time
Module string
Schema *schema.Module
Artefacts []*DeploymentArtefact
Language string
}
func (*DeploymentCreatedEvent) Handle ¶
func (r *DeploymentCreatedEvent) Handle(t SchemaState) (SchemaState, error)
type DeploymentDeactivatedEvent ¶
type DeploymentDeactivatedEvent struct {
Key model.DeploymentKey
ModuleRemoved bool
}
func (*DeploymentDeactivatedEvent) Handle ¶
func (r *DeploymentDeactivatedEvent) Handle(t SchemaState) (SchemaState, error)
type DeploymentReplicasUpdatedEvent ¶
type DeploymentReplicasUpdatedEvent struct {
Key model.DeploymentKey
Replicas int
}
func (*DeploymentReplicasUpdatedEvent) Handle ¶
func (r *DeploymentReplicasUpdatedEvent) Handle(t SchemaState) (SchemaState, error)
type DeploymentSchemaUpdatedEvent ¶
type DeploymentSchemaUpdatedEvent struct {
Key model.DeploymentKey
Schema *schema.Module
}
func (*DeploymentSchemaUpdatedEvent) Handle ¶
func (r *DeploymentSchemaUpdatedEvent) Handle(t SchemaState) (SchemaState, error)
type RunnerDeletedEvent ¶
func (*RunnerDeletedEvent) Handle ¶
func (r *RunnerDeletedEvent) Handle(t RunnerState) (RunnerState, error)
type RunnerEvent ¶ added in v0.421.0
type RunnerEvent interface {
Handle(view RunnerState) (RunnerState, error)
}
type RunnerRegisteredEvent ¶
type RunnerRegisteredEvent struct {
Key model.RunnerKey
Time time.Time
Endpoint string
Module string
Deployment model.DeploymentKey
}
func (*RunnerRegisteredEvent) Handle ¶
func (r *RunnerRegisteredEvent) Handle(t RunnerState) (RunnerState, error)
func (*RunnerRegisteredEvent) VerboseMessage ¶
func (r *RunnerRegisteredEvent) VerboseMessage()
type RunnerState ¶ added in v0.421.0
type RunnerState struct {
// contains filtered or unexported fields
}
func (*RunnerState) Runner ¶ added in v0.421.0
func (r *RunnerState) Runner(s string) optional.Option[Runner]
func (*RunnerState) Runners ¶ added in v0.421.0
func (r *RunnerState) Runners() []Runner
func (*RunnerState) RunnersForDeployment ¶ added in v0.421.0
func (r *RunnerState) RunnersForDeployment(deployment string) []Runner
type SchemaEvent ¶ added in v0.421.0
type SchemaEvent interface {
Handle(view SchemaState) (SchemaState, error)
}
type SchemaState ¶ added in v0.421.0
type SchemaState struct {
// contains filtered or unexported fields
}
func (*SchemaState) GetActiveDeploymentSchemas ¶ added in v0.421.0
func (r *SchemaState) GetActiveDeploymentSchemas() []*schema.Module
func (*SchemaState) GetActiveDeployments ¶ added in v0.421.0
func (r *SchemaState) GetActiveDeployments() map[string]*Deployment
func (*SchemaState) GetDeployment ¶ added in v0.421.0
func (r *SchemaState) GetDeployment(deployment model.DeploymentKey) (*Deployment, error)
func (*SchemaState) GetDeployments ¶ added in v0.421.0
func (r *SchemaState) GetDeployments() map[string]*Deployment
Click to show internal directories.
Click to hide internal directories.