Documentation ¶
Index ¶
- type Client
- func (c *Client) Find(ctx context.Context, req FindRequest) ([]FindResponse, error)
- func (c *Client) Index(ctx context.Context, req IndexRequest) ([]map[string]interface{}, error)
- func (c *Client) ServiceReload(ctx context.Context, req ServiceReloadRequest) (string, error)
- func (c *Client) ServiceRestart(ctx context.Context, req ServiceRestartRequest) (string, error)
- func (c *Client) ServiceStart(ctx context.Context, req ServiceStartRequest) (string, error)
- func (c *Client) ServiceState(ctx context.Context, req ServiceStateRequest) (map[string]interface{}, error)
- func (c *Client) ServiceStop(ctx context.Context, req ServiceStopRequest) (string, error)
- type FindRequest
- type FindResponse
- type HTTPClient
- type IndexRequest
- type Service
- type ServiceReloadRequest
- type ServiceRestartRequest
- type ServiceStartRequest
- type ServiceStateRequest
- type ServiceStopRequest
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) Find ¶
func (c *Client) Find(ctx context.Context, req FindRequest) ([]FindResponse, error)
Find Directory index
func (*Client) ServiceReload ¶
ServiceReload Reload service. Falls back to restart if service cannot be reloaded.
func (*Client) ServiceRestart ¶
ServiceRestart Hard restart service. Use reload if you want to reduce interruptions.
func (*Client) ServiceStart ¶
ServiceStart Start service.
func (*Client) ServiceState ¶
func (c *Client) ServiceState(ctx context.Context, req ServiceStateRequest) (map[string]interface{}, error)
ServiceState Read service properties
func (*Client) ServiceStop ¶
ServiceStop Stop service.
type FindRequest ¶
type FindResponse ¶
type FindResponse struct {
Subdir string `url:"subdir" json:"subdir"`
}
type HTTPClient ¶
type IndexRequest ¶
type IndexRequest struct {
Node string `url:"node" json:"node"` // The cluster node name.
}
type Service ¶ added in v0.0.15
type Service string
const ( Service_CHRONY Service = "chrony" Service_COROSYNC Service = "corosync" Service_CRON Service = "cron" Service_KSMTUNED Service = "ksmtuned" Service_POSTFIX Service = "postfix" Service_PVE_CLUSTER Service = "pve-cluster" Service_PVE_FIREWALL Service = "pve-firewall" Service_PVE_HA_CRM Service = "pve-ha-crm" Service_PVE_HA_LRM Service = "pve-ha-lrm" Service_PVEDAEMON Service = "pvedaemon" Service_PVEFW_LOGGER Service = "pvefw-logger" Service_PVEPROXY Service = "pveproxy" Service_PVESCHEDULER Service = "pvescheduler" Service_PVESTATD Service = "pvestatd" Service_SPICEPROXY Service = "spiceproxy" Service_SSHD Service = "sshd" Service_SYSLOG Service = "syslog" Service_SYSTEMD_JOURNALD Service = "systemd-journald" Service_SYSTEMD_TIMESYNCD Service = "systemd-timesyncd" )
func PtrService ¶ added in v0.0.15
type ServiceReloadRequest ¶
type ServiceRestartRequest ¶
type ServiceStartRequest ¶
type ServiceStateRequest ¶
type ServiceStopRequest ¶
Click to show internal directories.
Click to hide internal directories.