client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConnectionTimeout = 30 * time.Second
	DefaultExecutionTimeout  = 5 * time.Minute
)

DefaultTimeout tells to use the timeout by default depending on context

Variables

This section is empty.

Functions

func DecorateError

func DecorateError(err error, action string, maySucceed bool) error

DecorateError changes the error to something more comprehensible when timeout occured

func IsTimeout

func IsTimeout(err error) bool

IsTimeout tells if the err is a timeout kind

Types

type Client

type Client *Session

Client is a instance of Session used temporarily until the session logic in brokerd is implemented

func New

func New() Client

New returns an instance of broker Client

type Session

type Session struct {
	Bucket   *bucket
	Host     *host
	Share    *share
	Network  *network
	Ssh      *ssh
	Tenant   *tenant
	Volume   *volume
	Template *template
	Image    *image
	// contains filtered or unexported fields
}

Session units the different resources proposed by brokerd as broker client

func (*Session) Connect

func (s *Session) Connect()

Connect establishes connection with brokerd

func (*Session) Disconnect

func (s *Session) Disconnect()

Disconnect cuts the connection with brokerd

Jump to

Keyboard shortcuts

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