client

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

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