nodes

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildCreateRequest

type ChildCreateRequest struct {
	Node string `url:"node" json:"node"` // The cluster node name.

	// The following parameters are optional
	Apiversion *int          `url:"apiversion,omitempty" json:"apiversion,omitempty"`   // The JOIN_API_VERSION of the new node.
	Force      *util.PVEBool `url:"force,omitempty" json:"force,omitempty"`             // Do not throw error if node already exists.
	Links      *Links        `url:"link[n],omitempty" json:"link[n],omitempty"`         // Address and priority information of a single corosync link. (up to 8 links supported; link0..link7)
	NewNodeIp  *string       `url:"new_node_ip,omitempty" json:"new_node_ip,omitempty"` // IP Address of node to add. Used as fallback if no links are given.
	Nodeid     *int          `url:"nodeid,omitempty" json:"nodeid,omitempty"`           // Node id for this node.
	Votes      *int          `url:"votes,omitempty" json:"votes,omitempty"`             // Number of votes for this node
}

func (*ChildCreateRequest) UnmarshalJSON added in v0.0.19

func (t *ChildCreateRequest) UnmarshalJSON(d []byte) error

type ChildCreateResponse

type ChildCreateResponse struct {
	CorosyncAuthkey string   `url:"corosync_authkey" json:"corosync_authkey"`
	CorosyncConf    string   `url:"corosync_conf" json:"corosync_conf"`
	Warnings        []string `url:"warnings" json:"warnings"`
}

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) ChildCreate

func (c *Client) ChildCreate(ctx context.Context, req ChildCreateRequest) (ChildCreateResponse, error)

ChildCreate Adds a node to the cluster configuration. This call is for internal use.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, req DeleteRequest) error

Delete Removes a node from the cluster configuration.

func (*Client) Index

func (c *Client) Index(ctx context.Context) ([]IndexResponse, error)

Index Corosync node list.

type DeleteRequest

type DeleteRequest struct {
	Node string `url:"node" json:"node"` // The cluster node name.

}

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexResponse

type IndexResponse struct {
	Node string `url:"node" json:"node"`
}
type Link struct {
	Address string `url:"address" json:"address"` // Hostname (or IP) of this corosync link address.

	// The following parameters are optional
	Priority *int `url:"priority,omitempty" json:"priority,omitempty"` // The priority for the link when knet is used in 'passive' mode (default). Lower value means higher priority. Only valid for cluster create, ignored on node add.
}

Address and priority information of a single corosync link. (up to 8 links supported; link0..link7)

func (Link) EncodeValues added in v0.0.15

func (t Link) EncodeValues(key string, v *url.Values) error

func (*Link) UnmarshalJSON added in v0.0.19

func (t *Link) UnmarshalJSON(d []byte) error
type Links []*Link

Array of Link

func (Links) EncodeValues added in v0.0.15

func (t Links) EncodeValues(key string, v *url.Values) error

Jump to

Keyboard shortcuts

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