remote

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2018 License: GPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const CaravelaInstanceUnavailable = 2
View Source
const Unknown = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.2.0

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

Client is used to contact the REST API of other nodes.

func NewClient added in v0.2.0

func NewClient(config *configuration.Configuration) *Client

func (*Client) AdvertiseOffersNeighbor added in v0.2.0

func (client *Client) AdvertiseOffersNeighbor(ctx context.Context, fromTrader, toNeighborTrader, traderOffering *types.Node) error

func (*Client) CreateOffer added in v0.2.0

func (client *Client) CreateOffer(ctx context.Context, fromNode, toNode *types.Node, offer *types.Offer) error

func (*Client) GetOffers added in v0.2.0

func (client *Client) GetOffers(ctx context.Context, fromNode, toTrader *types.Node, relay bool) ([]types.AvailableOffer, error)

func (*Client) LaunchContainer added in v0.2.0

func (client *Client) LaunchContainer(ctx context.Context, fromBuyer, toSupplier *types.Node, offer *types.Offer,
	containersConfigs []types.ContainerConfig) ([]types.ContainerStatus, error)

func (*Client) ObtainConfiguration added in v0.2.0

func (client *Client) ObtainConfiguration(c context.Context, systemsNode *types.Node) (*configuration.Configuration, error)

func (*Client) RefreshOffer added in v0.2.0

func (client *Client) RefreshOffer(ctx context.Context, fromTrader, toSupp *types.Node, offer *types.Offer) (bool, error)

func (*Client) RemoveOffer added in v0.2.0

func (client *Client) RemoveOffer(ctx context.Context, fromSupp, toTrader *types.Node, offer *types.Offer) error

func (*Client) StopLocalContainer added in v0.2.0

func (client *Client) StopLocalContainer(ctx context.Context, toSupplier *types.Node, containerID string) error

type Error

type Error struct {
	Code int
	// contains filtered or unexported fields
}

Error of CARAVELA's remote client.

func NewRemoteClientError

func NewRemoteClientError(err error) *Error

func (*Error) Error

func (ce *Error) Error() string

Jump to

Keyboard shortcuts

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