replication

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)

Create Create a new replication job

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)

Delete Mark replication job for removal.

func (*Client) Find

func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)

Find Read replication job configuration.

func (*Client) Index

func (c *Client) Index(ctx context.Context) (*IndexResponse, error)

Index List replication jobs.

func (*Client) Update

func (c *Client) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)

Update Update replication job configuration.

type CreateRequest

type CreateRequest struct {
	Id     string `url:"id",json:"id"`         // Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
	Target string `url:"target",json:"target"` // Target node.
	Type   string `url:"type",json:"type"`     // Section type.

	// The following parameters are optional
	Comment   *string  `url:"comment,omitempty",json:"comment,omitempty"`       // Description.
	Disable   *bool    `url:"disable,omitempty",json:"disable,omitempty"`       // Flag to disable/deactivate the entry.
	Rate      *float64 `url:"rate,omitempty",json:"rate,omitempty"`             // Rate limit in mbps (megabytes per second) as floating point number.
	RemoveJob *string  `url:"remove_job,omitempty",json:"remove_job,omitempty"` // Mark the replication job for removal. The job will remove all local replication snapshots. When set to 'full', it also tries to remove replicated volumes on the target. The job then removes itself from the configuration file.
	Schedule  *string  `url:"schedule,omitempty",json:"schedule,omitempty"`     // Storage replication schedule. The format is a subset of `systemd` calendar events.
	Source    *string  `url:"source,omitempty",json:"source,omitempty"`         // For internal use, to detect if the guest was stolen.
}

type CreateResponse

type CreateResponse map[string]interface{}

type DeleteRequest

type DeleteRequest struct {
	Id string `url:"id",json:"id"` // Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.

	// The following parameters are optional
	Force *bool `url:"force,omitempty",json:"force,omitempty"` // Will remove the jobconfig entry, but will not cleanup.
	Keep  *bool `url:"keep,omitempty",json:"keep,omitempty"`   // Keep replicated data at target (do not remove).
}

type DeleteResponse

type DeleteResponse map[string]interface{}

type FindRequest

type FindRequest struct {
	Id string `url:"id",json:"id"` // Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.

}

type FindResponse

type FindResponse map[string]interface{}

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexResponse

type IndexResponse []*map[string]interface{}

type UpdateRequest

type UpdateRequest struct {
	Id string `url:"id",json:"id"` // Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.

	// The following parameters are optional
	Comment   *string  `url:"comment,omitempty",json:"comment,omitempty"`       // Description.
	Delete    *string  `url:"delete,omitempty",json:"delete,omitempty"`         // A list of settings you want to delete.
	Digest    *string  `url:"digest,omitempty",json:"digest,omitempty"`         // Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
	Disable   *bool    `url:"disable,omitempty",json:"disable,omitempty"`       // Flag to disable/deactivate the entry.
	Rate      *float64 `url:"rate,omitempty",json:"rate,omitempty"`             // Rate limit in mbps (megabytes per second) as floating point number.
	RemoveJob *string  `url:"remove_job,omitempty",json:"remove_job,omitempty"` // Mark the replication job for removal. The job will remove all local replication snapshots. When set to 'full', it also tries to remove replicated volumes on the target. The job then removes itself from the configuration file.
	Schedule  *string  `url:"schedule,omitempty",json:"schedule,omitempty"`     // Storage replication schedule. The format is a subset of `systemd` calendar events.
	Source    *string  `url:"source,omitempty",json:"source,omitempty"`         // For internal use, to detect if the guest was stolen.
}

type UpdateResponse

type UpdateResponse map[string]interface{}

Jump to

Keyboard shortcuts

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