api

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2017 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package API provides the API to the daemon RPC service.

Index

Constants

View Source
const (
	// ServiceName is the name of the RPC service exposed by the daemon.
	ServiceName = "Daemon"

	// Version is the API version. It should be bumped any time the API changes.
	Version = -97
)

Variables

View Source
var ErrDaemonOffline = errors.New("daemon offline")

Functions

This section is empty.

Types

type AddCmdRequest added in v0.9.0

type AddCmdRequest struct {
	Text string
}

type AddCmdResponse added in v0.9.0

type AddCmdResponse struct {
	Seq int
}

type AddDirRequest added in v0.9.0

type AddDirRequest struct {
	Dir       string
	IncFactor float64
}

type AddDirResponse added in v0.9.0

type AddDirResponse struct{}

type Client added in v0.9.0

type Client struct {
	// contains filtered or unexported fields
}

func NewClient added in v0.9.0

func NewClient(sockPath string) *Client

func (*Client) AddCmd added in v0.9.0

func (c *Client) AddCmd(text string) (int, error)

func (*Client) AddDir added in v0.9.0

func (c *Client) AddDir(dir string, incFactor float64) error

func (*Client) CallDaemon added in v0.9.0

func (c *Client) CallDaemon(f string, req, res interface{}) error

func (*Client) Close added in v0.9.0

func (c *Client) Close() error

func (*Client) Cmd added in v0.9.0

func (c *Client) Cmd(seq int) (string, error)

func (*Client) Cmds added in v0.9.0

func (c *Client) Cmds(from, upto int) ([]string, error)

func (*Client) DelSharedVar added in v0.9.0

func (c *Client) DelSharedVar(name string) error

func (*Client) Dirs added in v0.9.0

func (c *Client) Dirs(blacklist map[string]struct{}) ([]storedefs.Dir, error)

func (*Client) NextCmd added in v0.9.0

func (c *Client) NextCmd(from int, prefix string) (int, string, error)

func (*Client) NextCmdSeq added in v0.9.0

func (c *Client) NextCmdSeq() (int, error)

func (*Client) Pid added in v0.9.0

func (c *Client) Pid() (int, error)

func (*Client) PrevCmd added in v0.9.0

func (c *Client) PrevCmd(upto int, prefix string) (int, string, error)

func (*Client) SetSharedVar added in v0.9.0

func (c *Client) SetSharedVar(name, value string) error

func (*Client) SharedVar added in v0.9.0

func (c *Client) SharedVar(name string) (string, error)

func (*Client) SockPath added in v0.9.0

func (c *Client) SockPath() string

func (*Client) Version added in v0.9.0

func (c *Client) Version() (int, error)

func (*Client) Waits added in v0.9.0

func (c *Client) Waits() *sync.WaitGroup

type CmdRequest added in v0.9.0

type CmdRequest struct {
	Seq int
}

type CmdResponse added in v0.9.0

type CmdResponse struct {
	Text string
}

type CmdsRequest added in v0.9.0

type CmdsRequest struct {
	From int
	Upto int
}

type CmdsResponse added in v0.9.0

type CmdsResponse struct {
	Cmds []string
}

type DelSharedVarRequest added in v0.9.0

type DelSharedVarRequest struct {
	Name string
}

type DelSharedVarResponse added in v0.9.0

type DelSharedVarResponse struct{}

type DirsRequest added in v0.9.0

type DirsRequest struct {
	Blacklist map[string]struct{}
}

type DirsResponse added in v0.9.0

type DirsResponse struct {
	Dirs []storedefs.Dir
}

type NextCmdRequest added in v0.9.0

type NextCmdRequest struct {
	From   int
	Prefix string
}

type NextCmdResponse added in v0.9.0

type NextCmdResponse struct {
	Seq  int
	Text string
}

type NextCmdSeqRequest added in v0.9.0

type NextCmdSeqRequest struct{}

type NextCmdSeqResponse added in v0.9.0

type NextCmdSeqResponse struct {
	Seq int
}

type PidRequest added in v0.9.0

type PidRequest struct{}

type PidResponse added in v0.9.0

type PidResponse struct {
	Pid int
}

type PrevCmdRequest added in v0.9.0

type PrevCmdRequest struct {
	Upto   int
	Prefix string
}

type PrevCmdResponse added in v0.9.0

type PrevCmdResponse struct {
	Seq  int
	Text string
}

type SetSharedVarRequest added in v0.9.0

type SetSharedVarRequest struct {
	Name  string
	Value string
}

type SetSharedVarResponse added in v0.9.0

type SetSharedVarResponse struct{}

type SharedVarRequest added in v0.9.0

type SharedVarRequest struct {
	Name string
}

type SharedVarResponse added in v0.9.0

type SharedVarResponse struct {
	Value string
}

type VersionRequest added in v0.9.0

type VersionRequest struct{}

type VersionResponse added in v0.9.0

type VersionResponse struct {
	Version int
}

Jump to

Keyboard shortcuts

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