patroni

package
v4.4.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrInstanceNotFound is the error thrown when a target instance cannot be found in the cluster
	ErrInstanceNotFound = errors.New("The instance does not exist in the cluster")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	ReloadCluster() error
	RestartCluster() ([]RestartResult, error)
	RestartInstances(instance ...string) ([]RestartResult, error)
}

Client defines the various actions a Patroni client is able to perform against a specified PGCluster

func NewPatroniClient

func NewPatroniClient(restConfig *rest.Config, kubeclientset kubernetes.Interface,
	clusterName, namespace string) Client

NewPatroniClient creates a new Patroni client

type RestartResult

type RestartResult struct {
	Instance string
	Error    error
}

RestartResult represents the result of a cluster restart, specifically the name of the an instance that was restarted within a cluster, and an error that can be populated in the event an instance cannot be successfully restarted.

Jump to

Keyboard shortcuts

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