client

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client struct

func NewClient

func NewClient(id uint32, seed string) (*Client, error)

NewClient creates a new instance of client

func (*Client) AddressOf

func (c *Client) AddressOf(nodeID string) (net.IP, error)

AddressOf return the yggdrasil node address given it's node id

func (*Client) Node

func (c *Client) Node(nodeID string) (*NodeClient, error)

Node gets a client to node given its id

func (*Client) NodeWithIP

func (c *Client) NodeWithIP(ip net.IP) *NodeClient

NodeWithIP return a client to node given node IP

type NodeClient

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

NodeClient is a client of the node

func (*NodeClient) Counters

func (n *NodeClient) Counters() (total gridtypes.Capacity, used gridtypes.Capacity, err error)

func (*NodeClient) Delete

func (n *NodeClient) Delete(twin, deployment uint32) (err error)

Delete deletes a workload by id

func (*NodeClient) Deploy

func (n *NodeClient) Deploy(dl *gridtypes.Deployment, update bool) error

Deploy sends the workload for node to deploy. On success means the node accepted the workload (it passed validation), doesn't mean it has been deployed. the user then can pull on the workload status until it passes (or fail)

func (*NodeClient) Get

func (n *NodeClient) Get(twin, deployment uint32) (dl gridtypes.Deployment, err error)

Get get a workload by id

Jump to

Keyboard shortcuts

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