swarm

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: PostgreSQL Imports: 47 Imported by: 0

Documentation

Index

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 GetPostgresContainer(ctx context.Context, dockerClient *docker.Docker, instanceID string) (types.Container, error)

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 PostgresContainerExec(ctx context.Context, w io.Writer, dockerClient *docker.Docker, instanceID string, cmd []string) error

func PostgresServiceResourceIdentifier

func PostgresServiceResourceIdentifier(instanceID string) resource.Identifier

func PostgresServiceSpecResourceIdentifier

func PostgresServiceSpecResourceIdentifier(instanceID string) resource.Identifier

func Provide

func Provide(i *do.Injector)

func RegisterResourceTypes

func RegisterResourceTypes(registry *resource.Registry)

func ScaleServiceResourceIdentifier

func ScaleServiceResourceIdentifier(instanceID string, direction ScaleDirection) resource.Identifier

func SwitchoverResourceIdentifier

func SwitchoverResourceIdentifier(instanceID string) resource.Identifier

Types

type Allocator

type Allocator struct {
	Prefix netip.Prefix `json:"prefix"`
	Bits   int          `json:"bits"`
}

type CheckWillRestart

type CheckWillRestart struct {
	InstanceID  string `json:"instance_id"`
	WillRestart bool   `json:"will_restart"`
}

func (*CheckWillRestart) Create

func (c *CheckWillRestart) Create(ctx context.Context, rc *resource.Context) error

func (*CheckWillRestart) Delete

func (c *CheckWillRestart) Delete(ctx context.Context, rc *resource.Context) error

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) Refresh

func (c *CheckWillRestart) Refresh(ctx context.Context, rc *resource.Context) error

func (*CheckWillRestart) ResourceVersion

func (c *CheckWillRestart) ResourceVersion() string

func (*CheckWillRestart) Update

func (c *CheckWillRestart) Update(ctx context.Context, rc *resource.Context) error

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) Create

func (c *EtcdCreds) Create(ctx context.Context, rc *resource.Context) error

func (*EtcdCreds) Delete

func (c *EtcdCreds) Delete(ctx context.Context, rc *resource.Context) error

func (*EtcdCreds) Dependencies

func (c *EtcdCreds) Dependencies() []resource.Identifier

func (*EtcdCreds) DiffIgnore

func (c *EtcdCreds) DiffIgnore() []string

func (*EtcdCreds) Executor

func (c *EtcdCreds) Executor() resource.Executor

func (*EtcdCreds) Identifier

func (c *EtcdCreds) Identifier() resource.Identifier

func (*EtcdCreds) Refresh

func (c *EtcdCreds) Refresh(ctx context.Context, rc *resource.Context) error

func (*EtcdCreds) ResourceVersion

func (c *EtcdCreds) ResourceVersion() string

func (*EtcdCreds) Update

func (c *EtcdCreds) Update(ctx context.Context, rc *resource.Context) error

type HostOptions

type HostOptions struct {
	ServiceName       string
	InstanceHostname  string
	DatabaseNetworkID string
	Paths             Paths
	Images            *Images
	CohortMemberID    string
}

type Images

type Images struct {
	PgEdgeImage string
}

type Instance

type Instance struct {
	Spec *database.InstanceSpec `json:"spec"`
}

func (*Instance) Create

func (i *Instance) Create(
	ctx context.Context,
	state *resource.State,
	inj *do.Injector,
) error

func (*Instance) Dependencies

func (i *Instance) Dependencies() []resource.Identifier

func (*Instance) Identifier

func (i *Instance) Identifier() resource.Identifier

func (*Instance) Validate

func (i *Instance) Validate() error

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) Create

func (n *Network) Create(ctx context.Context, rc *resource.Context) error

func (*Network) Delete

func (n *Network) Delete(ctx context.Context, rc *resource.Context) error

func (*Network) Dependencies

func (n *Network) Dependencies() []resource.Identifier

func (*Network) DiffIgnore

func (n *Network) DiffIgnore() []string

func (*Network) Executor

func (n *Network) Executor() resource.Executor

func (*Network) Identifier

func (n *Network) Identifier() resource.Identifier

func (*Network) Refresh

func (n *Network) Refresh(ctx context.Context, rc *resource.Context) error

func (*Network) ResourceVersion

func (n *Network) ResourceVersion() string

func (*Network) Update

func (n *Network) Update(ctx context.Context, rc *resource.Context) error

func (*Network) Validate

func (n *Network) Validate() error

type Orchestrator

type Orchestrator struct {
	// contains filtered or unexported fields
}

func NewOrchestrator

func NewOrchestrator(
	ctx context.Context,
	cfg config.Config,
	d *docker.Docker,
	logger zerolog.Logger,
) (*Orchestrator, error)

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 (o *Orchestrator) PopulateHost(ctx context.Context, h *host.Host) error

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 Paths

type Paths struct {
	Configs      string
	Certificates string
	Data         string
}

type PatroniCluster

type PatroniCluster struct {
	DatabaseID           string `json:"database_id"`
	NodeName             string `json:"node_name"`
	PatroniClusterPrefix string `json:"patroni_namespace"`
}

func (*PatroniCluster) Create

func (p *PatroniCluster) Create(ctx context.Context, rc *resource.Context) error

func (*PatroniCluster) Delete

func (p *PatroniCluster) Delete(ctx context.Context, rc *resource.Context) error

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) Refresh

func (p *PatroniCluster) Refresh(ctx context.Context, rc *resource.Context) error

func (*PatroniCluster) ResourceVersion

func (p *PatroniCluster) ResourceVersion() string

func (*PatroniCluster) Update

func (p *PatroniCluster) Update(ctx context.Context, rc *resource.Context) error

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) Create

func (c *PatroniConfig) Create(ctx context.Context, rc *resource.Context) error

func (*PatroniConfig) Delete

func (c *PatroniConfig) Delete(ctx context.Context, rc *resource.Context) error

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) Refresh

func (c *PatroniConfig) Refresh(ctx context.Context, rc *resource.Context) error

func (*PatroniConfig) ResourceVersion

func (c *PatroniConfig) ResourceVersion() string

func (*PatroniConfig) Update

func (c *PatroniConfig) Update(ctx context.Context, rc *resource.Context) error

type PatroniMember

type PatroniMember struct {
	DatabaseID string `json:"database_id"`
	NodeName   string `json:"node_name"`
	InstanceID string `json:"instance_id"`
}

func (*PatroniMember) Create

func (p *PatroniMember) Create(ctx context.Context, rc *resource.Context) error

func (*PatroniMember) Delete

func (p *PatroniMember) Delete(ctx context.Context, rc *resource.Context) error

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) Refresh

func (p *PatroniMember) Refresh(ctx context.Context, rc *resource.Context) error

func (*PatroniMember) ResourceVersion

func (p *PatroniMember) ResourceVersion() string

func (*PatroniMember) Update

func (p *PatroniMember) Update(ctx context.Context, rc *resource.Context) error

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) Create

func (c *PgBackRestConfig) Create(ctx context.Context, rc *resource.Context) error

func (*PgBackRestConfig) Delete

func (c *PgBackRestConfig) Delete(ctx context.Context, rc *resource.Context) error

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) Refresh

func (c *PgBackRestConfig) Refresh(ctx context.Context, rc *resource.Context) error

func (*PgBackRestConfig) ResourceVersion

func (c *PgBackRestConfig) ResourceVersion() string

func (*PgBackRestConfig) Update

func (c *PgBackRestConfig) Update(ctx context.Context, rc *resource.Context) error

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) Create

func (p *PgBackRestRestore) Create(ctx context.Context, rc *resource.Context) error

func (*PgBackRestRestore) Delete

func (p *PgBackRestRestore) Delete(ctx context.Context, rc *resource.Context) error

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) Refresh

func (p *PgBackRestRestore) Refresh(ctx context.Context, rc *resource.Context) error

func (*PgBackRestRestore) ResourceVersion

func (p *PgBackRestRestore) ResourceVersion() string

func (*PgBackRestRestore) Update

func (p *PgBackRestRestore) Update(ctx context.Context, rc *resource.Context) error

type PgBackRestStanza

type PgBackRestStanza struct {
	NodeName string `json:"node_name"`
}

func (*PgBackRestStanza) Create

func (p *PgBackRestStanza) Create(ctx context.Context, rc *resource.Context) error

func (*PgBackRestStanza) Delete

func (p *PgBackRestStanza) Delete(ctx context.Context, rc *resource.Context) error

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) Refresh

func (p *PgBackRestStanza) Refresh(ctx context.Context, rc *resource.Context) error

func (*PgBackRestStanza) ResourceVersion

func (p *PgBackRestStanza) ResourceVersion() string

func (*PgBackRestStanza) Update

func (p *PgBackRestStanza) Update(ctx context.Context, rc *resource.Context) error

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) Create

func (c *PostgresCerts) Create(ctx context.Context, rc *resource.Context) error

func (*PostgresCerts) Delete

func (c *PostgresCerts) Delete(ctx context.Context, rc *resource.Context) error

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) Refresh

func (c *PostgresCerts) Refresh(ctx context.Context, rc *resource.Context) error

func (*PostgresCerts) ResourceVersion

func (c *PostgresCerts) ResourceVersion() string

func (*PostgresCerts) Update

func (c *PostgresCerts) Update(ctx context.Context, rc *resource.Context) error

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) Create

func (s *PostgresService) Create(ctx context.Context, rc *resource.Context) error

func (*PostgresService) Delete

func (s *PostgresService) Delete(ctx context.Context, rc *resource.Context) error

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) Refresh

func (s *PostgresService) Refresh(ctx context.Context, rc *resource.Context) error

func (*PostgresService) ResourceVersion

func (s *PostgresService) ResourceVersion() string

func (*PostgresService) Update

func (s *PostgresService) Update(ctx context.Context, rc *resource.Context) error

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) Create

func (*PostgresServiceSpecResource) Delete

func (*PostgresServiceSpecResource) Dependencies

func (s *PostgresServiceSpecResource) Dependencies() []resource.Identifier

func (*PostgresServiceSpecResource) DiffIgnore

func (s *PostgresServiceSpecResource) DiffIgnore() []string

func (*PostgresServiceSpecResource) Executor

func (*PostgresServiceSpecResource) Identifier

func (*PostgresServiceSpecResource) Refresh

func (*PostgresServiceSpecResource) ResourceVersion

func (s *PostgresServiceSpecResource) ResourceVersion() string

func (*PostgresServiceSpecResource) Update

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) Create

func (s *ScaleService) Create(ctx context.Context, rc *resource.Context) error

func (*ScaleService) Delete

func (s *ScaleService) Delete(ctx context.Context, rc *resource.Context) error

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) Refresh

func (s *ScaleService) Refresh(ctx context.Context, rc *resource.Context) error

func (*ScaleService) ResourceVersion

func (s *ScaleService) ResourceVersion() string

func (*ScaleService) Update

func (s *ScaleService) Update(ctx context.Context, rc *resource.Context) error

type Switchover

type Switchover struct {
	HostID     string `json:"host_id"`
	InstanceID string `json:"instance_id"`
}

func (*Switchover) Create

func (s *Switchover) Create(ctx context.Context, rc *resource.Context) error

func (*Switchover) Delete

func (s *Switchover) Delete(ctx context.Context, rc *resource.Context) error

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) Refresh

func (s *Switchover) Refresh(ctx context.Context, rc *resource.Context) error

func (*Switchover) ResourceVersion

func (s *Switchover) ResourceVersion() string

func (*Switchover) Update

func (s *Switchover) Update(ctx context.Context, rc *resource.Context) error

type Versions

type Versions struct {
	// contains filtered or unexported fields
}

func NewVersions

func NewVersions(cfg config.Config) *Versions

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

Jump to

Keyboard shortcuts

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