Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Aside() ([]byte, error)
- func (c *Client) Attach() (err error)
- func (c *Client) Auth() error
- func (c *Client) Buffer(name string) (int, error)
- func (c *Client) Cleanup()
- func (c *Client) Close(name string) (int, error)
- func (c *Client) Command(cmd *commander.Command) (int, error)
- func (c *Client) Connect(debug bool) (err error)
- func (c *Client) Ctl() ([]byte, error)
- func (c *Client) Document() ([]byte, error)
- func (c *Client) Feed() (io.ReadCloser, error)
- func (c *Client) FeedIterator() (*FeedIterator, error)
- func (c *Client) GetCommands() ([]*commander.Command, error)
- func (c *Client) Input(data []byte) (int, error)
- func (c *Client) Link(name string) (int, error)
- func (c *Client) Notifications() ([]byte, error)
- func (c *Client) Open(name string) (int, error)
- func (c *Client) Send(cmd *commander.Command, args []string) (int, error)
- func (c *Client) Status() ([]byte, error)
- func (c *Client) Tabs() ([]byte, error)
- func (c *Client) Title() ([]byte, error)
- type FeedIterator
Constants ¶
const MSIZE = p.MSIZE
MSIZE - maximum size for a message
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a 9p client session
func NewMockClient ¶
NewMockClient returns a client for testing Feed, if called, will be populated with data from google's GoFuzz every 100ms
func (*Client) Command ¶
Command sends the named command to the service If command is invalid, it will return an error
func (*Client) Document ¶
Document returns the contents of a document file on the host if it exists, or an error
func (*Client) Feed ¶
func (c *Client) Feed() (io.ReadCloser, error)
Feed returns a ReadCloser connected to `feed`. It's expected all reads will be read into a buffer with a size of MSIZE It is also expected for Feed to be called in its own thread
func (*Client) FeedIterator ¶
func (c *Client) FeedIterator() (*FeedIterator, error)
FeedIterator returns a new FeedIterator ready to go
func (*Client) GetCommands ¶
GetCommands initializes c.CmdList
func (*Client) Notifications ¶
Notifications returns and clears any pending notifications
type FeedIterator ¶
type FeedIterator struct {
// contains filtered or unexported fields
}
FeedIterator allows you to step through lines of feed with Next() Useful for gomobile, etc
func (*FeedIterator) Next ¶
func (f *FeedIterator) Next() ([]byte, error)
Next will return the next slice of bytes, or an error After an error, future calls to Next() will panic