cmd

package
v0.16.8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdStolonCtl = &cobra.Command{
	Use:     "stolonctl",
	Short:   "stolon command line client",
	Version: cmd.Version,
	PersistentPreRun: func(c *cobra.Command, args []string) {
		if c.Name() != "stolonctl" && c.Name() != "version" {
			if err := cmd.CheckCommonConfig(&cfg.CommonConfig); err != nil {
				die(err.Error())
			}
		}
	},

	Run: func(c *cobra.Command, args []string) { _ = c.Help() },
}
View Source
var Register = &cobra.Command{
	Use:     "register",
	Short:   "Register stolon keepers for service discovery",
	Run:     runRegister,
	Version: cmd.Version,
}

Register command to register stolon master and slave for service discovery

Functions

func Execute

func Execute()

Types

type ClusterSpecDefaults added in v0.16.7

type ClusterSpecDefaults struct {
	SleepInterval                    *cluster.Duration         `json:"sleepInterval"`
	RequestTimeout                   *cluster.Duration         `json:"requestTimeout"`
	ConvergenceTimeout               *cluster.Duration         `json:"convergenceTimeout"`
	InitTimeout                      *cluster.Duration         `json:"initTimeout"`
	SyncTimeout                      *cluster.Duration         `json:"syncTimeout"`
	DBWaitReadyTimeout               *cluster.Duration         `json:"dbWaitReadyTimeout"`
	FailInterval                     *cluster.Duration         `json:"failInterval"`
	DeadKeeperRemovalInterval        *cluster.Duration         `json:"deadKeeperRemovalInterval"`
	ProxyCheckInterval               *cluster.Duration         `json:"proxyCheckInterval"`
	ProxyTimeout                     *cluster.Duration         `json:"proxyTimeout"`
	MaxStandbys                      *uint16                   `json:"maxStandbys"`
	MaxStandbysPerSender             *uint16                   `json:"maxStandbysPerSender"`
	MaxStandbyLag                    *uint32                   `json:"maxStandbyLag"`
	SynchronousReplication           *bool                     `json:"synchronousReplication"`
	MinSynchronousStandbys           *uint16                   `json:"minSynchronousStandbys"`
	MaxSynchronousStandbys           *uint16                   `json:"maxSynchronousStandbys"`
	AdditionalWalSenders             *uint16                   `json:"additionalWalSenders"`
	AdditionalMasterReplicationSlots []string                  `json:"additionalMasterReplicationSlots"`
	UsePgrewind                      *bool                     `json:"usePgrewind"`
	InitMode                         *cluster.ClusterInitMode  `json:"initMode"`
	MergePgParameters                *bool                     `json:"mergePgParameters"`
	Role                             *cluster.ClusterRole      `json:"role"`
	NewConfig                        *cluster.NewConfig        `json:"newConfig"`
	PITRConfig                       *cluster.PITRConfig       `json:"pitrConfig"`
	ExistingConfig                   *cluster.ExistingConfig   `json:"existingConfig"`
	StandbyConfig                    *cluster.StandbyConfig    `json:"standbyConfig"`
	DefaultSUReplAccessMode          *cluster.SUReplAccessMode `json:"defaultSUReplAccessMode"`
	PGParameters                     cluster.PGParameters      `json:"pgParameters"`
	PGHBA                            []string                  `json:"pgHBA"`
	AutomaticPgRestart               *bool                     `json:"automaticPgRestart"`
}

type ClusterSpecNoDefaults added in v0.16.7

type ClusterSpecNoDefaults struct {
	SleepInterval                    *cluster.Duration         `json:"sleepInterval,omitempty"`
	RequestTimeout                   *cluster.Duration         `json:"requestTimeout,omitempty"`
	ConvergenceTimeout               *cluster.Duration         `json:"convergenceTimeout,omitempty"`
	InitTimeout                      *cluster.Duration         `json:"initTimeout,omitempty"`
	SyncTimeout                      *cluster.Duration         `json:"syncTimeout,omitempty"`
	DBWaitReadyTimeout               *cluster.Duration         `json:"dbWaitReadyTimeout,omitempty"`
	FailInterval                     *cluster.Duration         `json:"failInterval,omitempty"`
	DeadKeeperRemovalInterval        *cluster.Duration         `json:"deadKeeperRemovalInterval,omitempty"`
	ProxyCheckInterval               *cluster.Duration         `json:"proxyCheckInterval,omitempty"`
	ProxyTimeout                     *cluster.Duration         `json:"proxyTimeout,omitempty"`
	MaxStandbys                      *uint16                   `json:"maxStandbys,omitempty"`
	MaxStandbysPerSender             *uint16                   `json:"maxStandbysPerSender,omitempty"`
	MaxStandbyLag                    *uint32                   `json:"maxStandbyLag,omitempty"`
	SynchronousReplication           *bool                     `json:"synchronousReplication,omitempty"`
	MinSynchronousStandbys           *uint16                   `json:"minSynchronousStandbys,omitempty"`
	MaxSynchronousStandbys           *uint16                   `json:"maxSynchronousStandbys,omitempty"`
	AdditionalWalSenders             *uint16                   `json:"additionalWalSenders,omitempty"`
	AdditionalMasterReplicationSlots []string                  `json:"additionalMasterReplicationSlots,omitempty"`
	UsePgrewind                      *bool                     `json:"usePgrewind,omitempty"`
	InitMode                         *cluster.ClusterInitMode  `json:"initMode,omitempty"`
	MergePgParameters                *bool                     `json:"mergePgParameters,omitempty"`
	Role                             *cluster.ClusterRole      `json:"role,omitempty"`
	NewConfig                        *cluster.NewConfig        `json:"newConfig,omitempty"`
	PITRConfig                       *cluster.PITRConfig       `json:"pitrConfig,omitempty"`
	ExistingConfig                   *cluster.ExistingConfig   `json:"existingConfig,omitempty"`
	StandbyConfig                    *cluster.StandbyConfig    `json:"standbyConfig,omitempty"`
	DefaultSUReplAccessMode          *cluster.SUReplAccessMode `json:"defaultSUReplAccessMode,omitempty"`
	PGParameters                     cluster.PGParameters      `json:"pgParameters,omitempty"`
	PGHBA                            []string                  `json:"pgHBA,omitempty"`
	AutomaticPgRestart               *bool                     `json:"automaticPgRestart,omitempty"`
}

type ClusterStatus added in v0.16.7

type ClusterStatus struct {
	Available       bool   `json:"available"`
	MasterKeeperUID string `json:"master_keeper_uid"`
	MasterDBUID     string `json:"master_db_uid"`
}

type InitOptions

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

type KeeperStatus added in v0.16.7

type KeeperStatus struct {
	UID                 string `json:"uid"`
	ListenAddress       string `json:"listen_address"`
	Healthy             bool   `json:"healthy"`
	PgHealthy           bool   `json:"pg_healthy"`
	PgWantedGeneration  int64  `json:"pg_wanted_generation"`
	PgCurrentGeneration int64  `json:"pg_current_generation"`
}

type ProxyStatus added in v0.16.7

type ProxyStatus struct {
	UID        string `json:"uid"`
	Generation int64  `json:"generation"`
}

type SentinelStatus added in v0.16.7

type SentinelStatus struct {
	UID    string `json:"uid"`
	Leader bool   `json:"leader"`
}

type Status added in v0.16.7

type Status struct {
	Sentinels []SentinelStatus `json:"sentinels"`
	Proxies   []ProxyStatus    `json:"proxies"`
	Keepers   []KeeperStatus   `json:"keepers"`
	Cluster   ClusterStatus    `json:"cluster"`
}

type StatusOptions added in v0.16.7

type StatusOptions struct {
	Format string
}

Directories

Path Synopsis
internal
mock/register
Package mock_register is a generated GoMock package.
Package mock_register is a generated GoMock package.

Jump to

Keyboard shortcuts

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