Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateServer(ctx context.Context, data *ServerRequestData) error
- func (c *Client) DeleteServer(ctx context.Context, id string) error
- func (c *Client) ExpandPath(path string) string
- func (c *Client) GetServer(ctx context.Context, id string) (*ServerData, error)
- func (c *Client) GetServers(ctx context.Context) (*[]ServerData, error)
- func (c *Client) UpdateServer(ctx context.Context, data *ServerRequestData) error
- type ServerData
- type ServerRequestData
- type ServerResponseBody
- type ServersResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is an interface for accessing the Proxmox metrics management API.
func (*Client) CreateServer ¶
func (c *Client) CreateServer(ctx context.Context, data *ServerRequestData) error
CreateServer creates the metrics server.
func (*Client) DeleteServer ¶
DeleteServer deletes the metrics server.
func (*Client) ExpandPath ¶
ExpandPath expands a relative path to the Proxmox metrics server management API path.
func (*Client) GetServers ¶
func (c *Client) GetServers(ctx context.Context) (*[]ServerData, error)
GetServers lists the metrics servers.
func (*Client) UpdateServer ¶
func (c *Client) UpdateServer(ctx context.Context, data *ServerRequestData) error
UpdateServer updates the metrics server.
type ServerData ¶
type ServerData struct { Disable *int64 `json:"disable,omitempty" url:"disable,omitempty"` ID string `json:"id,omitempty" url:"id,omitempty"` MTU *int64 `json:"mtu" url:"mtu,omitempty"` Port int64 `json:"port" url:"port"` Server string `json:"server" url:"server"` Timeout *int64 `json:"timeout,omitempty" url:"timeout,omitempty"` Type *string `json:"type,omitempty" url:"type,omitempty"` // influxdb only options APIPathPrefix *string `json:"api-path-prefix,omitempty" url:"api-path-prefix,omitempty"` Bucket *string `json:"bucket,omitempty" url:"bucket,omitempty"` InfluxDBProto *string `json:"influxdbproto,omitempty" url:"influxdbproto,omitempty"` MaxBodySize *int64 `json:"max-body-size,omitempty" url:"max-body-size,omitempty"` Organization *string `json:"organization,omitempty" url:"organization,omitempty"` Token *string `json:"token,omitempty" url:"token,omitempty"` Verify *int64 `json:"verify-certificate,omitempty" url:"verify-certificate,omitempty"` // graphite only options Path *string `json:"path,omitempty" url:"path,omitempty"` Proto *string `json:"proto,omitempty" url:"proto,omitempty"` }
ServerData contains the data from a metrics server response.
type ServerRequestData ¶
type ServerRequestData struct { ServerData Delete *[]string `url:"delete,omitempty"` }
ServerRequestData contains the data for a metric server post/put request.
type ServerResponseBody ¶
type ServerResponseBody struct {
Data *ServerData `json:"data,omitempty"`
}
ServerResponseBody contains the body from a metrics server response.
type ServersResponseBody ¶
type ServersResponseBody struct {
Data *[]ServerData `json:"data,omitempty"`
}
ServersResponseBody contains the body from a metrics server list response.
Click to show internal directories.
Click to hide internal directories.