client

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultVolumeSnapshotLocationName = "default"
	DefaultBackupStorageLocationName  = "default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config    []byte
	Logger    logrus.FieldLogger
	Namespace string

	Client runtimeclient.Client
}

Client describes an ARK client

func New

func New(config []byte, namespace string, logger logrus.FieldLogger) (client *Client, err error)

New creates an initialized Client instance

func (*Client) CreateBackup

func (c *Client) CreateBackup(spec api.CreateBackupRequest) (*arkAPI.Backup, error)

CreateBackup creates an ARK backup by a CreateBackupRequest

func (*Client) CreateDeleteBackupRequestByName

func (c *Client) CreateDeleteBackupRequestByName(name string) error

CreateDeleteBackupRequestByName creates a DeleteBackupRequest for an ARK backup by name

func (*Client) CreateOrUpdateSchedule

func (c *Client) CreateOrUpdateSchedule(req *api.CreateScheduleRequest) error

CreateOrUpdateSchedule creates an ARK schedule by a CreateScheduleRequest

func (*Client) CreateRestore

func (c *Client) CreateRestore(req api.CreateRestoreRequest) (*arkAPI.Restore, error)

CreateRestore creates an ARK restore by a CreateRestoreRequest

func (*Client) DeleteRestoreByName

func (c *Client) DeleteRestoreByName(name string) error

DeleteRestoreByName deletes an ARK restore by name

func (*Client) DeleteScheduleByName

func (c *Client) DeleteScheduleByName(name string) error

DeleteScheduleByName deletes a schedule by name

func (*Client) GetBackupByName

func (c *Client) GetBackupByName(name string) (*arkAPI.Backup, error)

GetBackupByName gets an ARK backup by name

func (*Client) GetRestoreByName

func (c *Client) GetRestoreByName(name string) (*arkAPI.Restore, error)

GetRestoreByName gets an ARK restore by name

func (*Client) GetScheduleByName

func (c *Client) GetScheduleByName(name string) (*arkAPI.Schedule, error)

GetScheduleByName gets an ARK schedule by name

func (*Client) ListBackups

func (c *Client) ListBackups() (*arkAPI.BackupList, error)

ListBackups lists ARK backups

func (*Client) ListRestores

func (c *Client) ListRestores() (*arkAPI.RestoreList, error)

ListRestores lists ARK restores

func (*Client) ListSchedules

func (c *Client) ListSchedules() (*arkAPI.ScheduleList, error)

ListSchedules lists ARK schedules

func (*Client) WaitForActivationPhase

func (c *Client) WaitForActivationPhase(name string, phase v1alpha1.Phase) error

GetBackupByName gets an ARK backup by name

type ClientService

type ClientService interface {
	GetClient() (*Client, error)
}

ClientService is an interface for a implementation which gives back an initialized ARK client

Jump to

Keyboard shortcuts

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