notifier

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyToFSNotifier

type KeyToFSNotifier struct {
	notifiers.KeyBase
	// contains filtered or unexported fields
}

KeyToFSNotifier holds the state of a notifier that writes raw/transformed contents of a watched file to another file.

func NewKeyToFSNotifier

func NewKeyToFSNotifier(key notifiers.Key, dir string, ext string) *KeyToFSNotifier

NewKeyToFSNotifier returns a new notifier that writes raw/transformed contents to another file.

func (*KeyToFSNotifier) Notify

func (n *KeyToFSNotifier) Notify(event notifiers.Event)

Notify writes/removes to filesystem based on received event.

func (*KeyToFSNotifier) Start

func (n *KeyToFSNotifier) Start() error

Start starts the key notifier.

func (*KeyToFSNotifier) Stop

func (n *KeyToFSNotifier) Stop() error

Stop stops the key notifier.

type PrefixToFSNotifier

type PrefixToFSNotifier struct {
	notifiers.PrefixBase
	// contains filtered or unexported fields
}

PrefixToFSNotifier holds the state of a notifier that writes raw/transformed contents of a watched prefix to a directory.

func NewPrefixToFSNotifier

func NewPrefixToFSNotifier(path string, ext string) *PrefixToFSNotifier

NewPrefixToFSNotifier returns a new prefix notifier that writes raw/transformed contents to a directory.

func (*PrefixToFSNotifier) GetKeyNotifier

func (n *PrefixToFSNotifier) GetKeyNotifier(key notifiers.Key) (notifiers.KeyNotifier, error)

GetKeyNotifier gets the underlying key notifier from prefix notifier.

func (*PrefixToFSNotifier) Start

func (n *PrefixToFSNotifier) Start() error

Start starts the prefix notifier.

func (*PrefixToFSNotifier) Stop

func (n *PrefixToFSNotifier) Stop() error

Stop stops the prefix notifier.

Jump to

Keyboard shortcuts

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