groups

package
v0.0.1 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 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) (*CreateResponse, error)

Create Create a new HA group.

func (*Client) Delete

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

Delete Delete ha group configuration.

func (*Client) Find

func (c *Client) Find(ctx context.Context, req *FindRequest) error

Find Read ha group configuration.

func (*Client) Index

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

Index Get HA groups.

func (*Client) Update

func (c *Client) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)

Update Update 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 *bool   `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 *bool   `url:"restricted,omitempty",json:"restricted,omitempty"` // Resources bound to restricted groups may only run on nodes defined by the group.
	Type       *string `url:"type,omitempty",json:"type,omitempty"`             // Group type.
}

type CreateResponse

type CreateResponse map[string]interface{}

type DeleteRequest

type DeleteRequest struct {
	Group string `url:"group",json:"group"` // The HA group identifier.

}

type DeleteResponse

type DeleteResponse map[string]interface{}

type FindRequest

type FindRequest struct {
	Group string `url:"group",json:"group"` // The HA group identifier.

}

type HTTPClient

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

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 *bool   `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 *bool   `url:"restricted,omitempty",json:"restricted,omitempty"` // Resources bound to restricted groups may only run on nodes defined by the group.
}

type UpdateResponse

type UpdateResponse map[string]interface{}

Jump to

Keyboard shortcuts

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