remote

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

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 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

type HttpClient

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

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

func NewHttpClient

func NewHttpClient(config *configuration.Configuration) *HttpClient

func (*HttpClient) AdvertiseOffersNeighbor

func (client *HttpClient) AdvertiseOffersNeighbor(fromTrader, toNeighborTrader, traderOffering *types.Node) error

func (*HttpClient) CreateOffer

func (client *HttpClient) CreateOffer(fromNode, toNode *types.Node, offer *types.Offer) error

func (*HttpClient) GetOffers

func (client *HttpClient) GetOffers(fromNode, toTrader *types.Node, relay bool) ([]types.AvailableOffer, error)

func (*HttpClient) LaunchContainer

func (client *HttpClient) LaunchContainer(fromBuyer, toSupplier *types.Node, offer *types.Offer,
	containerConfig *types.ContainerConfig) (*types.ContainerStatus, error)

func (*HttpClient) ObtainConfiguration

func (client *HttpClient) ObtainConfiguration(systemsNode *types.Node) (*configuration.Configuration, error)

func (*HttpClient) RefreshOffer

func (client *HttpClient) RefreshOffer(fromTrader, toSupp *types.Node, offer *types.Offer) (bool, error)

func (*HttpClient) RemoveOffer

func (client *HttpClient) RemoveOffer(fromSupp, toTrader *types.Node, offer *types.Offer) error

func (*HttpClient) StopLocalContainer

func (client *HttpClient) StopLocalContainer(toSupplier *types.Node, containerID string) error

Jump to

Keyboard shortcuts

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