watchman

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(watchmanPath string)

Checks that watchman exists in the system. If not error out and shut down. Otherwise, continue execution.

func GetSockName

func GetSockName(watchmanPath string) string

Get socket filename using exec "watchman get-sockname". Passes stderr and stdout to the console. If it fails, then program shuts down. Otherwise, returns sockname.

func Subscribe

func Subscribe(conn net.Conn, directory, subname string, suffixes []string)

Subscribes to watchman's messages about a directory's filesystem changes, using an appropriate Unix Socket to watchman. Can take in the directory and a subscription name to configure the subscription.

func WatchProject

func WatchProject(conn net.Conn, directory string)

Watches a project directory and all it's subdirectories. Currectly, this function is deprecated in favor of Subscribe, until further notice.

Types

type WatchmanSockName

type WatchmanSockName struct {
	Version  string `json:"version"`
	Sockname string `json:"sockname"`
}

Struct to convert data from watchman get-sockname.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL