postgres

package
v0.3.40 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Duration10s, _      = time.ParseDuration("10s")
	Duration15s, _      = time.ParseDuration("15s")
	CheckPathConnection = "/flycheck/connection"
	CheckPathRole       = "/flycheck/role"
	CheckPathVm         = "/flycheck/vm"
)

Functions

func AttachCluster added in v0.0.421

func AttachCluster(ctx context.Context, params AttachParams) error

AttachCluster is mean't to be called from an external package.

func CreateCluster added in v0.0.421

func CreateCluster(ctx context.Context, org *fly.Organization, region *fly.Region, params *ClusterParams) (err error)

CreateCluster creates a Postgres cluster with an optional name. The name will be prompted for if not supplied.

func ExecOnLeader added in v0.2.100

func ExecOnLeader(ctx context.Context, client *flaps.Client, command string) error

Runs a command on the leader of the named cluster.

func ExecOnMachine added in v0.2.100

func ExecOnMachine(ctx context.Context, client *flaps.Client, machineId, command string) error

Runs a command on the specified machine ID in the named app.

func IsFlex added in v0.0.457

func IsFlex(machine *fly.Machine) bool

func MachineVMSizes added in v0.0.388

func MachineVMSizes() []fly.VMSize

machineVMSizes represents the available VM configurations for Machines.

func New

func New() *cobra.Command

func UnregisterMember added in v0.0.451

func UnregisterMember(ctx context.Context, app *fly.AppCompact, machine *fly.Machine) error

Types

type AttachParams added in v0.0.421

type AttachParams struct {
	DbName       string
	AppName      string
	PgAppName    string
	DbUser       string
	VariableName string
	SuperUser    bool
	Force        bool
}

type ClusterParams added in v0.0.421

type ClusterParams struct {
	PostgresConfiguration
	Password    string
	SnapshotID  string
	Detach      bool
	Manager     string
	ForkFrom    string
	Autostart   bool
	ScaleToZero *bool
}

type PostgresConfiguration

type PostgresConfiguration struct {
	Name               string
	Description        string
	ImageRef           string
	InitialClusterSize int
	VMSize             string
	MemoryMb           int
	DiskGb             int
}

Jump to

Keyboard shortcuts

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