client

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

The client package is a client implementation of the mayu network API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// Scheme defines the protocol scheme. This is either http or https.
	Scheme string

	// Host is used to connect to mayu over network.
	Host string

	// Port is used to connect to mayu over network.
	Port uint16
}

Client implements the network API. Check the corresponding methods.

func New

func New(scheme, host string, port uint16) (*Client, error)

New creates a new configured client to interact with mayu over its network API.

func (*Client) BootComplete

func (c *Client) BootComplete(serial string, host hostmgr.Host) error

func (*Client) List

func (c *Client) List() ([]hostmgr.Host, error)

List fetches a list of node information within the current cluster.

func (*Client) Override

func (c *Client) Override(serial, property, value string) error

Override overrides a template properties such as docker_version, yochu_version, etc

func (*Client) SetEtcdClusterToken

func (c *Client) SetEtcdClusterToken(serial, value string) error

SetEtcdClusterToken sets the etcd cluster token given by value for a node given by serial.

func (*Client) SetIPMIAddr

func (c *Client) SetIPMIAddr(serial, value string) error

SetIPMIAddr sets the IPMI address given by value for a node given by serial.

func (*Client) SetProviderId

func (c *Client) SetProviderId(serial, value string) error

SetProviderId sets the provider ID given by value for a node given by serial.

func (*Client) SetState

func (c *Client) SetState(serial, value string) error

SetState sets the machine state for a node given by serial.

func (*Client) Status

func (c *Client) Status(serial string) (hostmgr.Host, error)

Status fetches status information for a node given by serial.

Jump to

Keyboard shortcuts

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