client

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2018 License: Apache-2.0 Imports: 2 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 interface {
	SubmitReplicationJob(*Replication) error
	StopReplicationJobs(policyID int64) error
}

Client defines the methods that a jobservice client should implement

type Config

type Config struct {
	Secret string
}

Config contains configuration items needed for DefaultClient

type DefaultClient

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

DefaultClient provides a default implement for the interface Client

func NewDefaultClient

func NewDefaultClient(endpoint string, cfg *Config) *DefaultClient

NewDefaultClient returns an instance of DefaultClient

func (*DefaultClient) StopReplicationJobs

func (d *DefaultClient) StopReplicationJobs(policyID int64) error

StopReplicationJobs stop replication jobs of the policy specified by the policy ID

func (*DefaultClient) SubmitReplicationJob

func (d *DefaultClient) SubmitReplicationJob(replication *Replication) error

SubmitReplicationJob submits a replication job to the jobservice

type Replication

type Replication struct {
	PolicyID   int64    `json:"policy_id"`
	Repository string   `json:"repository"`
	Operation  string   `json:"operation"`
	Tags       []string `json:"tags"`
}

Replication holds information for submiting a replication job

Jump to

Keyboard shortcuts

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