config

package
v0.0.0-...-1a511a4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNodeConfigByBytes

func GetNodeConfigByBytes(content string) (*types.NodeConfig, error)

func GetNodeConfigByFile

func GetNodeConfigByFile(cf string) (*types.NodeConfig, error)

func StartWatcher

func StartWatcher(ctx context.Context, configFile string, handler WatchHandler) error

Types

type WatchHandler

type WatchHandler interface {
	OnCreate(ctx context.Context, pathName string)
	OnUpdate(ctx context.Context, pathName string)
	OnDelete(ctx context.Context, pathName string)
	OnError(ctx context.Context, err error)
}

Jump to

Keyboard shortcuts

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