 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, req CreateRequest) error
- func (c *Client) Delete(ctx context.Context, req DeleteRequest) error
- func (c *Client) Find(ctx context.Context, req FindRequest) error
- func (c *Client) Index(ctx context.Context) ([]IndexResponse, error)
- func (c *Client) Update(ctx context.Context, req UpdateRequest) error
 
- type CreateRequest
- type DeleteRequest
- type FindRequest
- type HTTPClient
- type IndexResponse
- type Type
- type UpdateRequest
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 ¶
func (c *Client) Create(ctx context.Context, req CreateRequest) error
Create Create a new HA group.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, req DeleteRequest) error
Delete Delete ha group configuration.
func (*Client) Find ¶
func (c *Client) Find(ctx context.Context, req FindRequest) error
Find Read ha group configuration.
type CreateRequest ¶
type CreateRequest struct {
	Group string `url:"group" json:"group"` // The HA group identifier.
	Nodes string `url:"nodes" json:"nodes"` // List of cluster node names with optional priority.
	// The following parameters are optional
	Comment    *string       `url:"comment,omitempty" json:"comment,omitempty"`       // Description.
	Nofailback *util.PVEBool `url:"nofailback,omitempty" json:"nofailback,omitempty"` // The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior.
	Restricted *util.PVEBool `url:"restricted,omitempty" json:"restricted,omitempty"` // Resources bound to restricted groups may only run on nodes defined by the group.
	Type       *Type         `url:"type,omitempty" json:"type,omitempty"`             // Group type.
}
    type DeleteRequest ¶
type DeleteRequest struct {
	Group string `url:"group" json:"group"` // The HA group identifier.
}
    type FindRequest ¶
type FindRequest struct {
	Group string `url:"group" json:"group"` // The HA group identifier.
}
    type HTTPClient ¶
type IndexResponse ¶
type IndexResponse struct {
	Group string `url:"group" json:"group"`
}
    type UpdateRequest ¶
type UpdateRequest struct {
	Group string `url:"group" json:"group"` // The HA group identifier.
	// The following parameters are optional
	Comment    *string       `url:"comment,omitempty" json:"comment,omitempty"`       // Description.
	Delete     *string       `url:"delete,omitempty" json:"delete,omitempty"`         // A list of settings you want to delete.
	Digest     *string       `url:"digest,omitempty" json:"digest,omitempty"`         // Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
	Nodes      *string       `url:"nodes,omitempty" json:"nodes,omitempty"`           // List of cluster node names with optional priority.
	Nofailback *util.PVEBool `url:"nofailback,omitempty" json:"nofailback,omitempty"` // The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior.
	Restricted *util.PVEBool `url:"restricted,omitempty" json:"restricted,omitempty"` // Resources bound to restricted groups may only run on nodes defined by the group.
}
     Click to show internal directories. 
   Click to hide internal directories.