services

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 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) Find

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

Find Directory index

func (*Client) Index

func (c *Client) Index(ctx context.Context, req IndexRequest) ([]map[string]interface{}, error)

Index Service list.

func (*Client) ServiceReload

func (c *Client) ServiceReload(ctx context.Context, req ServiceReloadRequest) (string, error)

ServiceReload Reload service. Falls back to restart if service cannot be reloaded.

func (*Client) ServiceRestart

func (c *Client) ServiceRestart(ctx context.Context, req ServiceRestartRequest) (string, error)

ServiceRestart Hard restart service. Use reload if you want to reduce interruptions.

func (*Client) ServiceStart

func (c *Client) ServiceStart(ctx context.Context, req ServiceStartRequest) (string, error)

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

func (c *Client) ServiceStop(ctx context.Context, req ServiceStopRequest) (string, error)

ServiceStop Stop service.

type FindRequest

type FindRequest struct {
	Node    string `url:"node" json:"node"`       // The cluster node name.
	Service string `url:"service" json:"service"` // Service ID

}

type FindResponse

type FindResponse struct {
	Subdir string `url:"subdir" json:"subdir"`
}

type HTTPClient

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

type IndexRequest

type IndexRequest struct {
	Node string `url:"node" json:"node"` // The cluster node name.

}

type ServiceReloadRequest

type ServiceReloadRequest struct {
	Node    string `url:"node" json:"node"`       // The cluster node name.
	Service string `url:"service" json:"service"` // Service ID

}

type ServiceRestartRequest

type ServiceRestartRequest struct {
	Node    string `url:"node" json:"node"`       // The cluster node name.
	Service string `url:"service" json:"service"` // Service ID

}

type ServiceStartRequest

type ServiceStartRequest struct {
	Node    string `url:"node" json:"node"`       // The cluster node name.
	Service string `url:"service" json:"service"` // Service ID

}

type ServiceStateRequest

type ServiceStateRequest struct {
	Node    string `url:"node" json:"node"`       // The cluster node name.
	Service string `url:"service" json:"service"` // Service ID

}

type ServiceStopRequest

type ServiceStopRequest struct {
	Node    string `url:"node" json:"node"`       // The cluster node name.
	Service string `url:"service" json:"service"` // Service ID

}

Jump to

Keyboard shortcuts

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