node

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

Node is the top level entry structure, facade, for all the functionality of a CARAVELA's node.

func NewNode

func NewNode(config *configuration.Configuration, overlay external.Overlay, caravelaCli external.Caravela,
	dockerClient external.DockerClient, apiServer api.Server) *Node

NewNode creates a Node object that contains all the functionality of a CARAVELA's node.

func (*Node) AddTrader

func (node *Node) AddTrader(guidBytes []byte)

func (*Node) AdvertiseOffersNeighbor

func (node *Node) AdvertiseOffersNeighbor(fromTrader, toNeighborTrader, traderOffering *types.Node)

func (*Node) AvailableResourcesSim

func (node *Node) AvailableResourcesSim() types.Resources

func (*Node) Configuration

func (node *Node) Configuration() *configuration.Configuration

Configuration returns the system's configuration of this CARAVELA's node.

func (*Node) CreateOffer

func (node *Node) CreateOffer(fromNode *types.Node, toNode *types.Node, offer *types.Offer)

func (*Node) GetOffers

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

func (*Node) LaunchContainers

func (node *Node) LaunchContainers(fromBuyer *types.Node, offer *types.Offer,
	containerConfig *types.ContainerConfig) (*types.ContainerStatus, error)

func (*Node) ListContainers

func (node *Node) ListContainers() []types.ContainerStatus

func (*Node) MaximumResourcesSim

func (node *Node) MaximumResourcesSim() types.Resources

func (*Node) RefreshOffer

func (node *Node) RefreshOffer(fromTrader *types.Node, offer *types.Offer) bool

func (*Node) RefreshOffersSim

func (node *Node) RefreshOffersSim()

func (*Node) RemoveOffer

func (node *Node) RemoveOffer(fromSupp *types.Node, toTrader *types.Node, offer *types.Offer)

func (*Node) SpreadOffersSim

func (node *Node) SpreadOffersSim()

func (*Node) Start

func (node *Node) Start(join bool, joinIP string) error

func (*Node) Stop

func (node *Node) Stop()

func (*Node) StopContainers

func (node *Node) StopContainers(containersIDs []string) error

func (*Node) StopLocalContainer

func (node *Node) StopLocalContainer(containerID string) error

func (*Node) SubmitContainers

func (node *Node) SubmitContainers(containerImageKey string, portMappings []types.PortMapping,
	containerArgs []string, cpus int, ram int) error

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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