remote

package
v0.0.0-...-10b4495 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func NewHttpClient

func NewHttpClient(apiPort int, requestTimeout time.Duration) *httpClient

Types

type Client

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

func NewClient

func NewClient(specificClient external.Caravela, clientNode common.Node) *Client

func (*Client) AdvertiseOffersNeighbor

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

func (*Client) CreateOffer

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

func (*Client) GetOffers

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

func (*Client) LaunchContainer

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

func (*Client) ObtainConfiguration

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

func (*Client) RefreshOffer

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

func (*Client) RemoveOffer

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

func (*Client) StopLocalContainer

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

func (*Client) UpdateOffer

func (h *Client) UpdateOffer(ctx context.Context, fromSupplier, toTrader *types.Node, offer *types.Offer) 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