regular

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirEntry

type DirEntry interface {
	Name() string // base name of the file
}

type FileConfigor

type FileConfigor struct {
	// contains filtered or unexported fields
}

func NewFileConfigor

func NewFileConfigor(root string, filters ...Filter) (*FileConfigor, error)

func (*FileConfigor) Close

func (f *FileConfigor) Close() error

func (*FileConfigor) DeleteConfig

func (f *FileConfigor) DeleteConfig(fname string) (err error)

func (*FileConfigor) GetConfig

func (f *FileConfigor) GetConfig(fname string) ([]byte, error)

func (*FileConfigor) SetConfig

func (f *FileConfigor) SetConfig(fname string, payload []byte) error

func (*FileConfigor) WatchConfig

func (f *FileConfigor) WatchConfig(listener nacs.ConfigListener) error

we should only care about write event

type Filter

type Filter func(DirEntry) bool

func WithPrefix

func WithPrefix(ext string) Filter

func WithRegex

func WithRegex(expr *regexp.Regexp) Filter

func WithRegular

func WithRegular(fname ...string) Filter

func WithSuffix

func WithSuffix(ext string) Filter

Jump to

Keyboard shortcuts

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