groups

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 2 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) 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) (map[string]interface{}, 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) 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 *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 HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexResponse

type IndexResponse struct {
	Group string `url:"group" json:"group"`
}

type Type added in v0.0.15

type Type string
const (
	Type_GROUP Type = "group"
)

func PtrType added in v0.0.15

func PtrType(i Type) *Type

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.
}

Jump to

Keyboard shortcuts

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