client

package
v0.0.0-...-3098c48 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package client implements a client to the kube-volume-freezer Minion API.

Index

Constants

This section is empty.

Variables

View Source
var UserAgent = "kvf/" + version.Version

UserAgent that is sent with the HTTP Header on each request.

Functions

This section is empty.

Types

type Client

type Client struct {
	*generic.Client
	// contains filtered or unexported fields
}

Client performs requests to the Minion API.

func New

func New(address string, opts *Options) (*Client, error)

New returns a new Client.

func NewOrDie

func NewOrDie(address string, opts *Options) *Client

NewOrDie is like New but panics upon error

func (*Client) Volumes

func (c *Client) Volumes() VolumesService

Volumes returns a Service to manipulate Volume Resources.

type Factory

type Factory func(address string) (Interface, error)

Factory creates instances of Client.

func NewFactory

func NewFactory(options *Options) Factory

NewFactory returns a new Factory.

type Interface

type Interface interface {
	VolumesInterface
}

Interface of the Client.

type Options

type Options struct {
	HTTPClient *http.Client
	Token      string
}

Options is used for creating an instance of Client.

type VolumesInterface

type VolumesInterface interface {
	Volumes() VolumesService
}

VolumesInterface is part of the Clients interface.

type VolumesService

type VolumesService interface {
	List(podUID string) (*api.VolumeList, error)
	Get(podUID string, name string) (*api.Volume, error)
	Freeze(podUID string, name string) (*api.Volume, error)
	Thaw(podUID string, name string) (*api.Volume, error)
}

VolumesService is an interface for interacting with volumes in the minion API.

Directories

Path Synopsis
Package clienttest provides utilities for testing the Minion Client.
Package clienttest provides utilities for testing the Minion Client.

Jump to

Keyboard shortcuts

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