Documentation
¶
Index ¶
- type Client
- func (c *Client) Call(method string, args interface{}, reply interface{}) error
- func (c *Client) CallWithoutVersionCheck(method string, args interface{}, reply interface{}) error
- func (c *Client) Clean(pattern string, age time.Duration) ([]service.Info, []server.RemoveFailure, error)
- func (c *Client) Close()
- func (c *Client) Connect(startServer bool) error
- func (c *Client) Info(name string) (service.Info, error)
- func (c *Client) List(running bool, temp bool) ([]service.Info, error)
- func (c *Client) LoadServices(serviceFilePath string) (server.LoadServicesResponse, error)
- func (c *Client) Run(name, program string, runArgs []string, dir string, env map[string]string, ...) (service.Info, error)
- func (c *Client) Shutdown() error
- func (c *Client) Start(name string) (service.Info, error)
- func (c *Client) Stop(name string) (service.Info, error)
- func (c *Client) Tail(name string, stdout, stderr bool, follow, followRestarts bool, pid, max int) (<-chan string, <-chan string, <-chan error)
- func (c *Client) Version() (semver.Version, error)
- func (c *Client) Wait(name string) (service.Info, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// ServerVersion is reported by the server from an RPC call right after
// connect
ServerVersion semver.Version
// contains filtered or unexported fields
}
Client handles communicating with a Server
func (*Client) Call ¶
Call wraps a regular rpc.Call to give more user-friendly error messages in some cases.
func (*Client) CallWithoutVersionCheck ¶
CallWithoutVersionCheck skips checking that the client & server versions match
func (*Client) Clean ¶
func (c *Client) Clean(pattern string, age time.Duration) ([]service.Info, []server.RemoveFailure, error)
Clean calls the Clean cmd on the Server
func (*Client) Connect ¶
Connect tries to connect to a server. If startServer is true, and connection fails, try to start a new server.
func (*Client) LoadServices ¶
func (c *Client) LoadServices(serviceFilePath string) (server.LoadServicesResponse, error)
LoadServices calls the LoadServices cmd on the Server
func (*Client) Run ¶
func (c *Client) Run(name, program string, runArgs []string, dir string, env map[string]string, cleanAfter time.Duration) (service.Info, error)
Run calls the Run cmd on the Server
func (*Client) Tail ¶
func (c *Client) Tail(name string, stdout, stderr bool, follow, followRestarts bool, pid, max int) (<-chan string, <-chan string, <-chan error)
Tail calls the Tail cmd on the Server
Click to show internal directories.
Click to hide internal directories.