nodes

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 1 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      *bool   `url:"force,omitempty",json:"force,omitempty"`             // Do not throw error if node already exists.
	Linkn      *string `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
}

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) (*DeleteResponse, 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 DeleteResponse

type DeleteResponse map[string]interface{}

type HTTPClient

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

type IndexResponse

type IndexResponse []*struct {
	Node string `url:"node",json:"node"`
}

Jump to

Keyboard shortcuts

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