Documentation ¶
Overview ¶
Package API provides the API to the daemon RPC service.
Index ¶
- Constants
- Variables
- type AddCmdRequest
- type AddCmdResponse
- type AddDirRequest
- type AddDirResponse
- type Client
- func (c *Client) AddCmd(text string) (int, error)
- func (c *Client) AddDir(dir string, incFactor float64) error
- func (c *Client) CallDaemon(f string, req, res interface{}) error
- func (c *Client) Close() error
- func (c *Client) Cmd(seq int) (string, error)
- func (c *Client) Cmds(from, upto int) ([]string, error)
- func (c *Client) DelSharedVar(name string) error
- func (c *Client) Dirs(blacklist map[string]struct{}) ([]storedefs.Dir, error)
- func (c *Client) NextCmd(from int, prefix string) (int, string, error)
- func (c *Client) NextCmdSeq() (int, error)
- func (c *Client) Pid() (int, error)
- func (c *Client) PrevCmd(upto int, prefix string) (int, string, error)
- func (c *Client) SetSharedVar(name, value string) error
- func (c *Client) SharedVar(name string) (string, error)
- func (c *Client) SockPath() string
- func (c *Client) Version() (int, error)
- func (c *Client) Waits() *sync.WaitGroup
- type CmdRequest
- type CmdResponse
- type CmdsRequest
- type CmdsResponse
- type DelSharedVarRequest
- type DelSharedVarResponse
- type DirsRequest
- type DirsResponse
- type NextCmdRequest
- type NextCmdResponse
- type NextCmdSeqRequest
- type NextCmdSeqResponse
- type PidRequest
- type PidResponse
- type PrevCmdRequest
- type PrevCmdResponse
- type SetSharedVarRequest
- type SetSharedVarResponse
- type SharedVarRequest
- type SharedVarResponse
- type VersionRequest
- type VersionResponse
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 ¶
type AddCmdRequest struct {
Text string
}
type AddCmdResponse ¶
type AddCmdResponse struct {
Seq int
}
type AddDirRequest ¶
type AddDirResponse ¶
type AddDirResponse struct{}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CallDaemon ¶
func (*Client) DelSharedVar ¶
func (*Client) NextCmdSeq ¶
func (*Client) SetSharedVar ¶
type CmdRequest ¶
type CmdRequest struct {
Seq int
}
type CmdResponse ¶
type CmdResponse struct {
Text string
}
type CmdsRequest ¶
type CmdsResponse ¶
type CmdsResponse struct {
Cmds []string
}
type DelSharedVarRequest ¶
type DelSharedVarRequest struct {
}type DelSharedVarResponse ¶
type DelSharedVarResponse struct{}
type DirsRequest ¶
type DirsRequest struct {
Blacklist map[string]struct{}
}
type DirsResponse ¶
type NextCmdRequest ¶
type NextCmdResponse ¶
type NextCmdSeqRequest ¶
type NextCmdSeqRequest struct{}
type NextCmdSeqResponse ¶
type NextCmdSeqResponse struct {
Seq int
}
type PidRequest ¶
type PidRequest struct{}
type PidResponse ¶
type PidResponse struct {
Pid int
}
type PrevCmdRequest ¶
type PrevCmdResponse ¶
type SetSharedVarRequest ¶
type SetSharedVarRequest struct {}
type SetSharedVarResponse ¶
type SetSharedVarResponse struct{}
type SharedVarRequest ¶
type SharedVarRequest struct {
}type SharedVarResponse ¶
type SharedVarResponse struct {
}type VersionRequest ¶
type VersionRequest struct{}
type VersionResponse ¶
type VersionResponse struct {
Version int
}
Click to show internal directories.
Click to hide internal directories.