replication

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 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) Find

func (c *Client) Find(ctx context.Context, req FindRequest) ([]map[string]interface{}, error)

Find Directory index.

func (*Client) Index

func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)

Index List status of all replication jobs on this node.

func (*Client) JobStatus

func (c *Client) JobStatus(ctx context.Context, req JobStatusRequest) (map[string]interface{}, error)

JobStatus Get replication job status.

func (*Client) ReadJobLog

func (c *Client) ReadJobLog(ctx context.Context, req ReadJobLogRequest) ([]ReadJobLogResponse, error)

ReadJobLog Read replication job log.

func (*Client) ScheduleNow

func (c *Client) ScheduleNow(ctx context.Context, req ScheduleNowRequest) (string, error)

ScheduleNow Schedule replication job to start as soon as possible.

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>'.
	Node string `url:"node" json:"node"` // The cluster node name.

}

type HTTPClient

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

type IndexRequest

type IndexRequest struct {
	Node string `url:"node" json:"node"` // The cluster node name.

	// The following parameters are optional
	Guest *int `url:"guest,omitempty" json:"guest,omitempty"` // Only list replication jobs for this guest.
}

type IndexResponse

type IndexResponse struct {
	Id string `url:"id" json:"id"`
}

type JobStatusRequest

type JobStatusRequest 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>'.
	Node string `url:"node" json:"node"` // The cluster node name.

}

type ReadJobLogRequest

type ReadJobLogRequest 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>'.
	Node string `url:"node" json:"node"` // The cluster node name.

	// The following parameters are optional
	Limit *int `url:"limit,omitempty" json:"limit,omitempty"`
	Start *int `url:"start,omitempty" json:"start,omitempty"`
}

type ReadJobLogResponse

type ReadJobLogResponse struct {
	N int    `url:"n" json:"n"` // Line number
	T string `url:"t" json:"t"` // Line text

}

type ScheduleNowRequest

type ScheduleNowRequest 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>'.
	Node string `url:"node" json:"node"` // The cluster node name.

}

Jump to

Keyboard shortcuts

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