Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Clock(path string) (*Clock, error)
- func (c *Client) Close() error
- func (c *Client) Find(path string, patterns ...string) (*Find, error)
- func (c *Client) LogLevel(level string) (*LogLevel, error)
- func (c *Client) Receive(ch chan<- interface{}) (func(), error)
- func (c *Client) Send(dest interface{}, args ...interface{}) error
- func (c *Client) Subscribe(path, name string, expr map[string]interface{}, ch chan<- *SubscribeEvent) (*Subscribe, func(), error)
- func (c *Client) Unsubscribe(path, name string) (*Unsubscribe, error)
- func (c *Client) Version() (*Version, error)
- func (c *Client) Watch(path string) (*Watch, error)
- func (c *Client) WatchDel(path string) (*WatchDel, error)
- func (c *Client) WatchDelAll(path string) (*WatchDelAll, error)
- func (c *Client) WatchList() (*WatchList, error)
- func (c *Client) WatchProject(path string) (*WatchProject, error)
- type Clock
- type Error
- type File
- type Find
- type LogEvent
- type LogLevel
- type Subscribe
- type SubscribeEvent
- type SubscribeFile
- type Unsubscribe
- type Version
- type Watch
- type WatchDel
- type WatchDelAll
- type WatchList
- type WatchProject
Constants ¶
const ( LogLevelDebug = "debug" LogLevelError = "error" LogLevelOff = "off" )
the supported log levels
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Sockname string // contains filtered or unexported fields }
Client is a watchman client
func (*Client) Clock ¶
Clock returns the current clock value for a watched root. https://facebook.github.io/watchman/docs/cmd/clock.html
func (*Client) Find ¶
Find finds all files that match the optional list of patterns under the specified dir. If no patterns were specified, all files are returned. https://facebook.github.io/watchman/docs/cmd/find.html
func (*Client) LogLevel ¶
LogLevel changes the log level of the connection https://facebook.github.io/watchman/docs/cmd/log-level.html
func (*Client) Subscribe ¶
func (c *Client) Subscribe(path, name string, expr map[string]interface{}, ch chan<- *SubscribeEvent) (*Subscribe, func(), error)
Subscribe subscribes to changes against a specified root and requests that they be sent to the client via its connection. The updates will continue to be sent while the connection is open. If the connection is closed, the subscription is implicitly removed https://facebook.github.io/watchman/docs/cmd/subscribe.html todo(isao) - add expression type?
func (*Client) Unsubscribe ¶
func (c *Client) Unsubscribe(path, name string) (*Unsubscribe, error)
Unsubscribe cancels a named subscription against the specified root. The server side will no longer generate subscription packets for the specified subscription. https://facebook.github.io/watchman/docs/cmd/unsubscribe.html
func (*Client) Version ¶
Version will tell you the version and build information for the currently running watchman service https://facebook.github.io/watchman/docs/cmd/version.html
func (*Client) Watch ¶
Watch requests that the specified dir is watched for changes https://facebook.github.io/watchman/docs/cmd/watch.html
func (*Client) WatchDelAll ¶
func (c *Client) WatchDelAll(path string) (*WatchDelAll, error)
WatchDelAll removes all watches and associated triggers https://facebook.github.io/watchman/docs/cmd/watch-del-all.html
func (*Client) WatchList ¶
WatchList returns a list of watched dirs https://facebook.github.io/watchman/docs/cmd/watch-list.html
func (*Client) WatchProject ¶
func (c *Client) WatchProject(path string) (*WatchProject, error)
WatchProject requests that the project containing the requested dir is watched for changes https://facebook.github.io/watchman/docs/cmd/watch-project.html
type Clock ¶
type Clock struct {
Clock string `bser:"clock"`
}
Clock is the return object of the Clock call
type File ¶
type File struct { Cclock string `bser:"cclock"` Ctime int `bser:"ctime"` Dev int `bser:"dev"` Exists bool `bser:"exists"` Gid int `bser:"gid"` Ino int `bser:"ino"` Mode int `bser:"mode"` Mtime int `bser:"mtime"` Name string `bser:"name"` New bool `bser:"new"` Nlink int `bser:"nlink"` Oclock string `bser:"oclock"` Size int `bser:"size"` UID int `bser:"uid"` }
File represents a file on the filesystem
type LogLevel ¶
type LogLevel struct {
LogLevel string `bser:"log_level"`
}
LogLevel is the return object of SetLogLevel
type SubscribeEvent ¶
type SubscribeEvent struct { Clock string `bser:"clock"` Files []SubscribeFile `bser:"files"` IsFreshInstance bool `bser:"is_fresh_instance"` Root string `bser:"root"` Since string `bser:"since"` Subscription string `bser:"subscription"` }
SubscribeEvent is the unilateral message that indicates an fs event occurred for the specified subscription
type SubscribeFile ¶
type SubscribeFile struct { Mode int `bser:"mode"` New bool `bser:"new"` Size int `bser:"size"` Exists bool `bser:"exists"` Name string `bser:"name"` }
SubscribeFile is a representation of the file that was somehow changed
type Unsubscribe ¶
Unsubscribe is the return object of the Subscribe call
type Version ¶
type Version struct {
Version string
}
Version is the return object of the Version call
type WatchDelAll ¶
type WatchDelAll struct {
Roots []string `bser:"roots"`
}
WatchDelAll is the return object of the WatchDelAll call
type WatchList ¶
type WatchList struct {
Roots []string
}
WatchList is the return object of the WatchList call
type WatchProject ¶
WatchProject is the return object of the WatchProject call
Source Files ¶
- client.go
- clock.go
- find.go
- flush_subscriptions.go
- get_config.go
- get_sockname.go
- list_capabilities.go
- log.go
- log_level.go
- query.go
- shutdown_server.go
- since.go
- state_enter.go
- state_leave.go
- subscribe.go
- trigger.go
- trigger_del.go
- trigger_list.go
- unsubscribe.go
- version.go
- watch.go
- watch_del.go
- watch_del_all.go
- watch_list.go
- watch_project.go