Documentation
¶
Index ¶
- Constants
- Variables
- func CheckWillRestartIdentifier(instanceID string) resource.Identifier
- func DatabaseServiceSpec(instance *database.InstanceSpec, options *HostOptions) (swarm.ServiceSpec, error)
- func EtcdCredsIdentifier(instanceID string) resource.Identifier
- func GetPostgresContainer(ctx context.Context, dockerClient *docker.Docker, instanceID string) (types.Container, error)
- func NetworkResourceIdentifier(name string) resource.Identifier
- func PatroniClusterResourceIdentifier(nodeName string) resource.Identifier
- func PatroniConfigIdentifier(instanceID string) resource.Identifier
- func PatroniMemberResourceIdentifier(instanceID string) resource.Identifier
- func PgBackRestBackupCmd(command string, args ...string) pgbackrest.Cmd
- func PgBackRestConfigIdentifier(instanceID string, configType PgBackRestConfigType) resource.Identifier
- func PgBackRestRestoreCmd(command string, args ...string) pgbackrest.Cmd
- func PgBackRestRestoreResourceIdentifier(instanceID string) resource.Identifier
- func PgBackRestStanzaIdentifier(nodeName string) resource.Identifier
- func PostgresCertsIdentifier(instanceID string) resource.Identifier
- func PostgresContainerExec(ctx context.Context, w io.Writer, dockerClient *docker.Docker, ...) error
- func PostgresServiceResourceIdentifier(instanceID string) resource.Identifier
- func PostgresServiceSpecResourceIdentifier(instanceID string) resource.Identifier
- func Provide(i *do.Injector)
- func RegisterResourceTypes(registry *resource.Registry)
- func ScaleServiceResourceIdentifier(instanceID string, direction ScaleDirection) resource.Identifier
- func SwitchoverResourceIdentifier(instanceID string) resource.Identifier
- type Allocator
- type CheckWillRestart
- func (c *CheckWillRestart) Create(ctx context.Context, rc *resource.Context) error
- func (c *CheckWillRestart) Delete(ctx context.Context, rc *resource.Context) error
- func (c *CheckWillRestart) Dependencies() []resource.Identifier
- func (c *CheckWillRestart) DiffIgnore() []string
- func (c *CheckWillRestart) Executor() resource.Executor
- func (c *CheckWillRestart) Identifier() resource.Identifier
- func (c *CheckWillRestart) Refresh(ctx context.Context, rc *resource.Context) error
- func (c *CheckWillRestart) ResourceVersion() string
- func (c *CheckWillRestart) Update(ctx context.Context, rc *resource.Context) error
- type EtcdCreds
- func (c *EtcdCreds) Create(ctx context.Context, rc *resource.Context) error
- func (c *EtcdCreds) Delete(ctx context.Context, rc *resource.Context) error
- func (c *EtcdCreds) Dependencies() []resource.Identifier
- func (c *EtcdCreds) DiffIgnore() []string
- func (c *EtcdCreds) Executor() resource.Executor
- func (c *EtcdCreds) Identifier() resource.Identifier
- func (c *EtcdCreds) Refresh(ctx context.Context, rc *resource.Context) error
- func (c *EtcdCreds) ResourceVersion() string
- func (c *EtcdCreds) Update(ctx context.Context, rc *resource.Context) error
- type HostOptions
- type Images
- type Instance
- type Network
- func (n *Network) Create(ctx context.Context, rc *resource.Context) error
- func (n *Network) Delete(ctx context.Context, rc *resource.Context) error
- func (n *Network) Dependencies() []resource.Identifier
- func (n *Network) DiffIgnore() []string
- func (n *Network) Executor() resource.Executor
- func (n *Network) Identifier() resource.Identifier
- func (n *Network) Refresh(ctx context.Context, rc *resource.Context) error
- func (n *Network) ResourceVersion() string
- func (n *Network) Update(ctx context.Context, rc *resource.Context) error
- func (n *Network) Validate() error
- type Orchestrator
- func (o *Orchestrator) CreatePgBackRestBackup(ctx context.Context, w io.Writer, instanceID string, ...) error
- func (o *Orchestrator) GenerateInstanceResources(spec *database.InstanceSpec) (*database.InstanceResources, error)
- func (o *Orchestrator) GenerateInstanceRestoreResources(spec *database.InstanceSpec, taskID uuid.UUID) (*database.InstanceResources, error)
- func (o *Orchestrator) GetInstanceConnectionInfo(ctx context.Context, databaseID, instanceID string) (*database.ConnectionInfo, error)
- func (o *Orchestrator) PopulateHost(ctx context.Context, h *host.Host) error
- func (o *Orchestrator) PopulateHostStatus(ctx context.Context, status *host.HostStatus) error
- func (o *Orchestrator) StartInstance(ctx context.Context, instanceID string) error
- func (o *Orchestrator) StopInstance(ctx context.Context, instanceID string) error
- func (o *Orchestrator) ValidateInstanceSpecs(ctx context.Context, changes []*database.InstanceSpecChange) ([]*database.ValidationResult, error)
- func (o *Orchestrator) WorkerQueues() ([]workflow.Queue, error)
- type Paths
- type PatroniCluster
- func (p *PatroniCluster) Create(ctx context.Context, rc *resource.Context) error
- func (p *PatroniCluster) Delete(ctx context.Context, rc *resource.Context) error
- func (p *PatroniCluster) Dependencies() []resource.Identifier
- func (p *PatroniCluster) DiffIgnore() []string
- func (p *PatroniCluster) Executor() resource.Executor
- func (p *PatroniCluster) Identifier() resource.Identifier
- func (p *PatroniCluster) Refresh(ctx context.Context, rc *resource.Context) error
- func (p *PatroniCluster) ResourceVersion() string
- func (p *PatroniCluster) Update(ctx context.Context, rc *resource.Context) error
- type PatroniConfig
- func (c *PatroniConfig) Create(ctx context.Context, rc *resource.Context) error
- func (c *PatroniConfig) Delete(ctx context.Context, rc *resource.Context) error
- func (c *PatroniConfig) Dependencies() []resource.Identifier
- func (c *PatroniConfig) DiffIgnore() []string
- func (c *PatroniConfig) Executor() resource.Executor
- func (c *PatroniConfig) Identifier() resource.Identifier
- func (c *PatroniConfig) Refresh(ctx context.Context, rc *resource.Context) error
- func (c *PatroniConfig) ResourceVersion() string
- func (c *PatroniConfig) Update(ctx context.Context, rc *resource.Context) error
- type PatroniMember
- func (p *PatroniMember) Create(ctx context.Context, rc *resource.Context) error
- func (p *PatroniMember) Delete(ctx context.Context, rc *resource.Context) error
- func (p *PatroniMember) Dependencies() []resource.Identifier
- func (p *PatroniMember) DiffIgnore() []string
- func (p *PatroniMember) Executor() resource.Executor
- func (p *PatroniMember) Identifier() resource.Identifier
- func (p *PatroniMember) Refresh(ctx context.Context, rc *resource.Context) error
- func (p *PatroniMember) ResourceVersion() string
- func (p *PatroniMember) Update(ctx context.Context, rc *resource.Context) error
- type PgBackRestConfig
- func (c *PgBackRestConfig) BaseName() string
- func (c *PgBackRestConfig) ContainerPath() string
- func (c *PgBackRestConfig) Create(ctx context.Context, rc *resource.Context) error
- func (c *PgBackRestConfig) Delete(ctx context.Context, rc *resource.Context) error
- func (c *PgBackRestConfig) Dependencies() []resource.Identifier
- func (c *PgBackRestConfig) DiffIgnore() []string
- func (c *PgBackRestConfig) Executor() resource.Executor
- func (c *PgBackRestConfig) HostPath(rc *resource.Context) (string, error)
- func (c *PgBackRestConfig) Identifier() resource.Identifier
- func (c *PgBackRestConfig) Refresh(ctx context.Context, rc *resource.Context) error
- func (c *PgBackRestConfig) ResourceVersion() string
- func (c *PgBackRestConfig) Update(ctx context.Context, rc *resource.Context) error
- type PgBackRestConfigType
- type PgBackRestRestore
- func (p *PgBackRestRestore) Create(ctx context.Context, rc *resource.Context) error
- func (p *PgBackRestRestore) Delete(ctx context.Context, rc *resource.Context) error
- func (p *PgBackRestRestore) Dependencies() []resource.Identifier
- func (p *PgBackRestRestore) DiffIgnore() []string
- func (p *PgBackRestRestore) Executor() resource.Executor
- func (p *PgBackRestRestore) Identifier() resource.Identifier
- func (p *PgBackRestRestore) Refresh(ctx context.Context, rc *resource.Context) error
- func (p *PgBackRestRestore) ResourceVersion() string
- func (p *PgBackRestRestore) Update(ctx context.Context, rc *resource.Context) error
- type PgBackRestStanza
- func (p *PgBackRestStanza) Create(ctx context.Context, rc *resource.Context) error
- func (p *PgBackRestStanza) Delete(ctx context.Context, rc *resource.Context) error
- func (p *PgBackRestStanza) Dependencies() []resource.Identifier
- func (p *PgBackRestStanza) DiffIgnore() []string
- func (p *PgBackRestStanza) Executor() resource.Executor
- func (p *PgBackRestStanza) Identifier() resource.Identifier
- func (p *PgBackRestStanza) Refresh(ctx context.Context, rc *resource.Context) error
- func (p *PgBackRestStanza) ResourceVersion() string
- func (p *PgBackRestStanza) Update(ctx context.Context, rc *resource.Context) error
- type PostgresCerts
- func (c *PostgresCerts) Create(ctx context.Context, rc *resource.Context) error
- func (c *PostgresCerts) Delete(ctx context.Context, rc *resource.Context) error
- func (c *PostgresCerts) Dependencies() []resource.Identifier
- func (c *PostgresCerts) DiffIgnore() []string
- func (c *PostgresCerts) Executor() resource.Executor
- func (c *PostgresCerts) Identifier() resource.Identifier
- func (c *PostgresCerts) Refresh(ctx context.Context, rc *resource.Context) error
- func (c *PostgresCerts) ResourceVersion() string
- func (c *PostgresCerts) Update(ctx context.Context, rc *resource.Context) error
- type PostgresService
- func (s *PostgresService) Create(ctx context.Context, rc *resource.Context) error
- func (s *PostgresService) Delete(ctx context.Context, rc *resource.Context) error
- func (s *PostgresService) Dependencies() []resource.Identifier
- func (s *PostgresService) DiffIgnore() []string
- func (s *PostgresService) Executor() resource.Executor
- func (s *PostgresService) Identifier() resource.Identifier
- func (s *PostgresService) Refresh(ctx context.Context, rc *resource.Context) error
- func (s *PostgresService) ResourceVersion() string
- func (s *PostgresService) Update(ctx context.Context, rc *resource.Context) error
- type PostgresServiceSpecResource
- func (s *PostgresServiceSpecResource) Create(ctx context.Context, rc *resource.Context) error
- func (s *PostgresServiceSpecResource) Delete(ctx context.Context, rc *resource.Context) error
- func (s *PostgresServiceSpecResource) Dependencies() []resource.Identifier
- func (s *PostgresServiceSpecResource) DiffIgnore() []string
- func (s *PostgresServiceSpecResource) Executor() resource.Executor
- func (s *PostgresServiceSpecResource) Identifier() resource.Identifier
- func (s *PostgresServiceSpecResource) Refresh(ctx context.Context, rc *resource.Context) error
- func (s *PostgresServiceSpecResource) ResourceVersion() string
- func (s *PostgresServiceSpecResource) Update(ctx context.Context, rc *resource.Context) error
- type ScaleDirection
- type ScaleService
- func (s *ScaleService) Create(ctx context.Context, rc *resource.Context) error
- func (s *ScaleService) Delete(ctx context.Context, rc *resource.Context) error
- func (s *ScaleService) Dependencies() []resource.Identifier
- func (s *ScaleService) DiffIgnore() []string
- func (s *ScaleService) Executor() resource.Executor
- func (s *ScaleService) Identifier() resource.Identifier
- func (s *ScaleService) Refresh(ctx context.Context, rc *resource.Context) error
- func (s *ScaleService) ResourceVersion() string
- func (s *ScaleService) Update(ctx context.Context, rc *resource.Context) error
- type Switchover
- func (s *Switchover) Create(ctx context.Context, rc *resource.Context) error
- func (s *Switchover) Delete(ctx context.Context, rc *resource.Context) error
- func (s *Switchover) Dependencies() []resource.Identifier
- func (s *Switchover) DiffIgnore() []string
- func (s *Switchover) Executor() resource.Executor
- func (s *Switchover) Identifier() resource.Identifier
- func (s *Switchover) Refresh(ctx context.Context, rc *resource.Context) error
- func (s *Switchover) ResourceVersion() string
- func (s *Switchover) Update(ctx context.Context, rc *resource.Context) error
- type Versions
Constants ¶
View Source
const (
OverlayDriver = "overlay"
)
View Source
const ResourceTypeCheckWillRestart resource.Type = "swarm.check_will_restart"
View Source
const ResourceTypeEtcdCreds resource.Type = "swarm.etcd_creds"
View Source
const ResourceTypeNetwork resource.Type = "swarm.network"
View Source
const ResourceTypePatroniCluster resource.Type = "swarm.patroni_cluster"
View Source
const ResourceTypePatroniConfig resource.Type = "swarm.patroni_config"
View Source
const ResourceTypePatroniMember resource.Type = "swarm.patroni_member"
View Source
const ResourceTypePgBackRestConfig resource.Type = "swarm.pgbackrest_config"
View Source
const ResourceTypePgBackRestRestore resource.Type = "swarm.pgbackrest_restore"
View Source
const ResourceTypePgBackRestStanza resource.Type = "swarm.pgbackrest_stanza"
View Source
const ResourceTypePostgresCerts resource.Type = "swarm.postgres_certs"
View Source
const ResourceTypePostgresService resource.Type = "swarm.postgres_service"
View Source
const ResourceTypePostgresServiceSpec resource.Type = "swarm.postgres_service_spec"
View Source
const ResourceTypeScaleService resource.Type = "swarm.scale_service"
View Source
const ResourceTypeSwitchover resource.Type = "swarm.switchover"
Variables ¶
View Source
var ( ErrNoPostgresContainer = errors.New("no postgres container found") ErrNoPostgresService = errors.New("no postgres service found") )
Functions ¶
func CheckWillRestartIdentifier ¶
func CheckWillRestartIdentifier(instanceID string) resource.Identifier
func DatabaseServiceSpec ¶
func DatabaseServiceSpec( instance *database.InstanceSpec, options *HostOptions, ) (swarm.ServiceSpec, error)
func EtcdCredsIdentifier ¶
func EtcdCredsIdentifier(instanceID string) resource.Identifier
func GetPostgresContainer ¶
func NetworkResourceIdentifier ¶
func NetworkResourceIdentifier(name string) resource.Identifier
func PatroniClusterResourceIdentifier ¶
func PatroniClusterResourceIdentifier(nodeName string) resource.Identifier
func PatroniConfigIdentifier ¶
func PatroniConfigIdentifier(instanceID string) resource.Identifier
func PatroniMemberResourceIdentifier ¶
func PatroniMemberResourceIdentifier(instanceID string) resource.Identifier
func PgBackRestBackupCmd ¶
func PgBackRestBackupCmd(command string, args ...string) pgbackrest.Cmd
func PgBackRestConfigIdentifier ¶
func PgBackRestConfigIdentifier(instanceID string, configType PgBackRestConfigType) resource.Identifier
func PgBackRestRestoreCmd ¶
func PgBackRestRestoreCmd(command string, args ...string) pgbackrest.Cmd
func PgBackRestRestoreResourceIdentifier ¶
func PgBackRestRestoreResourceIdentifier(instanceID string) resource.Identifier
func PgBackRestStanzaIdentifier ¶
func PgBackRestStanzaIdentifier(nodeName string) resource.Identifier
func PostgresCertsIdentifier ¶
func PostgresCertsIdentifier(instanceID string) resource.Identifier
func PostgresContainerExec ¶
func PostgresServiceResourceIdentifier ¶
func PostgresServiceResourceIdentifier(instanceID string) resource.Identifier
func PostgresServiceSpecResourceIdentifier ¶
func PostgresServiceSpecResourceIdentifier(instanceID string) resource.Identifier
func RegisterResourceTypes ¶
func ScaleServiceResourceIdentifier ¶
func ScaleServiceResourceIdentifier(instanceID string, direction ScaleDirection) resource.Identifier
func SwitchoverResourceIdentifier ¶
func SwitchoverResourceIdentifier(instanceID string) resource.Identifier
Types ¶
type CheckWillRestart ¶
type CheckWillRestart struct {
InstanceID string `json:"instance_id"`
WillRestart bool `json:"will_restart"`
}
func (*CheckWillRestart) Dependencies ¶
func (c *CheckWillRestart) Dependencies() []resource.Identifier
func (*CheckWillRestart) DiffIgnore ¶
func (c *CheckWillRestart) DiffIgnore() []string
func (*CheckWillRestart) Executor ¶
func (c *CheckWillRestart) Executor() resource.Executor
func (*CheckWillRestart) Identifier ¶
func (c *CheckWillRestart) Identifier() resource.Identifier
func (*CheckWillRestart) ResourceVersion ¶
func (c *CheckWillRestart) ResourceVersion() string
type EtcdCreds ¶
type EtcdCreds struct {
InstanceID string `json:"instance_id"`
DatabaseID string `json:"database_id"`
HostID string `json:"host_id"`
NodeName string `json:"node_name"`
ParentID string `json:"parent_id"`
OwnerUID int `json:"owner_uid"`
OwnerGID int `json:"owner_gid"`
Username string `json:"username"`
Password string `json:"password"`
CaCert []byte `json:"ca_cert"`
ClientCert []byte `json:"server_cert"`
ClientKey []byte `json:"server_key"`
}
func (*EtcdCreds) Dependencies ¶
func (c *EtcdCreds) Dependencies() []resource.Identifier
func (*EtcdCreds) DiffIgnore ¶
func (*EtcdCreds) Identifier ¶
func (c *EtcdCreds) Identifier() resource.Identifier
func (*EtcdCreds) ResourceVersion ¶
type HostOptions ¶
type Instance ¶
type Instance struct {
Spec *database.InstanceSpec `json:"spec"`
}
func (*Instance) Dependencies ¶
func (i *Instance) Dependencies() []resource.Identifier
func (*Instance) Identifier ¶
func (i *Instance) Identifier() resource.Identifier
type Network ¶
type Network struct {
Scope string `json:"scope"`
Driver string `json:"driver"`
Allocator Allocator `json:"allocator"`
Name string `json:"name"`
NetworkID string `json:"network_id"`
Subnet netip.Prefix `json:"subnet"`
Gateway netip.Addr `json:"gateway"`
}
func (*Network) Dependencies ¶
func (n *Network) Dependencies() []resource.Identifier
func (*Network) DiffIgnore ¶
func (*Network) Identifier ¶
func (n *Network) Identifier() resource.Identifier
func (*Network) ResourceVersion ¶
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
func NewOrchestrator ¶
func (*Orchestrator) CreatePgBackRestBackup ¶
func (o *Orchestrator) CreatePgBackRestBackup(ctx context.Context, w io.Writer, instanceID string, options *pgbackrest.BackupOptions) error
func (*Orchestrator) GenerateInstanceResources ¶
func (o *Orchestrator) GenerateInstanceResources(spec *database.InstanceSpec) (*database.InstanceResources, error)
func (*Orchestrator) GenerateInstanceRestoreResources ¶
func (o *Orchestrator) GenerateInstanceRestoreResources(spec *database.InstanceSpec, taskID uuid.UUID) (*database.InstanceResources, error)
func (*Orchestrator) GetInstanceConnectionInfo ¶
func (o *Orchestrator) GetInstanceConnectionInfo(ctx context.Context, databaseID, instanceID string) (*database.ConnectionInfo, error)
func (*Orchestrator) PopulateHost ¶
func (*Orchestrator) PopulateHostStatus ¶
func (o *Orchestrator) PopulateHostStatus(ctx context.Context, status *host.HostStatus) error
func (*Orchestrator) StartInstance ¶
func (o *Orchestrator) StartInstance( ctx context.Context, instanceID string, ) error
func (*Orchestrator) StopInstance ¶
func (o *Orchestrator) StopInstance( ctx context.Context, instanceID string, ) error
func (*Orchestrator) ValidateInstanceSpecs ¶
func (o *Orchestrator) ValidateInstanceSpecs(ctx context.Context, changes []*database.InstanceSpecChange) ([]*database.ValidationResult, error)
func (*Orchestrator) WorkerQueues ¶
func (o *Orchestrator) WorkerQueues() ([]workflow.Queue, error)
type PatroniCluster ¶
type PatroniCluster struct {
DatabaseID string `json:"database_id"`
NodeName string `json:"node_name"`
PatroniClusterPrefix string `json:"patroni_namespace"`
}
func (*PatroniCluster) Dependencies ¶
func (p *PatroniCluster) Dependencies() []resource.Identifier
func (*PatroniCluster) DiffIgnore ¶
func (p *PatroniCluster) DiffIgnore() []string
func (*PatroniCluster) Executor ¶
func (p *PatroniCluster) Executor() resource.Executor
func (*PatroniCluster) Identifier ¶
func (p *PatroniCluster) Identifier() resource.Identifier
func (*PatroniCluster) ResourceVersion ¶
func (p *PatroniCluster) ResourceVersion() string
type PatroniConfig ¶
type PatroniConfig struct {
Spec *database.InstanceSpec `json:"spec"`
ParentID string `json:"parent_id"`
HostCPUs float64 `json:"host_cpus"`
HostMemoryBytes uint64 `json:"host_memory_bytes"`
BridgeNetworkInfo *docker.NetworkInfo `json:"host_network_info"`
DatabaseNetworkName string `json:"database_network_name"`
OwnerUID int `json:"owner_uid"`
OwnerGID int `json:"owner_gid"`
InstanceHostname string `json:"instance_hostname"`
}
func (*PatroniConfig) Dependencies ¶
func (c *PatroniConfig) Dependencies() []resource.Identifier
func (*PatroniConfig) DiffIgnore ¶
func (c *PatroniConfig) DiffIgnore() []string
func (*PatroniConfig) Executor ¶
func (c *PatroniConfig) Executor() resource.Executor
func (*PatroniConfig) Identifier ¶
func (c *PatroniConfig) Identifier() resource.Identifier
func (*PatroniConfig) ResourceVersion ¶
func (c *PatroniConfig) ResourceVersion() string
type PatroniMember ¶
type PatroniMember struct {
DatabaseID string `json:"database_id"`
NodeName string `json:"node_name"`
InstanceID string `json:"instance_id"`
}
func (*PatroniMember) Dependencies ¶
func (p *PatroniMember) Dependencies() []resource.Identifier
func (*PatroniMember) DiffIgnore ¶
func (p *PatroniMember) DiffIgnore() []string
func (*PatroniMember) Executor ¶
func (p *PatroniMember) Executor() resource.Executor
func (*PatroniMember) Identifier ¶
func (p *PatroniMember) Identifier() resource.Identifier
func (*PatroniMember) ResourceVersion ¶
func (p *PatroniMember) ResourceVersion() string
type PgBackRestConfig ¶
type PgBackRestConfig struct {
InstanceID string `json:"instance_id"`
HostID string `json:"host_id"`
DatabaseID string `json:"database_id"`
NodeName string `json:"node_name"`
Repositories []*pgbackrest.Repository `json:"repositories"`
ParentID string `json:"parent_id"`
Type PgBackRestConfigType `json:"type"`
OwnerUID int `json:"owner_uid"`
OwnerGID int `json:"owner_gid"`
}
func (*PgBackRestConfig) BaseName ¶
func (c *PgBackRestConfig) BaseName() string
func (*PgBackRestConfig) ContainerPath ¶
func (c *PgBackRestConfig) ContainerPath() string
func (*PgBackRestConfig) Dependencies ¶
func (c *PgBackRestConfig) Dependencies() []resource.Identifier
func (*PgBackRestConfig) DiffIgnore ¶
func (c *PgBackRestConfig) DiffIgnore() []string
func (*PgBackRestConfig) Executor ¶
func (c *PgBackRestConfig) Executor() resource.Executor
func (*PgBackRestConfig) HostPath ¶
func (c *PgBackRestConfig) HostPath(rc *resource.Context) (string, error)
func (*PgBackRestConfig) Identifier ¶
func (c *PgBackRestConfig) Identifier() resource.Identifier
func (*PgBackRestConfig) ResourceVersion ¶
func (c *PgBackRestConfig) ResourceVersion() string
type PgBackRestConfigType ¶
type PgBackRestConfigType string
const ( PgBackRestConfigTypeBackup PgBackRestConfigType = "backup" PgBackRestConfigTypeRestore PgBackRestConfigType = "restore" )
func (PgBackRestConfigType) String ¶
func (t PgBackRestConfigType) String() string
type PgBackRestRestore ¶
type PgBackRestRestore struct {
DatabaseID string `json:"database_id"`
HostID string `json:"host_id"`
InstanceID string `json:"instance_id"`
TaskID uuid.UUID `json:"task_id"`
NodeName string `json:"node_name"`
DataDirID string `json:"data_dir_id"`
RestoreOptions map[string]string `json:"restore_options"`
}
func (*PgBackRestRestore) Dependencies ¶
func (p *PgBackRestRestore) Dependencies() []resource.Identifier
func (*PgBackRestRestore) DiffIgnore ¶
func (p *PgBackRestRestore) DiffIgnore() []string
func (*PgBackRestRestore) Executor ¶
func (p *PgBackRestRestore) Executor() resource.Executor
func (*PgBackRestRestore) Identifier ¶
func (p *PgBackRestRestore) Identifier() resource.Identifier
func (*PgBackRestRestore) ResourceVersion ¶
func (p *PgBackRestRestore) ResourceVersion() string
type PgBackRestStanza ¶
type PgBackRestStanza struct {
NodeName string `json:"node_name"`
}
func (*PgBackRestStanza) Dependencies ¶
func (p *PgBackRestStanza) Dependencies() []resource.Identifier
func (*PgBackRestStanza) DiffIgnore ¶
func (p *PgBackRestStanza) DiffIgnore() []string
func (*PgBackRestStanza) Executor ¶
func (p *PgBackRestStanza) Executor() resource.Executor
func (*PgBackRestStanza) Identifier ¶
func (p *PgBackRestStanza) Identifier() resource.Identifier
func (*PgBackRestStanza) ResourceVersion ¶
func (p *PgBackRestStanza) ResourceVersion() string
type PostgresCerts ¶
type PostgresCerts struct {
InstanceID string `json:"instance_id"`
HostID string `json:"host_id"`
InstanceHostname string `json:"instance_hostname"`
ParentID string `json:"parent_id"`
OwnerUID int `json:"owner_uid"`
OwnerGID int `json:"owner_gid"`
CaCert []byte `json:"ca_cert"`
ServerCert []byte `json:"server_cert"`
ServerKey []byte `json:"server_key"`
SuperuserCert []byte `json:"superuser_cert"`
SuperuserKey []byte `json:"superuser_key"`
ReplicationCert []byte `json:"replication_cert"`
ReplicationKey []byte `json:"replication_key"`
}
func (*PostgresCerts) Dependencies ¶
func (c *PostgresCerts) Dependencies() []resource.Identifier
func (*PostgresCerts) DiffIgnore ¶
func (c *PostgresCerts) DiffIgnore() []string
func (*PostgresCerts) Executor ¶
func (c *PostgresCerts) Executor() resource.Executor
func (*PostgresCerts) Identifier ¶
func (c *PostgresCerts) Identifier() resource.Identifier
func (*PostgresCerts) ResourceVersion ¶
func (c *PostgresCerts) ResourceVersion() string
type PostgresService ¶
type PostgresService struct {
InstanceID string `json:"instance_id"`
ServiceName string `json:"service_name"`
ServiceID string `json:"service_id"`
NeedsUpdate bool `json:"needs_update"`
}
func (*PostgresService) Dependencies ¶
func (s *PostgresService) Dependencies() []resource.Identifier
func (*PostgresService) DiffIgnore ¶
func (s *PostgresService) DiffIgnore() []string
func (*PostgresService) Executor ¶
func (s *PostgresService) Executor() resource.Executor
func (*PostgresService) Identifier ¶
func (s *PostgresService) Identifier() resource.Identifier
func (*PostgresService) ResourceVersion ¶
func (s *PostgresService) ResourceVersion() string
type PostgresServiceSpecResource ¶
type PostgresServiceSpecResource struct {
Instance *database.InstanceSpec `json:"instance"`
CohortMemberID string `json:"cohort_member_id"`
Images *Images `json:"images"`
ServiceName string `json:"service_name"`
InstanceHostname string `json:"instance_hostname"`
Spec swarm.ServiceSpec `json:"spec"`
DatabaseNetworkName string `json:"database_network_name"`
DataDirID string `json:"data_dir_id"`
ConfigsDirID string `json:"configs_dir_id"`
CertificatesDirID string `json:"certificates_dir_id"`
}
func (*PostgresServiceSpecResource) Dependencies ¶
func (s *PostgresServiceSpecResource) Dependencies() []resource.Identifier
func (*PostgresServiceSpecResource) DiffIgnore ¶
func (s *PostgresServiceSpecResource) DiffIgnore() []string
func (*PostgresServiceSpecResource) Executor ¶
func (s *PostgresServiceSpecResource) Executor() resource.Executor
func (*PostgresServiceSpecResource) Identifier ¶
func (s *PostgresServiceSpecResource) Identifier() resource.Identifier
func (*PostgresServiceSpecResource) ResourceVersion ¶
func (s *PostgresServiceSpecResource) ResourceVersion() string
type ScaleDirection ¶
type ScaleDirection string
const ( ScaleDirectionUP ScaleDirection = "up" ScaleDirectionDOWN ScaleDirection = "down" )
type ScaleService ¶
type ScaleService struct {
InstanceID string `json:"instance_id"`
ScaleDirection ScaleDirection `json:"scale_direction"`
Deps []resource.Identifier `json:"deps"`
}
func (*ScaleService) Dependencies ¶
func (s *ScaleService) Dependencies() []resource.Identifier
func (*ScaleService) DiffIgnore ¶
func (s *ScaleService) DiffIgnore() []string
func (*ScaleService) Executor ¶
func (s *ScaleService) Executor() resource.Executor
func (*ScaleService) Identifier ¶
func (s *ScaleService) Identifier() resource.Identifier
func (*ScaleService) ResourceVersion ¶
func (s *ScaleService) ResourceVersion() string
type Switchover ¶
func (*Switchover) Dependencies ¶
func (s *Switchover) Dependencies() []resource.Identifier
func (*Switchover) DiffIgnore ¶
func (s *Switchover) DiffIgnore() []string
func (*Switchover) Executor ¶
func (s *Switchover) Executor() resource.Executor
func (*Switchover) Identifier ¶
func (s *Switchover) Identifier() resource.Identifier
func (*Switchover) ResourceVersion ¶
func (s *Switchover) ResourceVersion() string
type Versions ¶
type Versions struct {
// contains filtered or unexported fields
}
func NewVersions ¶
func (*Versions) Default ¶
func (v *Versions) Default() *host.PgEdgeVersion
func (*Versions) GetImages ¶
func (v *Versions) GetImages(version *host.PgEdgeVersion) (*Images, error)
func (*Versions) Supported ¶
func (v *Versions) Supported() []*host.PgEdgeVersion
Source Files
¶
- check_will_restart.go
- etcd_creds.go
- images.go
- instance.go
- network.go
- orchestrator.go
- patroni_cluster.go
- patroni_config.go
- patroni_member.go
- pgbackrest_config.go
- pgbackrest_restore.go
- pgbackrest_stanza.go
- postgres_certs.go
- postgres_service.go
- postgres_service_spec.go
- provide.go
- resources.go
- scale_service.go
- spec.go
- switchover.go
- utils.go
Click to show internal directories.
Click to hide internal directories.