subscriber

package
v0.63.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNewEtcdSubscriber

func MustNewEtcdSubscriber(conf EtcdConf) subscriber.Subscriber

MustNewEtcdSubscriber returns an etcd Subscriber, exits on errors.

func WithUseEnv

func WithUseEnv(useEnv bool) opts.Opt[FsnotifyOpts]

func WithUseKey

func WithUseKey(useKey string) opts.Opt[FsnotifyOpts]

Types

type EtcdConf added in v0.61.0

type EtcdConf subscriber.EtcdConf

type Fsnotify

type Fsnotify struct {

	// fsnotify watcher
	*fsnotify.Watcher
	// contains filtered or unexported fields
}

func MustNewFsnotifySubscriber

func MustNewFsnotifySubscriber(path string, op ...opts.Opt[FsnotifyOpts]) *Fsnotify

func (*Fsnotify) AddListener

func (f *Fsnotify) AddListener(listener func()) error

func (*Fsnotify) Value

func (f *Fsnotify) Value() (string, error)

type FsnotifyOpts

type FsnotifyOpts struct {
	UseEnv bool
	UseKey string
}

func (FsnotifyOpts) DefaultOptions

func (opts FsnotifyOpts) DefaultOptions() FsnotifyOpts

Jump to

Keyboard shortcuts

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