client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2016 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {

	// HTTP is the underlying HTTP client.
	Client *http.Client

	// Host is the host[:port] of the remote libStorage API.
	Host string

	// LogRequests is a flag indicating whether or not to log HTTP requests.
	LogRequests bool

	// LogResponses is a flag indicating whether or not to log HTTP responses.
	LogResponses bool

	// Headers are headers to send with each HTTP request.
	Headers http.Header

	// ServerName returns the name of the server to which the client is
	// connected. This is not the same as the host name, rather it's the
	// randomly generated name the server creates for unique identification
	// when the server starts for the first time. This value is updated
	// by every request to the server that returns the server name header
	// as part of its response.
	ServerName string
}

Client is the libStorage API client.

func (*Client) VolumeCreate

func (c *Client) VolumeCreate(lr *types.VolumeCreateRequest) (reply *types.Volume, err error)

VolumeCreate create a volume

func (*Client) VolumeInspect

func (c *Client) VolumeInspect(instanceID string) (reply *types.Volume, err error)

VolumeInspect will inspect a specific volume

func (*Client) VolumeLabel

func (c *Client) VolumeLabel(lr *types.VolumeLabelRequest) (reply *types.Volume, err error)

VolumeLabel creates labels on a volume

func (*Client) VolumeLabelsRemove

func (c *Client) VolumeLabelsRemove(lr *types.VolumeLabelsRemoveRequest) (reply *types.Volume, err error)

VolumeLabelsRemove removes labels from a volume

func (*Client) VolumeOffer

func (c *Client) VolumeOffer(offer *types.VolumeOfferRequest) (reply *types.Volume, err error)

VolumeOffer will advertise a volume to schedulers

func (*Client) VolumeOfferRevoke

func (c *Client) VolumeOfferRevoke(offer *types.VolumeOfferRevokeRequest) (reply *types.Volume, err error)

VolumeOfferRevoke will revoke an offer from schedulers

func (*Client) VolumeRemove

func (c *Client) VolumeRemove(volumeID string) (err error)

VolumeRemove removes a volume

func (*Client) Volumes

func (c *Client) Volumes() (reply []*types.Volume, err error)

Volumes returns a list of all registered Volumes for all Services.

func (*Client) VolumesAll

func (c *Client) VolumesAll() (reply []*types.Volume, err error)

VolumesAll returns a list of all Volumes available for all Services.

Jump to

Keyboard shortcuts

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