Documentation
¶
Index ¶
- Constants
- func IsClusterReady(cluster *apiv1.Cluster) bool
- type Client
- func (cnpgc *Client) CreateBackup(ctx *contexts.Context, namespace, backupName, clusterName string, ...) (*apiv1.Backup, error)
- func (cnpgc *Client) CreateCluster(ctx *contexts.Context, namespace, clusterName string, ...) (*apiv1.Cluster, error)
- func (cnpgc *Client) DeleteBackup(ctx *contexts.Context, namespace, name string) error
- func (cnpgc *Client) DeleteCluster(ctx *contexts.Context, namespace, name string) error
- func (cnpgc *Client) GetCluster(ctx *contexts.Context, namespace, name string) (*apiv1.Cluster, error)
- func (cnpgc *Client) WaitForClusterDeleted(ctx *contexts.Context, namespace, name string, opts WaitForClusterDeletedOpts) (err error)
- func (cnpgc *Client) WaitForReadyBackup(ctx *contexts.Context, namespace, name string, opts WaitForReadyBackupOpts) (backup *apiv1.Backup, err error)
- func (cnpgc *Client) WaitForReadyCluster(ctx *contexts.Context, namespace, name string, opts WaitForReadyClusterOpts) (cluster *apiv1.Cluster, err error)
- type ClientInterface
- type CreateBackupOptions
- type CreateClusterOptions
- type KubernetesSecretCredentials
- type MockClientInterface
- func (_m *MockClientInterface) CreateBackup(ctx *contexts.Context, namespace string, backupName string, clusterName string, ...) (*v1.Backup, error)
- func (_m *MockClientInterface) CreateCluster(ctx *contexts.Context, namespace string, clusterName string, ...) (*v1.Cluster, error)
- func (_m *MockClientInterface) DeleteBackup(ctx *contexts.Context, namespace string, name string) error
- func (_m *MockClientInterface) DeleteCluster(ctx *contexts.Context, namespace string, name string) error
- func (_m *MockClientInterface) EXPECT() *MockClientInterface_Expecter
- func (_m *MockClientInterface) GetCluster(ctx *contexts.Context, namespace string, name string) (*v1.Cluster, error)
- func (_m *MockClientInterface) SetCommonLabels(labels map[string]string)
- func (_m *MockClientInterface) WaitForClusterDeleted(ctx *contexts.Context, namespace string, name string, ...) error
- func (_m *MockClientInterface) WaitForReadyBackup(ctx *contexts.Context, namespace string, name string, ...) (*v1.Backup, error)
- func (_m *MockClientInterface) WaitForReadyCluster(ctx *contexts.Context, namespace string, name string, ...) (*v1.Cluster, error)
- type MockClientInterface_CreateBackup_Call
- func (_c *MockClientInterface_CreateBackup_Call) Return(_a0 *v1.Backup, _a1 error) *MockClientInterface_CreateBackup_Call
- func (_c *MockClientInterface_CreateBackup_Call) Run(...) *MockClientInterface_CreateBackup_Call
- func (_c *MockClientInterface_CreateBackup_Call) RunAndReturn(...) *MockClientInterface_CreateBackup_Call
- type MockClientInterface_CreateCluster_Call
- func (_c *MockClientInterface_CreateCluster_Call) Return(_a0 *v1.Cluster, _a1 error) *MockClientInterface_CreateCluster_Call
- func (_c *MockClientInterface_CreateCluster_Call) Run(run func(ctx *contexts.Context, namespace string, clusterName string, ...)) *MockClientInterface_CreateCluster_Call
- func (_c *MockClientInterface_CreateCluster_Call) RunAndReturn(...) *MockClientInterface_CreateCluster_Call
- type MockClientInterface_DeleteBackup_Call
- func (_c *MockClientInterface_DeleteBackup_Call) Return(_a0 error) *MockClientInterface_DeleteBackup_Call
- func (_c *MockClientInterface_DeleteBackup_Call) Run(run func(ctx *contexts.Context, namespace string, name string)) *MockClientInterface_DeleteBackup_Call
- func (_c *MockClientInterface_DeleteBackup_Call) RunAndReturn(run func(*contexts.Context, string, string) error) *MockClientInterface_DeleteBackup_Call
- type MockClientInterface_DeleteCluster_Call
- func (_c *MockClientInterface_DeleteCluster_Call) Return(_a0 error) *MockClientInterface_DeleteCluster_Call
- func (_c *MockClientInterface_DeleteCluster_Call) Run(run func(ctx *contexts.Context, namespace string, name string)) *MockClientInterface_DeleteCluster_Call
- func (_c *MockClientInterface_DeleteCluster_Call) RunAndReturn(run func(*contexts.Context, string, string) error) *MockClientInterface_DeleteCluster_Call
- type MockClientInterface_Expecter
- func (_e *MockClientInterface_Expecter) CreateBackup(ctx interface{}, namespace interface{}, backupName interface{}, ...) *MockClientInterface_CreateBackup_Call
- func (_e *MockClientInterface_Expecter) CreateCluster(ctx interface{}, namespace interface{}, clusterName interface{}, ...) *MockClientInterface_CreateCluster_Call
- func (_e *MockClientInterface_Expecter) DeleteBackup(ctx interface{}, namespace interface{}, name interface{}) *MockClientInterface_DeleteBackup_Call
- func (_e *MockClientInterface_Expecter) DeleteCluster(ctx interface{}, namespace interface{}, name interface{}) *MockClientInterface_DeleteCluster_Call
- func (_e *MockClientInterface_Expecter) GetCluster(ctx interface{}, namespace interface{}, name interface{}) *MockClientInterface_GetCluster_Call
- func (_e *MockClientInterface_Expecter) SetCommonLabels(labels interface{}) *MockClientInterface_SetCommonLabels_Call
- func (_e *MockClientInterface_Expecter) WaitForClusterDeleted(ctx interface{}, namespace interface{}, name interface{}, opts interface{}) *MockClientInterface_WaitForClusterDeleted_Call
- func (_e *MockClientInterface_Expecter) WaitForReadyBackup(ctx interface{}, namespace interface{}, name interface{}, opts interface{}) *MockClientInterface_WaitForReadyBackup_Call
- func (_e *MockClientInterface_Expecter) WaitForReadyCluster(ctx interface{}, namespace interface{}, name interface{}, opts interface{}) *MockClientInterface_WaitForReadyCluster_Call
- type MockClientInterface_GetCluster_Call
- func (_c *MockClientInterface_GetCluster_Call) Return(_a0 *v1.Cluster, _a1 error) *MockClientInterface_GetCluster_Call
- func (_c *MockClientInterface_GetCluster_Call) Run(run func(ctx *contexts.Context, namespace string, name string)) *MockClientInterface_GetCluster_Call
- func (_c *MockClientInterface_GetCluster_Call) RunAndReturn(run func(*contexts.Context, string, string) (*v1.Cluster, error)) *MockClientInterface_GetCluster_Call
- type MockClientInterface_SetCommonLabels_Call
- func (_c *MockClientInterface_SetCommonLabels_Call) Return() *MockClientInterface_SetCommonLabels_Call
- func (_c *MockClientInterface_SetCommonLabels_Call) Run(run func(labels map[string]string)) *MockClientInterface_SetCommonLabels_Call
- func (_c *MockClientInterface_SetCommonLabels_Call) RunAndReturn(run func(map[string]string)) *MockClientInterface_SetCommonLabels_Call
- type MockClientInterface_WaitForClusterDeleted_Call
- func (_c *MockClientInterface_WaitForClusterDeleted_Call) Return(_a0 error) *MockClientInterface_WaitForClusterDeleted_Call
- func (_c *MockClientInterface_WaitForClusterDeleted_Call) Run(run func(ctx *contexts.Context, namespace string, name string, ...)) *MockClientInterface_WaitForClusterDeleted_Call
- func (_c *MockClientInterface_WaitForClusterDeleted_Call) RunAndReturn(run func(*contexts.Context, string, string, WaitForClusterDeletedOpts) error) *MockClientInterface_WaitForClusterDeleted_Call
- type MockClientInterface_WaitForReadyBackup_Call
- func (_c *MockClientInterface_WaitForReadyBackup_Call) Return(_a0 *v1.Backup, _a1 error) *MockClientInterface_WaitForReadyBackup_Call
- func (_c *MockClientInterface_WaitForReadyBackup_Call) Run(run func(ctx *contexts.Context, namespace string, name string, ...)) *MockClientInterface_WaitForReadyBackup_Call
- func (_c *MockClientInterface_WaitForReadyBackup_Call) RunAndReturn(...) *MockClientInterface_WaitForReadyBackup_Call
- type MockClientInterface_WaitForReadyCluster_Call
- func (_c *MockClientInterface_WaitForReadyCluster_Call) Return(_a0 *v1.Cluster, _a1 error) *MockClientInterface_WaitForReadyCluster_Call
- func (_c *MockClientInterface_WaitForReadyCluster_Call) Run(run func(ctx *contexts.Context, namespace string, name string, ...)) *MockClientInterface_WaitForReadyCluster_Call
- func (_c *MockClientInterface_WaitForReadyCluster_Call) RunAndReturn(...) *MockClientInterface_WaitForReadyCluster_Call
- type VolumeSnapshotRecovery
- type WaitForClusterDeletedOpts
- type WaitForReadyBackupOpts
- type WaitForReadyClusterOpts
Constants ¶
const BarmanCloudPluginName = "barman-cloud.cloudnative-pg.io"
BarmanCloudPluginName is the CNPG-I plugin name of the barman-cloud plugin, which supersedes the deprecated in-tree barman WAL archiving support.
Variables ¶
This section is empty.
Functions ¶
func IsClusterReady ¶ added in v0.0.2
Types ¶
type Client ¶
type Client struct {
helpers.SimpleResourceLabeler
// contains filtered or unexported fields
}
func (*Client) CreateBackup ¶
func (*Client) CreateCluster ¶
func (cnpgc *Client) CreateCluster(ctx *contexts.Context, namespace, clusterName string, volumeSize resource.Quantity, servingCertificateSecretName, clientCASecretName, replicationUserCertName string, opts CreateClusterOptions) (*apiv1.Cluster, error)
Create a cluster for backup/recovery purposes specifically. Not intended for use general use. The created cluster should not be used by applications. Created cluster contains a single database server instance. Cluster can optionally be created from a backup. TLS authentication is required.
func (*Client) DeleteBackup ¶
func (*Client) DeleteCluster ¶
func (*Client) GetCluster ¶
func (*Client) WaitForClusterDeleted ¶ added in v0.0.13
func (cnpgc *Client) WaitForClusterDeleted(ctx *contexts.Context, namespace, name string, opts WaitForClusterDeletedOpts) (err error)
WaitForClusterDeleted blocks until the named cluster no longer exists, or the timeout elapses. It is used after DeleteCluster when a cluster must be recreated under the same name (the recovery fallback), since CNPG cluster deletion is asynchronous (finalizers tear down pods/PVCs first).
func (*Client) WaitForReadyBackup ¶
func (*Client) WaitForReadyCluster ¶
type ClientInterface ¶
type ClientInterface interface {
helpers.ResourceLabeler
// Backups
CreateBackup(ctx *contexts.Context, namespace, backupName, clusterName string, opts CreateBackupOptions) (*apiv1.Backup, error)
WaitForReadyBackup(ctx *contexts.Context, namespace, name string, opts WaitForReadyBackupOpts) (*apiv1.Backup, error)
DeleteBackup(ctx *contexts.Context, namespace, name string) error
// Clusters
CreateCluster(ctx *contexts.Context, namespace, clusterName string, volumeSize resource.Quantity, servingCertificateSecretName, clientCASecretName, replicationUserCertName string, opts CreateClusterOptions) (*apiv1.Cluster, error)
WaitForReadyCluster(ctx *contexts.Context, namespace, name string, opts WaitForReadyClusterOpts) (*apiv1.Cluster, error)
GetCluster(ctx *contexts.Context, namespace, name string) (*apiv1.Cluster, error)
DeleteCluster(ctx *contexts.Context, namespace, name string) error
WaitForClusterDeleted(ctx *contexts.Context, namespace, name string, opts WaitForClusterDeletedOpts) error
}
type CreateBackupOptions ¶
type CreateBackupOptions struct {
helpers.GenerateName
Method *apiv1.BackupMethod
Target *apiv1.BackupTarget
}
type CreateClusterOptions ¶
type CreateClusterOptions struct {
helpers.GenerateName
// Deprecated: BackupName recovers the new cluster from a CNPG Backup object
// (bootstrap.recovery.backup). This relies on the deprecated in-tree barman WAL archiving
// support to fetch WAL during recovery. For source clusters using the barman-cloud plugin,
// use VolumeSnapshotRecovery instead. Mutually exclusive with VolumeSnapshotRecovery.
BackupName string
// VolumeSnapshotRecovery recovers the new cluster from volume snapshots, fetching WAL from an
// external cluster. Mutually exclusive with BackupName.
VolumeSnapshotRecovery *VolumeSnapshotRecovery
RecoveryTarget *apiv1.RecoveryTarget // Only valid if recovering from a backup or volume snapshots
DatabaseName string
OwnerName string
StorageClass string
ResourceRequirements corev1.ResourceRequirements
ImageName string
}
This doesn't need to support every option - just the ones that may be relavent to backups.
type KubernetesSecretCredentials ¶
type KubernetesSecretCredentials struct {
Host string
Port string
User string // TODO maybe pull this from client cert CN
ServingCertificateCAFilePath string // Must be PEM encoded
ClientCertificateFilePath string // Must be PEM encoded
ClientPrivateKeyFilePath string // Must be PEM encoded
}
func (*KubernetesSecretCredentials) GetHost ¶
func (ksc *KubernetesSecretCredentials) GetHost() string
func (*KubernetesSecretCredentials) GetPort ¶
func (ksc *KubernetesSecretCredentials) GetPort() string
func (*KubernetesSecretCredentials) GetUsername ¶
func (ksc *KubernetesSecretCredentials) GetUsername() string
func (*KubernetesSecretCredentials) GetVariables ¶
func (ksc *KubernetesSecretCredentials) GetVariables() postgres.CredentialVariables
type MockClientInterface ¶
MockClientInterface is an autogenerated mock type for the ClientInterface type
func NewMockClientInterface ¶
func NewMockClientInterface(t interface {
mock.TestingT
Cleanup(func())
}) *MockClientInterface
NewMockClientInterface creates a new instance of MockClientInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockClientInterface) CreateBackup ¶
func (_m *MockClientInterface) CreateBackup(ctx *contexts.Context, namespace string, backupName string, clusterName string, opts CreateBackupOptions) (*v1.Backup, error)
CreateBackup provides a mock function with given fields: ctx, namespace, backupName, clusterName, opts
func (*MockClientInterface) CreateCluster ¶
func (_m *MockClientInterface) CreateCluster(ctx *contexts.Context, namespace string, clusterName string, volumeSize resource.Quantity, servingCertificateSecretName string, clientCASecretName string, replicationUserCertName string, opts CreateClusterOptions) (*v1.Cluster, error)
CreateCluster provides a mock function with given fields: ctx, namespace, clusterName, volumeSize, servingCertificateSecretName, clientCASecretName, replicationUserCertName, opts
func (*MockClientInterface) DeleteBackup ¶
func (_m *MockClientInterface) DeleteBackup(ctx *contexts.Context, namespace string, name string) error
DeleteBackup provides a mock function with given fields: ctx, namespace, name
func (*MockClientInterface) DeleteCluster ¶
func (_m *MockClientInterface) DeleteCluster(ctx *contexts.Context, namespace string, name string) error
DeleteCluster provides a mock function with given fields: ctx, namespace, name
func (*MockClientInterface) EXPECT ¶
func (_m *MockClientInterface) EXPECT() *MockClientInterface_Expecter
func (*MockClientInterface) GetCluster ¶
func (_m *MockClientInterface) GetCluster(ctx *contexts.Context, namespace string, name string) (*v1.Cluster, error)
GetCluster provides a mock function with given fields: ctx, namespace, name
func (*MockClientInterface) SetCommonLabels ¶ added in v0.0.9
func (_m *MockClientInterface) SetCommonLabels(labels map[string]string)
SetCommonLabels provides a mock function with given fields: labels
func (*MockClientInterface) WaitForClusterDeleted ¶ added in v0.0.13
func (_m *MockClientInterface) WaitForClusterDeleted(ctx *contexts.Context, namespace string, name string, opts WaitForClusterDeletedOpts) error
WaitForClusterDeleted provides a mock function with given fields: ctx, namespace, name, opts
func (*MockClientInterface) WaitForReadyBackup ¶
func (_m *MockClientInterface) WaitForReadyBackup(ctx *contexts.Context, namespace string, name string, opts WaitForReadyBackupOpts) (*v1.Backup, error)
WaitForReadyBackup provides a mock function with given fields: ctx, namespace, name, opts
func (*MockClientInterface) WaitForReadyCluster ¶
func (_m *MockClientInterface) WaitForReadyCluster(ctx *contexts.Context, namespace string, name string, opts WaitForReadyClusterOpts) (*v1.Cluster, error)
WaitForReadyCluster provides a mock function with given fields: ctx, namespace, name, opts
type MockClientInterface_CreateBackup_Call ¶
MockClientInterface_CreateBackup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateBackup'
func (*MockClientInterface_CreateBackup_Call) Return ¶
func (_c *MockClientInterface_CreateBackup_Call) Return(_a0 *v1.Backup, _a1 error) *MockClientInterface_CreateBackup_Call
func (*MockClientInterface_CreateBackup_Call) Run ¶
func (_c *MockClientInterface_CreateBackup_Call) Run(run func(ctx *contexts.Context, namespace string, backupName string, clusterName string, opts CreateBackupOptions)) *MockClientInterface_CreateBackup_Call
func (*MockClientInterface_CreateBackup_Call) RunAndReturn ¶
func (_c *MockClientInterface_CreateBackup_Call) RunAndReturn(run func(*contexts.Context, string, string, string, CreateBackupOptions) (*v1.Backup, error)) *MockClientInterface_CreateBackup_Call
type MockClientInterface_CreateCluster_Call ¶
MockClientInterface_CreateCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCluster'
func (*MockClientInterface_CreateCluster_Call) Return ¶
func (_c *MockClientInterface_CreateCluster_Call) Return(_a0 *v1.Cluster, _a1 error) *MockClientInterface_CreateCluster_Call
func (*MockClientInterface_CreateCluster_Call) Run ¶
func (_c *MockClientInterface_CreateCluster_Call) Run(run func(ctx *contexts.Context, namespace string, clusterName string, volumeSize resource.Quantity, servingCertificateSecretName string, clientCASecretName string, replicationUserCertName string, opts CreateClusterOptions)) *MockClientInterface_CreateCluster_Call
func (*MockClientInterface_CreateCluster_Call) RunAndReturn ¶
func (_c *MockClientInterface_CreateCluster_Call) RunAndReturn(run func(*contexts.Context, string, string, resource.Quantity, string, string, string, CreateClusterOptions) (*v1.Cluster, error)) *MockClientInterface_CreateCluster_Call
type MockClientInterface_DeleteBackup_Call ¶
MockClientInterface_DeleteBackup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBackup'
func (*MockClientInterface_DeleteBackup_Call) Return ¶
func (_c *MockClientInterface_DeleteBackup_Call) Return(_a0 error) *MockClientInterface_DeleteBackup_Call
func (*MockClientInterface_DeleteBackup_Call) Run ¶
func (_c *MockClientInterface_DeleteBackup_Call) Run(run func(ctx *contexts.Context, namespace string, name string)) *MockClientInterface_DeleteBackup_Call
func (*MockClientInterface_DeleteBackup_Call) RunAndReturn ¶
func (_c *MockClientInterface_DeleteBackup_Call) RunAndReturn(run func(*contexts.Context, string, string) error) *MockClientInterface_DeleteBackup_Call
type MockClientInterface_DeleteCluster_Call ¶
MockClientInterface_DeleteCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCluster'
func (*MockClientInterface_DeleteCluster_Call) Return ¶
func (_c *MockClientInterface_DeleteCluster_Call) Return(_a0 error) *MockClientInterface_DeleteCluster_Call
func (*MockClientInterface_DeleteCluster_Call) Run ¶
func (_c *MockClientInterface_DeleteCluster_Call) Run(run func(ctx *contexts.Context, namespace string, name string)) *MockClientInterface_DeleteCluster_Call
func (*MockClientInterface_DeleteCluster_Call) RunAndReturn ¶
func (_c *MockClientInterface_DeleteCluster_Call) RunAndReturn(run func(*contexts.Context, string, string) error) *MockClientInterface_DeleteCluster_Call
type MockClientInterface_Expecter ¶
type MockClientInterface_Expecter struct {
// contains filtered or unexported fields
}
func (*MockClientInterface_Expecter) CreateBackup ¶
func (_e *MockClientInterface_Expecter) CreateBackup(ctx interface{}, namespace interface{}, backupName interface{}, clusterName interface{}, opts interface{}) *MockClientInterface_CreateBackup_Call
CreateBackup is a helper method to define mock.On call
- ctx *contexts.Context
- namespace string
- backupName string
- clusterName string
- opts CreateBackupOptions
func (*MockClientInterface_Expecter) CreateCluster ¶
func (_e *MockClientInterface_Expecter) CreateCluster(ctx interface{}, namespace interface{}, clusterName interface{}, volumeSize interface{}, servingCertificateSecretName interface{}, clientCASecretName interface{}, replicationUserCertName interface{}, opts interface{}) *MockClientInterface_CreateCluster_Call
CreateCluster is a helper method to define mock.On call
- ctx *contexts.Context
- namespace string
- clusterName string
- volumeSize resource.Quantity
- servingCertificateSecretName string
- clientCASecretName string
- replicationUserCertName string
- opts CreateClusterOptions
func (*MockClientInterface_Expecter) DeleteBackup ¶
func (_e *MockClientInterface_Expecter) DeleteBackup(ctx interface{}, namespace interface{}, name interface{}) *MockClientInterface_DeleteBackup_Call
DeleteBackup is a helper method to define mock.On call
- ctx *contexts.Context
- namespace string
- name string
func (*MockClientInterface_Expecter) DeleteCluster ¶
func (_e *MockClientInterface_Expecter) DeleteCluster(ctx interface{}, namespace interface{}, name interface{}) *MockClientInterface_DeleteCluster_Call
DeleteCluster is a helper method to define mock.On call
- ctx *contexts.Context
- namespace string
- name string
func (*MockClientInterface_Expecter) GetCluster ¶
func (_e *MockClientInterface_Expecter) GetCluster(ctx interface{}, namespace interface{}, name interface{}) *MockClientInterface_GetCluster_Call
GetCluster is a helper method to define mock.On call
- ctx *contexts.Context
- namespace string
- name string
func (*MockClientInterface_Expecter) SetCommonLabels ¶ added in v0.0.9
func (_e *MockClientInterface_Expecter) SetCommonLabels(labels interface{}) *MockClientInterface_SetCommonLabels_Call
SetCommonLabels is a helper method to define mock.On call
- labels map[string]string
func (*MockClientInterface_Expecter) WaitForClusterDeleted ¶ added in v0.0.13
func (_e *MockClientInterface_Expecter) WaitForClusterDeleted(ctx interface{}, namespace interface{}, name interface{}, opts interface{}) *MockClientInterface_WaitForClusterDeleted_Call
WaitForClusterDeleted is a helper method to define mock.On call
- ctx *contexts.Context
- namespace string
- name string
- opts WaitForClusterDeletedOpts
func (*MockClientInterface_Expecter) WaitForReadyBackup ¶
func (_e *MockClientInterface_Expecter) WaitForReadyBackup(ctx interface{}, namespace interface{}, name interface{}, opts interface{}) *MockClientInterface_WaitForReadyBackup_Call
WaitForReadyBackup is a helper method to define mock.On call
- ctx *contexts.Context
- namespace string
- name string
- opts WaitForReadyBackupOpts
func (*MockClientInterface_Expecter) WaitForReadyCluster ¶
func (_e *MockClientInterface_Expecter) WaitForReadyCluster(ctx interface{}, namespace interface{}, name interface{}, opts interface{}) *MockClientInterface_WaitForReadyCluster_Call
WaitForReadyCluster is a helper method to define mock.On call
- ctx *contexts.Context
- namespace string
- name string
- opts WaitForReadyClusterOpts
type MockClientInterface_GetCluster_Call ¶
MockClientInterface_GetCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCluster'
func (*MockClientInterface_GetCluster_Call) Return ¶
func (_c *MockClientInterface_GetCluster_Call) Return(_a0 *v1.Cluster, _a1 error) *MockClientInterface_GetCluster_Call
func (*MockClientInterface_GetCluster_Call) Run ¶
func (_c *MockClientInterface_GetCluster_Call) Run(run func(ctx *contexts.Context, namespace string, name string)) *MockClientInterface_GetCluster_Call
func (*MockClientInterface_GetCluster_Call) RunAndReturn ¶
func (_c *MockClientInterface_GetCluster_Call) RunAndReturn(run func(*contexts.Context, string, string) (*v1.Cluster, error)) *MockClientInterface_GetCluster_Call
type MockClientInterface_SetCommonLabels_Call ¶ added in v0.0.9
MockClientInterface_SetCommonLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCommonLabels'
func (*MockClientInterface_SetCommonLabels_Call) Return ¶ added in v0.0.9
func (_c *MockClientInterface_SetCommonLabels_Call) Return() *MockClientInterface_SetCommonLabels_Call
func (*MockClientInterface_SetCommonLabels_Call) Run ¶ added in v0.0.9
func (_c *MockClientInterface_SetCommonLabels_Call) Run(run func(labels map[string]string)) *MockClientInterface_SetCommonLabels_Call
func (*MockClientInterface_SetCommonLabels_Call) RunAndReturn ¶ added in v0.0.9
func (_c *MockClientInterface_SetCommonLabels_Call) RunAndReturn(run func(map[string]string)) *MockClientInterface_SetCommonLabels_Call
type MockClientInterface_WaitForClusterDeleted_Call ¶ added in v0.0.13
MockClientInterface_WaitForClusterDeleted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForClusterDeleted'
func (*MockClientInterface_WaitForClusterDeleted_Call) Return ¶ added in v0.0.13
func (_c *MockClientInterface_WaitForClusterDeleted_Call) Return(_a0 error) *MockClientInterface_WaitForClusterDeleted_Call
func (*MockClientInterface_WaitForClusterDeleted_Call) Run ¶ added in v0.0.13
func (_c *MockClientInterface_WaitForClusterDeleted_Call) Run(run func(ctx *contexts.Context, namespace string, name string, opts WaitForClusterDeletedOpts)) *MockClientInterface_WaitForClusterDeleted_Call
func (*MockClientInterface_WaitForClusterDeleted_Call) RunAndReturn ¶ added in v0.0.13
func (_c *MockClientInterface_WaitForClusterDeleted_Call) RunAndReturn(run func(*contexts.Context, string, string, WaitForClusterDeletedOpts) error) *MockClientInterface_WaitForClusterDeleted_Call
type MockClientInterface_WaitForReadyBackup_Call ¶
MockClientInterface_WaitForReadyBackup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForReadyBackup'
func (*MockClientInterface_WaitForReadyBackup_Call) Return ¶
func (_c *MockClientInterface_WaitForReadyBackup_Call) Return(_a0 *v1.Backup, _a1 error) *MockClientInterface_WaitForReadyBackup_Call
func (*MockClientInterface_WaitForReadyBackup_Call) Run ¶
func (_c *MockClientInterface_WaitForReadyBackup_Call) Run(run func(ctx *contexts.Context, namespace string, name string, opts WaitForReadyBackupOpts)) *MockClientInterface_WaitForReadyBackup_Call
func (*MockClientInterface_WaitForReadyBackup_Call) RunAndReturn ¶
func (_c *MockClientInterface_WaitForReadyBackup_Call) RunAndReturn(run func(*contexts.Context, string, string, WaitForReadyBackupOpts) (*v1.Backup, error)) *MockClientInterface_WaitForReadyBackup_Call
type MockClientInterface_WaitForReadyCluster_Call ¶
MockClientInterface_WaitForReadyCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForReadyCluster'
func (*MockClientInterface_WaitForReadyCluster_Call) Return ¶
func (_c *MockClientInterface_WaitForReadyCluster_Call) Return(_a0 *v1.Cluster, _a1 error) *MockClientInterface_WaitForReadyCluster_Call
func (*MockClientInterface_WaitForReadyCluster_Call) Run ¶
func (_c *MockClientInterface_WaitForReadyCluster_Call) Run(run func(ctx *contexts.Context, namespace string, name string, opts WaitForReadyClusterOpts)) *MockClientInterface_WaitForReadyCluster_Call
func (*MockClientInterface_WaitForReadyCluster_Call) RunAndReturn ¶
func (_c *MockClientInterface_WaitForReadyCluster_Call) RunAndReturn(run func(*contexts.Context, string, string, WaitForReadyClusterOpts) (*v1.Cluster, error)) *MockClientInterface_WaitForReadyCluster_Call
type VolumeSnapshotRecovery ¶ added in v0.0.13
type VolumeSnapshotRecovery struct {
// DataSnapshotName is the name of the VolumeSnapshot holding PGDATA.
DataSnapshotName string
// WALSnapshotName is the name of the VolumeSnapshot holding the PG_WAL volume, if the source
// cluster stores WAL on a separate volume. Optional.
WALSnapshotName string
// WALSource describes the external cluster from which write-ahead logs are fetched during
// recovery. Its Name is used both as the bootstrap recovery source and, by CNPG convention,
// as the server name (folder) the source cluster's backups are stored under, so it must match
// the source cluster's barman server name.
WALSource apiv1.ExternalCluster
}
VolumeSnapshotRecovery configures recovery of a new cluster from volume snapshots, with write-ahead logs fetched from an external cluster's WAL archive. This is the recovery path used for source clusters that archive WAL with the barman-cloud plugin (the in-tree barman support, driven by BackupName, recovers from a Backup object instead).
type WaitForClusterDeletedOpts ¶ added in v0.0.13
type WaitForClusterDeletedOpts struct {
helpers.MaxWaitTime
}
type WaitForReadyBackupOpts ¶
type WaitForReadyBackupOpts struct {
helpers.MaxWaitTime
}
type WaitForReadyClusterOpts ¶
type WaitForReadyClusterOpts struct {
helpers.MaxWaitTime
}
Directories
¶
| Path | Synopsis |
|---|---|
|
gen
|
|
|
clientset/versioned/fake
This package has the automatically generated fake clientset.
|
This package has the automatically generated fake clientset. |
|
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
|
This package contains the scheme of the automatically generated clientset. |
|
clientset/versioned/typed/api/v1
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
|
clientset/versioned/typed/api/v1/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |