nodes

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: MIT Imports: 3 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.SpecialBool `url:"force,omitempty" json:"force,omitempty"`             // Do not throw error if node already exists.
	Links      *LinknArr         `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) 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 Linkn added in v0.0.10

type Linkn 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 (Linkn) EncodeValues added in v0.0.10

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

type LinknArr added in v0.0.10

type LinknArr []Linkn

Array of Linkn

func (LinknArr) EncodeValues added in v0.0.10

func (t LinknArr) 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