Documentation
¶
Overview ¶
Package watchman provides tools to communicate with the Watchman file watching service. https://facebook.github.io/watchman/
Index ¶
- type ChangeNotification
- type Client
- func (c *Client) AddWatch(path string) (*Watch, error)
- func (c *Client) Close() error
- func (c *Client) HasCapability(capability string) bool
- func (c *Client) ListWatches() (roots []string, err error)
- func (c *Client) Notifications() <-chan interface{}
- func (c *Client) SockName() string
- func (c *Client) Version() string
- type Subscription
- type Watch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeNotification ¶
type ChangeNotification struct {
IsFreshInstance bool
Clock string
Subscription string
Files []interface{}
}
A ChangeNotification represents changes two one or more filesystem entries.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a high-level interface to Watchman.
func (*Client) AddWatch ¶
AddWatch requests that the Watchman server monitor a directory for changes.
Please note that Watchman may reuse an existing watch, or choose to start watching a parent of the requested directory.
For details, see: https://facebook.github.io/watchman/docs/cmd/watch-project.html
func (*Client) HasCapability ¶
HasCapability checks if the Watchman server supports a feature.
For details, see: https://facebook.github.io/watchman/docs/capabilities.html
func (*Client) ListWatches ¶
ListWatches returns a list of directories that Watchman is monitoring.
func (*Client) Notifications ¶
func (c *Client) Notifications() <-chan interface{}
Notifications returns a channel that emits unilateral messages from the Watchman server.
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
A Subscription represents a request to receive notification of changes to a watched root.
func (*Subscription) Unsubscribe ¶
func (s *Subscription) Unsubscribe() (err error)
Unsubscribe cancels a subscription.
type Watch ¶
type Watch struct {
// contains filtered or unexported fields
}
A Watch represents a directory, or watched root, that Watchman is watching for changes.
func (*Watch) Clock ¶
Clock returns the current clock value for a watched root.
For details, see: https://facebook.github.io/watchman/docs/cmd/clock.html