Documentation ¶
Index ¶
- Variables
- func WaitForReady(ctx context.Context, c Client) error
- type Client
- type CommandClient
- func (c *CommandClient) Ping(ctx context.Context) error
- func (c *CommandClient) Recrawl(ctx context.Context, root string) error
- func (c *CommandClient) ShutdownServer(ctx context.Context) error
- func (c *CommandClient) TriggerDel(ctx context.Context, root, name string) error
- func (c *CommandClient) TriggerSet(ctx context.Context, root string, descriptor any) error
- func (c *CommandClient) WatchSet(ctx context.Context, root string) error
- type FileChange
- type Flags
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClientError = errors.New("watchman client error")
View Source
var FileChangeFields = []string{"name", "size", "mtime_us", "cclock"}
Functions ¶
Types ¶
type Client ¶
type Client interface { Ping(ctx context.Context) error WatchSet(ctx context.Context, root string) error Recrawl(ctx context.Context, root string) error TriggerSet(ctx context.Context, root string, args any) error TriggerDel(ctx context.Context, root, name string) error ShutdownServer(ctx context.Context) error }
Client is an abstract interface to a Watchman daemon.
type CommandClient ¶
type CommandClient struct {
Args []string
}
CommandClient implements access to a Watchman daemon through the "watchman" command line program.
func NewCommandClient ¶
func NewCommandClient(base []string) *CommandClient
func (*CommandClient) Recrawl ¶
func (c *CommandClient) Recrawl(ctx context.Context, root string) error
func (*CommandClient) ShutdownServer ¶
func (c *CommandClient) ShutdownServer(ctx context.Context) error
func (*CommandClient) TriggerDel ¶
func (c *CommandClient) TriggerDel(ctx context.Context, root, name string) error
func (*CommandClient) TriggerSet ¶
type FileChange ¶
type FileChange struct { Name string `json:"name"` Size int64 `json:"size"` MTime time.Time `json:"-"` CClock string `json:"cclock"` }
func (FileChange) MarshalJSON ¶
func (c FileChange) MarshalJSON() ([]byte, error)
func (*FileChange) UnmarshalJSON ¶
func (c *FileChange) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.