Documentation ¶
Index ¶
- Variables
- func Watch(ctx context.Context, u *url.URL, c EventChannel) error
- func WatchAndServeWS(ctx context.Context, u *url.URL, writer herodot.Writer) (http.HandlerFunc, error)
- func WatchDirectory(ctx context.Context, dir string, c EventChannel) error
- func WatchFile(ctx context.Context, file string, c EventChannel) error
- func WatchWebsocket(ctx context.Context, u *url.URL, c EventChannel) error
- type ChangeEvent
- type ErrorEvent
- type Event
- type EventChannel
- type RemoveEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSchemeUnknown = &errSchemeUnknown{}
ErrSchemeUnknown is just for checking with errors.Is()
Functions ¶
func WatchAndServeWS ¶ added in v0.0.145
func WatchDirectory ¶ added in v0.0.142
func WatchDirectory(ctx context.Context, dir string, c EventChannel) error
func WatchWebsocket ¶ added in v0.0.145
Types ¶
type ChangeEvent ¶
type ChangeEvent struct {
// contains filtered or unexported fields
}
func (*ChangeEvent) MarshalJSON ¶ added in v0.0.145
func (e *ChangeEvent) MarshalJSON() ([]byte, error)
func (*ChangeEvent) Reader ¶
func (e *ChangeEvent) Reader() io.Reader
type ErrorEvent ¶
type ErrorEvent struct {
// contains filtered or unexported fields
}
func (*ErrorEvent) MarshalJSON ¶ added in v0.0.145
func (e *ErrorEvent) MarshalJSON() ([]byte, error)
func (*ErrorEvent) Reader ¶
func (e *ErrorEvent) Reader() io.Reader
type EventChannel ¶
type EventChannel chan Event
type RemoveEvent ¶
type RemoveEvent struct {
// contains filtered or unexported fields
}
func (*RemoveEvent) MarshalJSON ¶ added in v0.0.145
func (e *RemoveEvent) MarshalJSON() ([]byte, error)
func (*RemoveEvent) Reader ¶
func (e *RemoveEvent) Reader() io.Reader
Source Files ¶
Click to show internal directories.
Click to hide internal directories.