client

package
v0.1.0-alpha.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2016 License: MIT Imports: 15 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 {

	// 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 New

func New() (*Client, error)

New creates a new Client

func (*Client) Call

func (c *Client) Call(method string, args interface{}, reply interface{}) error

Call wraps a regular rpc.Call to give more user-friendly error messages in some cases.

func (*Client) CallWithoutVersionCheck

func (c *Client) CallWithoutVersionCheck(method string, args interface{}, reply interface{}) error

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) Close

func (c *Client) Close()

Close will end the RPC connection

func (*Client) Connect

func (c *Client) Connect(startServer bool) error

Connect tries to connect to a server. If startServer is true, and connection fails, try to start a new server.

func (*Client) Info

func (c *Client) Info(name string) (service.Info, error)

Info calls the Info cmd on the Server

func (*Client) List

func (c *Client) List(running bool, temp bool) ([]service.Info, error)

List calls the List cmd on the 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) Shutdown

func (c *Client) Shutdown() error

Shutdown calls the Exit cmd on the Server

func (*Client) Start

func (c *Client) Start(name string) (service.Info, error)

Start calls the Start cmd on the Server

func (*Client) Stop

func (c *Client) Stop(name string) (service.Info, error)

Stop calls the Stop 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

func (*Client) Version

func (c *Client) Version() (semver.Version, error)

Version calls the Version cmd on the Server

func (*Client) Wait

func (c *Client) Wait(name string) (service.Info, error)

Wait calls the Wait cmd on the Server

Jump to

Keyboard shortcuts

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