Documentation ¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, req CreateRequest) (string, error)
- func (c *Client) Index(ctx context.Context) ([]map[string]interface{}, error)
- func (c *Client) Join(ctx context.Context, req JoinRequest) (string, error)
- func (c *Client) JoinApiVersionApiversion(ctx context.Context) (int, error)
- func (c *Client) JoinInfo(ctx context.Context, req JoinInfoRequest) (JoinInfoResponse, error)
- func (c *Client) StatusQdevice(ctx context.Context) (map[string]interface{}, error)
- func (c *Client) Totem(ctx context.Context) (map[string]interface{}, error)
- type CreateRequest
- type HTTPClient
- type JoinInfoRequest
- type JoinInfoResponse
- type JoinRequest
- type Link
- type Links
- type Nodelist
- type Ring0Addr
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
}
func New ¶
func New(c HTTPClient) *Client
func (*Client) Create ¶
Create Generate new cluster configuration. If no links given, default to local IP address as link0.
func (*Client) Join ¶
Join Joins this node into an existing cluster. If no links are given, default to IP resolved by node's hostname on single link (fallback fails for clusters with multiple links).
func (*Client) JoinApiVersionApiversion ¶
JoinApiVersionApiversion Return the version of the cluster join API available on this node.
func (*Client) JoinInfo ¶ added in v0.0.15
func (c *Client) JoinInfo(ctx context.Context, req JoinInfoRequest) (JoinInfoResponse, error)
JoinInfo Get information needed to join this cluster over the connected node.
func (*Client) StatusQdevice ¶
StatusQdevice Get QDevice status
type CreateRequest ¶
type CreateRequest struct { Clustername string `url:"clustername" json:"clustername"` // The name of the cluster. // The following parameters are optional 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) 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 (*CreateRequest) UnmarshalJSON ¶ added in v0.0.19
func (t *CreateRequest) UnmarshalJSON(d []byte) error
type HTTPClient ¶
type JoinInfoRequest ¶ added in v0.0.15
type JoinInfoRequest struct { // The following parameters are optional Node *string `url:"node,omitempty" json:"node,omitempty"` // The node for which the joinee gets the nodeinfo. }
type JoinInfoResponse ¶ added in v0.0.15
type JoinRequest ¶
type JoinRequest struct { Fingerprint string `url:"fingerprint" json:"fingerprint"` // Certificate SHA 256 fingerprint. Hostname string `url:"hostname" json:"hostname"` // Hostname (or IP) of an existing cluster member. Password string `url:"password" json:"password"` // Superuser (root) password of peer node. // The following parameters are optional 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) 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 (*JoinRequest) UnmarshalJSON ¶ added in v0.0.19
func (t *JoinRequest) UnmarshalJSON(d []byte) error
type Link ¶ added in v0.0.15
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 (*Link) UnmarshalJSON ¶ added in v0.0.19
type Nodelist ¶ added in v0.0.10
type Nodelist struct { Name string `url:"name" json:"name"` // The cluster node name. PveAddr string `url:"pve_addr" json:"pve_addr"` PveFp string `url:"pve_fp" json:"pve_fp"` // Certificate SHA 256 fingerprint. QuorumVotes int `url:"quorum_votes" json:"quorum_votes"` // The following parameters are optional Nodeid *int `url:"nodeid,omitempty" json:"nodeid,omitempty"` // Node id for this node. Ring0Addr *Ring0Addr `url:"ring0_addr,omitempty" json:"ring0_addr,omitempty"` // Address and priority information of a single corosync link. (up to 8 links supported; link0..link7) }
type Ring0Addr ¶ added in v0.0.10
type Ring0Addr 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)