Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Create(ctx context.Context, req CreateRequest) error
- func (c *Client) Delete(ctx context.Context, req DeleteRequest) error
- func (c *Client) Find(ctx context.Context, req FindRequest) (map[string]interface{}, error)
- func (c *Client) Index(ctx context.Context) ([]map[string]interface{}, error)
- func (c *Client) Update(ctx context.Context, req UpdateRequest) error
- type CreateRequest
- type DeleteRequest
- type FindRequest
- type HTTPClient
- type RemoveJob
- type Type
- type UpdateRequest
Constants ¶
View Source
const ( RemoveJob_LOCAL RemoveJob = "local" RemoveJob_FULL RemoveJob = "full" Type_LOCAL Type = "local" )
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) error
Create Create a new replication job
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, req DeleteRequest) error
Delete Mark replication job for removal.
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 Type `url:"type" json:"type"` // Section type. // The following parameters are optional Comment *string `url:"comment,omitempty" json:"comment,omitempty"` // Description. Disable *util.PVEBool `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 *RemoveJob `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 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 *util.PVEBool `url:"force,omitempty" json:"force,omitempty"` // Will remove the jobconfig entry, but will not cleanup. Keep *util.PVEBool `url:"keep,omitempty" json:"keep,omitempty"` // Keep replicated data at target (do not remove). }
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 HTTPClient ¶
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 *util.PVEBool `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 *RemoveJob `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. }
Click to show internal directories.
Click to hide internal directories.