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 GenerateEmptyTokenFile() ([]byte, error)
- func GenerateEmptyUserFile() ([]byte, error)
- func GenerateMCPConfig(params *MCPConfigParams) ([]byte, error)
- func GenerateTokenFile(initToken string) ([]byte, error)
- func GenerateUserFile(users []database.MCPServiceUser) ([]byte, error)
- func GetPostgresContainer(ctx context.Context, dockerClient *docker.Docker, instanceID string) (types.Container, error)
- func GetServiceContainer(ctx context.Context, dockerClient *docker.Docker, serviceInstanceID string) (types.Container, error)
- func MCPConfigResourceIdentifier(serviceInstanceID string) resource.Identifier
- 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 ServiceContainerSpec(opts *ServiceContainerSpecOptions) (swarm.ServiceSpec, error)
- func ServiceInstanceName(serviceType, databaseID, serviceID, hostID string) string
- func ServiceInstanceResourceIdentifier(serviceInstanceID string) resource.Identifier
- func ServiceInstanceSpecResourceIdentifier(serviceInstanceID string) resource.Identifier
- func ServiceUserRoleIdentifier(serviceInstanceID string, mode string) resource.Identifier
- func ServiceUserRolePerNodeIdentifier(serviceID, mode, nodeName string) 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) TypeDependencies() []resource.Type
- 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) TypeDependencies() []resource.Type
- func (c *EtcdCreds) Update(ctx context.Context, rc *resource.Context) error
- type HostOptions
- type Images
- type Instance
- type MCPConfigParams
- type MCPConfigResource
- func (r *MCPConfigResource) Create(ctx context.Context, rc *resource.Context) error
- func (r *MCPConfigResource) Delete(ctx context.Context, rc *resource.Context) error
- func (r *MCPConfigResource) Dependencies() []resource.Identifier
- func (r *MCPConfigResource) DiffIgnore() []string
- func (r *MCPConfigResource) Executor() resource.Executor
- func (r *MCPConfigResource) Identifier() resource.Identifier
- func (r *MCPConfigResource) Refresh(ctx context.Context, rc *resource.Context) error
- func (r *MCPConfigResource) ResourceVersion() string
- func (r *MCPConfigResource) TypeDependencies() []resource.Type
- func (r *MCPConfigResource) Update(ctx context.Context, rc *resource.Context) error
- 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) TypeDependencies() []resource.Type
- 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) GenerateServiceInstanceResources(spec *database.ServiceInstanceSpec) (*database.ServiceInstanceResources, error)
- func (o *Orchestrator) GetInstanceConnectionInfo(ctx context.Context, databaseID, instanceID string) (*database.ConnectionInfo, error)
- func (o *Orchestrator) GetServiceInstanceStatus(ctx context.Context, serviceInstanceID string) (*database.ServiceInstanceStatus, 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) TypeDependencies() []resource.Type
- 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 (r *PatroniConfig) TypeDependencies() []resource.Type
- 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) TypeDependencies() []resource.Type
- 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) TypeDependencies() []resource.Type
- 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) TypeDependencies() []resource.Type
- 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) TypeDependencies() []resource.Type
- 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) TypeDependencies() []resource.Type
- 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) TypeDependencies() []resource.Type
- 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) TypeDependencies() []resource.Type
- 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) TypeDependencies() []resource.Type
- func (s *ScaleService) Update(ctx context.Context, rc *resource.Context) error
- type ServiceContainerSpecOptions
- type ServiceImage
- type ServiceInstanceResource
- func (s *ServiceInstanceResource) Create(ctx context.Context, rc *resource.Context) error
- func (s *ServiceInstanceResource) Delete(ctx context.Context, rc *resource.Context) error
- func (s *ServiceInstanceResource) Dependencies() []resource.Identifier
- func (s *ServiceInstanceResource) DiffIgnore() []string
- func (s *ServiceInstanceResource) Executor() resource.Executor
- func (s *ServiceInstanceResource) Identifier() resource.Identifier
- func (s *ServiceInstanceResource) Refresh(ctx context.Context, rc *resource.Context) error
- func (s *ServiceInstanceResource) ResourceVersion() string
- func (s *ServiceInstanceResource) TypeDependencies() []resource.Type
- func (s *ServiceInstanceResource) Update(ctx context.Context, rc *resource.Context) error
- type ServiceInstanceSpecResource
- func (s *ServiceInstanceSpecResource) Create(ctx context.Context, rc *resource.Context) error
- func (s *ServiceInstanceSpecResource) Delete(ctx context.Context, rc *resource.Context) error
- func (s *ServiceInstanceSpecResource) Dependencies() []resource.Identifier
- func (s *ServiceInstanceSpecResource) DiffIgnore() []string
- func (s *ServiceInstanceSpecResource) Executor() resource.Executor
- func (s *ServiceInstanceSpecResource) Identifier() resource.Identifier
- func (s *ServiceInstanceSpecResource) Refresh(ctx context.Context, rc *resource.Context) error
- func (s *ServiceInstanceSpecResource) ResourceVersion() string
- func (s *ServiceInstanceSpecResource) TypeDependencies() []resource.Type
- func (s *ServiceInstanceSpecResource) Update(ctx context.Context, rc *resource.Context) error
- type ServiceUserRole
- func (r *ServiceUserRole) Create(ctx context.Context, rc *resource.Context) error
- func (r *ServiceUserRole) Delete(ctx context.Context, rc *resource.Context) error
- func (r *ServiceUserRole) Dependencies() []resource.Identifier
- func (r *ServiceUserRole) DiffIgnore() []string
- func (r *ServiceUserRole) Executor() resource.Executor
- func (r *ServiceUserRole) Identifier() resource.Identifier
- func (r *ServiceUserRole) Refresh(ctx context.Context, rc *resource.Context) error
- func (r *ServiceUserRole) ResourceVersion() string
- func (r *ServiceUserRole) TypeDependencies() []resource.Type
- func (r *ServiceUserRole) Update(ctx context.Context, rc *resource.Context) error
- type ServiceVersions
- 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) TypeDependencies() []resource.Type
- func (s *Switchover) Update(ctx context.Context, rc *resource.Context) error
- type Versions
Constants ¶
const ( ServiceUserRoleRO = "ro" ServiceUserRoleRW = "rw" )
const (
OverlayDriver = "overlay"
)
const ResourceTypeCheckWillRestart resource.Type = "swarm.check_will_restart"
const ResourceTypeEtcdCreds resource.Type = "swarm.etcd_creds"
const ResourceTypeMCPConfig resource.Type = "swarm.mcp_config"
const ResourceTypeNetwork resource.Type = "swarm.network"
const ResourceTypePatroniCluster resource.Type = "swarm.patroni_cluster"
const ResourceTypePatroniConfig resource.Type = "swarm.patroni_config"
const ResourceTypePatroniMember resource.Type = "swarm.patroni_member"
const ResourceTypePgBackRestConfig resource.Type = "swarm.pgbackrest_config"
const ResourceTypePgBackRestRestore resource.Type = "swarm.pgbackrest_restore"
const ResourceTypePgBackRestStanza resource.Type = "swarm.pgbackrest_stanza"
const ResourceTypePostgresCerts resource.Type = "swarm.postgres_certs"
const ResourceTypePostgresService resource.Type = "swarm.postgres_service"
const ResourceTypePostgresServiceSpec resource.Type = "swarm.postgres_service_spec"
const ResourceTypeScaleService resource.Type = "swarm.scale_service"
const ResourceTypeServiceInstance resource.Type = database.ResourceTypeServiceInstance
const ResourceTypeServiceInstanceSpec resource.Type = "swarm.service_instance_spec"
const ResourceTypeServiceUserRole resource.Type = "swarm.service_user_role"
const ResourceTypeSwitchover resource.Type = "swarm.switchover"
Variables ¶
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 GenerateEmptyTokenFile ¶ added in v0.7.0
GenerateEmptyTokenFile generates an empty but valid tokens.yaml file.
func GenerateEmptyUserFile ¶ added in v0.7.0
GenerateEmptyUserFile generates an empty but valid users.yaml file.
func GenerateMCPConfig ¶ added in v0.7.0
func GenerateMCPConfig(params *MCPConfigParams) ([]byte, error)
GenerateMCPConfig generates the YAML config file content for the MCP server.
func GenerateTokenFile ¶ added in v0.7.0
GenerateTokenFile generates a tokens.yaml file from the given init token. The token is SHA256-hashed to match the MCP server's auth.HashToken() format.
func GenerateUserFile ¶ added in v0.7.0
func GenerateUserFile(users []database.MCPServiceUser) ([]byte, error)
GenerateUserFile generates a users.yaml file from the given bootstrap users. Passwords are bcrypt-hashed with cost 12 to match the MCP server's auth.HashPassword() format.
func GetPostgresContainer ¶
func GetServiceContainer ¶ added in v0.7.0
func MCPConfigResourceIdentifier ¶ added in v0.7.0
func MCPConfigResourceIdentifier(serviceInstanceID string) resource.Identifier
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 ServiceContainerSpec ¶ added in v0.7.0
func ServiceContainerSpec(opts *ServiceContainerSpecOptions) (swarm.ServiceSpec, error)
ServiceContainerSpec builds a Docker Swarm service spec for a service instance.
func ServiceInstanceName ¶ added in v0.7.0
ServiceInstanceName generates a Docker Swarm service name for a service instance. It follows the same host ID hashing convention used for Postgres instance IDs (see database.InstanceIDFor), producing shorter, more readable names when host IDs are UUIDs.
func ServiceInstanceResourceIdentifier ¶ added in v0.7.0
func ServiceInstanceResourceIdentifier(serviceInstanceID string) resource.Identifier
func ServiceInstanceSpecResourceIdentifier ¶ added in v0.7.0
func ServiceInstanceSpecResourceIdentifier(serviceInstanceID string) resource.Identifier
func ServiceUserRoleIdentifier ¶ added in v0.7.0
func ServiceUserRoleIdentifier(serviceInstanceID string, mode string) resource.Identifier
func ServiceUserRolePerNodeIdentifier ¶ added in v0.7.0
func ServiceUserRolePerNodeIdentifier(serviceID, mode, nodeName string) 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
func (*CheckWillRestart) TypeDependencies ¶ added in v0.7.0
func (c *CheckWillRestart) TypeDependencies() []resource.Type
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 ¶
func (*EtcdCreds) TypeDependencies ¶ added in v0.7.0
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 MCPConfigParams ¶ added in v0.7.0
type MCPConfigParams struct {
Config *database.MCPServiceConfig
DatabaseName string
DatabaseHosts []database.ServiceHostEntry
TargetSessionAttrs string
Username string
Password string
}
MCPConfigParams holds all inputs needed to generate a config.yaml for the MCP server.
type MCPConfigResource ¶ added in v0.7.0
type MCPConfigResource struct {
ServiceInstanceID string `json:"service_instance_id"`
ServiceID string `json:"service_id"`
HostID string `json:"host_id"`
DirResourceID string `json:"dir_resource_id"`
Config *database.MCPServiceConfig `json:"config"`
DatabaseName string `json:"database_name"`
DatabaseHosts []database.ServiceHostEntry `json:"database_hosts"`
TargetSessionAttrs string `json:"target_session_attrs"`
ROUsername string `json:"ro_username"`
ROPassword string `json:"ro_password"`
RWUsername string `json:"rw_username"`
RWPassword string `json:"rw_password"`
}
MCPConfigResource manages the MCP server config files on the host filesystem. It follows the same pattern as PatroniConfig: generates config files and writes them to a host-side directory that is bind-mounted into the container.
Files managed:
- config.yaml: CP-owned, overwritten on every Create/Update
- tokens.yaml: Application-owned, written only on first Create if init_token is set
- users.yaml: Application-owned, written only on first Create if init_users is set
func (*MCPConfigResource) Dependencies ¶ added in v0.7.0
func (r *MCPConfigResource) Dependencies() []resource.Identifier
func (*MCPConfigResource) DiffIgnore ¶ added in v0.7.0
func (r *MCPConfigResource) DiffIgnore() []string
func (*MCPConfigResource) Executor ¶ added in v0.7.0
func (r *MCPConfigResource) Executor() resource.Executor
func (*MCPConfigResource) Identifier ¶ added in v0.7.0
func (r *MCPConfigResource) Identifier() resource.Identifier
func (*MCPConfigResource) ResourceVersion ¶ added in v0.7.0
func (r *MCPConfigResource) ResourceVersion() string
func (*MCPConfigResource) TypeDependencies ¶ added in v0.7.0
func (r *MCPConfigResource) TypeDependencies() []resource.Type
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 ¶
func (*Network) TypeDependencies ¶ added in v0.7.0
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) GenerateServiceInstanceResources ¶ added in v0.7.0
func (o *Orchestrator) GenerateServiceInstanceResources(spec *database.ServiceInstanceSpec) (*database.ServiceInstanceResources, error)
func (*Orchestrator) GetInstanceConnectionInfo ¶
func (o *Orchestrator) GetInstanceConnectionInfo(ctx context.Context, databaseID, instanceID string) (*database.ConnectionInfo, error)
func (*Orchestrator) GetServiceInstanceStatus ¶ added in v0.7.0
func (o *Orchestrator) GetServiceInstanceStatus(ctx context.Context, serviceInstanceID string) (*database.ServiceInstanceStatus, 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
func (*PatroniCluster) TypeDependencies ¶ added in v0.7.0
func (p *PatroniCluster) TypeDependencies() []resource.Type
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
func (*PatroniConfig) TypeDependencies ¶ added in v0.7.0
func (r *PatroniConfig) TypeDependencies() []resource.Type
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
func (*PatroniMember) TypeDependencies ¶ added in v0.7.0
func (p *PatroniMember) TypeDependencies() []resource.Type
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
func (*PgBackRestConfig) TypeDependencies ¶ added in v0.7.0
func (c *PgBackRestConfig) TypeDependencies() []resource.Type
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
func (*PgBackRestRestore) TypeDependencies ¶ added in v0.7.0
func (p *PgBackRestRestore) TypeDependencies() []resource.Type
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
func (*PgBackRestStanza) TypeDependencies ¶ added in v0.7.0
func (p *PgBackRestStanza) TypeDependencies() []resource.Type
type PostgresCerts ¶
type PostgresCerts struct {
InstanceID string `json:"instance_id"`
HostID string `json:"host_id"`
InstanceAddresses []string `json:"instance_addresses"`
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
func (*PostgresCerts) TypeDependencies ¶ added in v0.7.0
func (c *PostgresCerts) TypeDependencies() []resource.Type
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
func (*PostgresService) TypeDependencies ¶ added in v0.7.0
func (s *PostgresService) TypeDependencies() []resource.Type
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
func (*PostgresServiceSpecResource) TypeDependencies ¶ added in v0.7.0
func (s *PostgresServiceSpecResource) TypeDependencies() []resource.Type
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
func (*ScaleService) TypeDependencies ¶ added in v0.7.0
func (s *ScaleService) TypeDependencies() []resource.Type
type ServiceContainerSpecOptions ¶ added in v0.7.0
type ServiceContainerSpecOptions struct {
ServiceSpec *database.ServiceSpec
ServiceInstanceID string
DatabaseID string
DatabaseName string
HostID string
ServiceName string
Hostname string
CohortMemberID string
ServiceImage *ServiceImage
Credentials *database.ServiceUser
DatabaseNetworkID string
// Service port configuration
Port *int
// DataPath is the host-side directory path for the bind mount
DataPath string
}
ServiceContainerSpecOptions contains all parameters needed to build a service container spec.
type ServiceImage ¶ added in v0.7.0
type ServiceImage struct {
Tag string `json:"tag"`
PostgresConstraint *host.VersionConstraint `json:"postgres_constraint,omitempty"`
SpockConstraint *host.VersionConstraint `json:"spock_constraint,omitempty"`
}
ServiceImage describes a container image for a service type+version, along with optional version constraints that restrict which Postgres and Spock versions the service is compatible with.
func (*ServiceImage) ValidateCompatibility ¶ added in v0.7.0
func (s *ServiceImage) ValidateCompatibility(postgres, spock *host.Version) error
ValidateCompatibility checks that the given Postgres and Spock versions satisfy this image's version constraints. Returns nil if compatible.
type ServiceInstanceResource ¶ added in v0.7.0
type ServiceInstanceResource struct {
ServiceInstanceID string `json:"service_instance_id"`
DatabaseID string `json:"database_id"`
ServiceName string `json:"service_name"`
ServiceID string `json:"service_id"` // Docker Swarm service ID (set by Refresh)
ServiceSpecID string `json:"service_spec_id"` // Logical service ID from the spec (e.g. "mcp-server")
HostID string `json:"host_id"`
NeedsUpdate bool `json:"needs_update"`
}
func (*ServiceInstanceResource) Dependencies ¶ added in v0.7.0
func (s *ServiceInstanceResource) Dependencies() []resource.Identifier
func (*ServiceInstanceResource) DiffIgnore ¶ added in v0.7.0
func (s *ServiceInstanceResource) DiffIgnore() []string
func (*ServiceInstanceResource) Executor ¶ added in v0.7.0
func (s *ServiceInstanceResource) Executor() resource.Executor
func (*ServiceInstanceResource) Identifier ¶ added in v0.7.0
func (s *ServiceInstanceResource) Identifier() resource.Identifier
func (*ServiceInstanceResource) ResourceVersion ¶ added in v0.7.0
func (s *ServiceInstanceResource) ResourceVersion() string
func (*ServiceInstanceResource) TypeDependencies ¶ added in v0.7.0
func (s *ServiceInstanceResource) TypeDependencies() []resource.Type
type ServiceInstanceSpecResource ¶ added in v0.7.0
type ServiceInstanceSpecResource struct {
ServiceInstanceID string `json:"service_instance_id"`
ServiceSpec *database.ServiceSpec `json:"service_spec"`
DatabaseID string `json:"database_id"`
DatabaseName string `json:"database_name"`
HostID string `json:"host_id"`
ServiceName string `json:"service_name"`
Hostname string `json:"hostname"`
CohortMemberID string `json:"cohort_member_id"`
ServiceImage *ServiceImage `json:"service_image"`
Credentials *database.ServiceUser `json:"credentials"`
DatabaseNetworkID string `json:"database_network_id"`
DatabaseHosts []database.ServiceHostEntry `json:"database_hosts"` // Ordered Postgres host:port entries
TargetSessionAttrs string `json:"target_session_attrs"` // libpq target_session_attrs
Port *int `json:"port"` // Service published port (optional, 0 = random)
DataDirID string `json:"data_dir_id"` // DirResource ID for the service data directory
Spec swarm.ServiceSpec `json:"spec"`
}
func (*ServiceInstanceSpecResource) Dependencies ¶ added in v0.7.0
func (s *ServiceInstanceSpecResource) Dependencies() []resource.Identifier
func (*ServiceInstanceSpecResource) DiffIgnore ¶ added in v0.7.0
func (s *ServiceInstanceSpecResource) DiffIgnore() []string
func (*ServiceInstanceSpecResource) Executor ¶ added in v0.7.0
func (s *ServiceInstanceSpecResource) Executor() resource.Executor
func (*ServiceInstanceSpecResource) Identifier ¶ added in v0.7.0
func (s *ServiceInstanceSpecResource) Identifier() resource.Identifier
func (*ServiceInstanceSpecResource) ResourceVersion ¶ added in v0.7.0
func (s *ServiceInstanceSpecResource) ResourceVersion() string
func (*ServiceInstanceSpecResource) TypeDependencies ¶ added in v0.7.0
func (s *ServiceInstanceSpecResource) TypeDependencies() []resource.Type
type ServiceUserRole ¶ added in v0.7.0
type ServiceUserRole struct {
ServiceID string `json:"service_id"`
DatabaseID string `json:"database_id"`
DatabaseName string `json:"database_name"`
NodeName string `json:"node_name"` // Database node name for PrimaryExecutor routing
Mode string `json:"mode"` // ServiceUserRoleRO or ServiceUserRoleRW
Username string `json:"username"`
Password string `json:"password"` // Generated on Create, persisted in state
CredentialSource *resource.Identifier `json:"credential_source,omitempty"`
}
ServiceUserRole manages the lifecycle of a database user for a service.
Two ServiceUserRole resources are created per service: one with Mode set to ServiceUserRoleRO (read-only) and one with Mode set to ServiceUserRoleRW (read-write). Mode determines which group role the user is granted membership in: pgedge_application_read_only for RO, or pgedge_application for RW. All permissions are inherited via the group role — no custom grants are applied.
On Create, a deterministic username (incorporating the mode) and a random password are generated, the Postgres role is created with the appropriate group role membership, and the credentials are stored in the resource state. On subsequent reconciliation cycles, credentials are reused from the persisted state (no password regeneration).
When CredentialSource is nil, this is the canonical resource: it generates credentials and runs on the first node. When CredentialSource is non-nil, this is a per-node resource: it reads credentials from the canonical resource and runs on its own node's primary.
func (*ServiceUserRole) Dependencies ¶ added in v0.7.0
func (r *ServiceUserRole) Dependencies() []resource.Identifier
func (*ServiceUserRole) DiffIgnore ¶ added in v0.7.0
func (r *ServiceUserRole) DiffIgnore() []string
func (*ServiceUserRole) Executor ¶ added in v0.7.0
func (r *ServiceUserRole) Executor() resource.Executor
func (*ServiceUserRole) Identifier ¶ added in v0.7.0
func (r *ServiceUserRole) Identifier() resource.Identifier
func (*ServiceUserRole) ResourceVersion ¶ added in v0.7.0
func (r *ServiceUserRole) ResourceVersion() string
func (*ServiceUserRole) TypeDependencies ¶ added in v0.7.0
func (r *ServiceUserRole) TypeDependencies() []resource.Type
type ServiceVersions ¶ added in v0.7.0
type ServiceVersions struct {
// contains filtered or unexported fields
}
func NewServiceVersions ¶ added in v0.7.0
func NewServiceVersions(cfg config.Config) *ServiceVersions
func (*ServiceVersions) GetServiceImage ¶ added in v0.7.0
func (sv *ServiceVersions) GetServiceImage(serviceType string, version string) (*ServiceImage, error)
GetServiceImage returns the full ServiceImage for the given service type and version.
func (*ServiceVersions) SupportedServiceVersions ¶ added in v0.7.0
func (sv *ServiceVersions) SupportedServiceVersions(serviceType string) ([]string, error)
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
func (*Switchover) TypeDependencies ¶ added in v0.7.0
func (s *Switchover) TypeDependencies() []resource.Type
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
- mcp_auth_files.go
- mcp_config.go
- mcp_config_resource.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
- service_images.go
- service_instance.go
- service_instance_spec.go
- service_spec.go
- service_user_role.go
- spec.go
- switchover.go
- utils.go