Documentation
¶
Index ¶
- Variables
- func Provide(i *do.Injector)
- type CreatePgBackRestBackupInput
- type CreatePgBackRestBackupOutput
- type DeleteDatabaseInput
- type DeleteDatabaseOutput
- type FailoverInput
- type FailoverOutput
- type InstanceHost
- type Orchestrator
- type PgBackRestRestoreInput
- type PgBackRestRestoreOutput
- type PlanRestoreInput
- type PlanRestoreOutput
- type PlanUpdateInput
- type PlanUpdateOutput
- type RefreshCurrentStateInput
- type RefreshCurrentStateOutput
- type RemoveHostInput
- type RemoveHostOutput
- type RestartInstanceInput
- type RestartInstanceOutput
- type Service
- func (s *Service) CancelDatabaseTask(ctx context.Context, DatabaseID string, taskID uuid.UUID) (*task.Task, error)
- func (s *Service) CreateDatabase(ctx context.Context, spec *database.Spec) (*task.Task, error)
- func (s *Service) CreatePgBackRestBackup(ctx context.Context, databaseID string, nodeName string, ...) (*task.Task, error)
- func (s *Service) DeleteDatabase(ctx context.Context, databaseID string) (*task.Task, error)
- func (s *Service) FailoverDatabaseNode(ctx context.Context, input *FailoverInput) (*task.Task, error)
- func (s *Service) PgBackRestRestore(ctx context.Context, spec *database.Spec, targetNodes []string, ...) (*task.Task, []*task.Task, error)
- func (s *Service) RemoveHost(ctx context.Context, input *RemoveHostInput) ([]*task.Task, error)
- func (s *Service) RestartInstance(ctx context.Context, input *RestartInstanceInput) (*task.Task, error)
- func (s *Service) StartInstance(ctx context.Context, input *StartInstanceInput) (*task.Task, error)
- func (s *Service) StopInstance(ctx context.Context, input *StopInstanceInput) (*task.Task, error)
- func (s *Service) SwitchoverDatabaseNode(ctx context.Context, input *SwitchoverInput) (*task.Task, error)
- func (s *Service) UpdateDatabase(ctx context.Context, spec *database.Spec, forceUpdate bool, ...) (*task.Task, error)
- func (s *Service) ValidateSpec(ctx context.Context, input *ValidateSpecInput) (*ValidateSpecOutput, error)
- type StartInstanceInput
- type StartInstanceOutput
- type StopInstanceInput
- type StopInstanceOutput
- type SwitchoverInput
- type SwitchoverOutput
- type UpdateDatabaseInput
- type UpdateDatabaseOutput
- type ValidateSpecInput
- type ValidateSpecOutput
- type Worker
- type Workflows
- func (w *Workflows) CreatePgBackRestBackup(ctx workflow.Context, input *CreatePgBackRestBackupInput) (*CreatePgBackRestBackupOutput, error)
- func (w *Workflows) DeleteDatabase(ctx workflow.Context, input *DeleteDatabaseInput) (*DeleteDatabaseOutput, error)
- func (w *Workflows) ExecutePlanRestore(ctx workflow.Context, input *PlanRestoreInput) workflow.Future[*PlanRestoreOutput]
- func (w *Workflows) ExecutePlanUpdate(ctx workflow.Context, input *PlanUpdateInput) workflow.Future[*PlanUpdateOutput]
- func (w *Workflows) ExecuteRefreshCurrentState(ctx workflow.Context, input *RefreshCurrentStateInput) workflow.Future[*RefreshCurrentStateOutput]
- func (w *Workflows) Failover(ctx workflow.Context, in *FailoverInput) (*FailoverOutput, error)
- func (w *Workflows) PgBackRestRestore(ctx workflow.Context, input *PgBackRestRestoreInput) (*PgBackRestRestoreOutput, error)
- func (w *Workflows) PlanRestore(ctx workflow.Context, input *PlanRestoreInput) (*PlanRestoreOutput, error)
- func (w *Workflows) PlanUpdate(ctx workflow.Context, input *PlanUpdateInput) (*PlanUpdateOutput, error)
- func (w *Workflows) RefreshCurrentState(ctx workflow.Context, input *RefreshCurrentStateInput) (*RefreshCurrentStateOutput, error)
- func (w *Workflows) Register(work *worker.Worker) error
- func (w *Workflows) RemoveHost(ctx workflow.Context, input *RemoveHostInput) (*RemoveHostOutput, error)
- func (w *Workflows) RestartInstance(ctx workflow.Context, input *RestartInstanceInput) (*RestartInstanceOutput, error)
- func (w *Workflows) StartInstance(ctx workflow.Context, input *StartInstanceInput) (*StartInstanceOutput, error)
- func (w *Workflows) StopInstance(ctx workflow.Context, input *StopInstanceInput) (*StopInstanceOutput, error)
- func (w *Workflows) Switchover(ctx workflow.Context, in *SwitchoverInput) (*SwitchoverOutput, error)
- func (w *Workflows) UpdateDatabase(ctx workflow.Context, input *UpdateDatabaseInput) (*UpdateDatabaseOutput, error)
- func (w *Workflows) ValidateSpec(ctx workflow.Context, input *ValidateSpecInput) (*ValidateSpecOutput, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateWorkflow = errors.New("duplicate workflow already in progress")
Functions ¶
Types ¶
type CreatePgBackRestBackupInput ¶
type CreatePgBackRestBackupInput struct {
DatabaseID string `json:"database_id"`
TaskID uuid.UUID `json:"task_id"`
NodeName string `json:"node_name"`
BackupFromStandby bool `json:"backup_from_standby"`
Instances []*InstanceHost `json:"instances"`
BackupOptions *pgbackrest.BackupOptions `json:"backup_options"`
}
type CreatePgBackRestBackupOutput ¶
type CreatePgBackRestBackupOutput struct{}
type DeleteDatabaseInput ¶
type DeleteDatabaseOutput ¶
type DeleteDatabaseOutput struct{}
type FailoverInput ¶
type FailoverInput struct {
DatabaseID string
NodeName string
Instances []*activities.InstanceHost
CandidateInstanceID string
SkipValidation bool
TaskID uuid.UUID
}
type FailoverOutput ¶
type FailoverOutput struct{}
type InstanceHost ¶
type Orchestrator ¶
type PgBackRestRestoreInput ¶
type PgBackRestRestoreOutput ¶
type PgBackRestRestoreOutput struct{}
type PlanRestoreInput ¶
type PlanRestoreOutput ¶
type PlanUpdateInput ¶
type PlanUpdateInput struct {
Options operations.UpdateDatabaseOptions `json:"options"`
Spec *database.Spec `json:"spec"`
Current *resource.State `json:"current"`
}
type PlanUpdateOutput ¶
type RemoveHostInput ¶ added in v0.6.0
type RemoveHostOutput ¶ added in v0.6.0
type RemoveHostOutput struct{}
type RestartInstanceInput ¶
type RestartInstanceOutput ¶
type RestartInstanceOutput struct{}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CancelDatabaseTask ¶
func (*Service) CreateDatabase ¶
func (*Service) CreatePgBackRestBackup ¶
func (s *Service) CreatePgBackRestBackup( ctx context.Context, databaseID string, nodeName string, backupFromStandby bool, instances []*InstanceHost, backupOptions *pgbackrest.BackupOptions, ) (*task.Task, error)
func (*Service) DeleteDatabase ¶
func (*Service) FailoverDatabaseNode ¶
func (*Service) PgBackRestRestore ¶
func (*Service) RemoveHost ¶ added in v0.6.0
func (*Service) RestartInstance ¶
func (*Service) StartInstance ¶
func (*Service) StopInstance ¶
func (*Service) SwitchoverDatabaseNode ¶
func (*Service) UpdateDatabase ¶
func (*Service) ValidateSpec ¶
func (s *Service) ValidateSpec(ctx context.Context, input *ValidateSpecInput) (*ValidateSpecOutput, error)
type StartInstanceInput ¶
type StartInstanceOutput ¶
type StartInstanceOutput struct{}
type StopInstanceInput ¶
type StopInstanceOutput ¶
type StopInstanceOutput struct{}
type SwitchoverInput ¶
type SwitchoverInput struct {
DatabaseID string
NodeName string
Instances []*activities.InstanceHost
CandidateInstanceID string
ScheduledAt time.Time
TaskID uuid.UUID
}
type SwitchoverOutput ¶
type SwitchoverOutput struct{}
type UpdateDatabaseInput ¶
type UpdateDatabaseOutput ¶
type ValidateSpecInput ¶
type ValidateSpecOutput ¶
type Workflows ¶
type Workflows struct {
Config config.Config
Activities *activities.Activities
}
func (*Workflows) CreatePgBackRestBackup ¶
func (w *Workflows) CreatePgBackRestBackup(ctx workflow.Context, input *CreatePgBackRestBackupInput) (*CreatePgBackRestBackupOutput, error)
func (*Workflows) DeleteDatabase ¶
func (w *Workflows) DeleteDatabase(ctx workflow.Context, input *DeleteDatabaseInput) (*DeleteDatabaseOutput, error)
func (*Workflows) ExecutePlanRestore ¶
func (w *Workflows) ExecutePlanRestore( ctx workflow.Context, input *PlanRestoreInput, ) workflow.Future[*PlanRestoreOutput]
func (*Workflows) ExecutePlanUpdate ¶
func (w *Workflows) ExecutePlanUpdate( ctx workflow.Context, input *PlanUpdateInput, ) workflow.Future[*PlanUpdateOutput]
func (*Workflows) ExecuteRefreshCurrentState ¶
func (w *Workflows) ExecuteRefreshCurrentState( ctx workflow.Context, input *RefreshCurrentStateInput, ) workflow.Future[*RefreshCurrentStateOutput]
func (*Workflows) Failover ¶
func (w *Workflows) Failover(ctx workflow.Context, in *FailoverInput) (*FailoverOutput, error)
func (*Workflows) PgBackRestRestore ¶
func (w *Workflows) PgBackRestRestore(ctx workflow.Context, input *PgBackRestRestoreInput) (*PgBackRestRestoreOutput, error)
func (*Workflows) PlanRestore ¶
func (w *Workflows) PlanRestore(ctx workflow.Context, input *PlanRestoreInput) (*PlanRestoreOutput, error)
func (*Workflows) PlanUpdate ¶
func (w *Workflows) PlanUpdate(ctx workflow.Context, input *PlanUpdateInput) (*PlanUpdateOutput, error)
func (*Workflows) RefreshCurrentState ¶
func (w *Workflows) RefreshCurrentState(ctx workflow.Context, input *RefreshCurrentStateInput) (*RefreshCurrentStateOutput, error)
func (*Workflows) RemoveHost ¶ added in v0.6.0
func (w *Workflows) RemoveHost(ctx workflow.Context, input *RemoveHostInput) (*RemoveHostOutput, error)
func (*Workflows) RestartInstance ¶
func (w *Workflows) RestartInstance(ctx workflow.Context, input *RestartInstanceInput) (*RestartInstanceOutput, error)
func (*Workflows) StartInstance ¶
func (w *Workflows) StartInstance(ctx workflow.Context, input *StartInstanceInput) (*StartInstanceOutput, error)
func (*Workflows) StopInstance ¶
func (w *Workflows) StopInstance(ctx workflow.Context, input *StopInstanceInput) (*StopInstanceOutput, error)
func (*Workflows) Switchover ¶
func (w *Workflows) Switchover(ctx workflow.Context, in *SwitchoverInput) (*SwitchoverOutput, error)
func (*Workflows) UpdateDatabase ¶
func (w *Workflows) UpdateDatabase(ctx workflow.Context, input *UpdateDatabaseInput) (*UpdateDatabaseOutput, error)
func (*Workflows) ValidateSpec ¶
func (w *Workflows) ValidateSpec(ctx workflow.Context, input *ValidateSpecInput) (*ValidateSpecOutput, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.