Documentation ¶
Overview ¶
Package cloning provides a cloning service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CloneWrapper ¶
type CloneWrapper struct {
// contains filtered or unexported fields
}
CloneWrapper represents a cloning service wrapper.
func NewCloneWrapper ¶
func NewCloneWrapper(clone *models.Clone) *CloneWrapper
NewCloneWrapper constructs a new CloneWrapper.
func (CloneWrapper) IsProtected ¶
func (cw CloneWrapper) IsProtected() bool
IsProtected checks if clone is protected.
type Cloning ¶
type Cloning interface { Run(ctx context.Context) error Reload(config Config) CreateClone(*types.CloneCreateRequest) (*models.Clone, error) CloneConnection(ctx context.Context, cloneID string) (pgxtype.Querier, error) DestroyClone(string) error GetClone(string) (*models.Clone, error) UpdateClone(string, *types.CloneUpdateRequest) (*models.Clone, error) UpdateCloneStatus(string, models.Status) error ResetClone(string) error GetInstanceState() (*models.InstanceStatus, error) GetSnapshots() ([]models.Snapshot, error) GetClones() []*models.Clone }
Cloning defines a Cloning service interface.
func New ¶
func New(cfg *Config, provision *provision.Provisioner, observingCh chan string) Cloning
New returns a cloning interface depends on configuration mode.
func NewBaseCloning ¶
func NewBaseCloning(cfg *Config, provision *provision.Provisioner, observingCh chan string) Cloning
NewBaseCloning instances a new base Cloning.
func NewMockCloning ¶
NewMockCloning instances a new mock Cloning.
Click to show internal directories.
Click to hide internal directories.