onlineconfInterface

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance interface {
	GetConfigDir() string
	RegisterSubscription(string, []string, func() error) error
	StartWatcher(ctx context.Context) error
	StopWatcher() error
	GetModuleByFile(string) (Module, bool)
	GetModule(string) Module
	GetModuleNames() []string
	GetOrAddModule(string) (Module, error)
	GetStringIfExists(string) (string, bool, error)
	GetIntIfExists(string) (int64, bool, error)
	GetDurationIfExists(string) (time.Duration, bool, error)
	GetBoolIfExists(string) (bool, bool, error)
	GetString(string, ...string) (string, error)
	GetInt(string, ...int64) (int64, error)
	GetDuration(string, ...time.Duration) (time.Duration, error)
	GetBool(string, ...bool) (bool, error)
	GetStrings(string, []string) ([]string, error)
	GetStruct(string, interface{}) (bool, error)
	Clone() (Instance, error)
	Release(context.Context, Instance) error
}

type Logger

type Logger interface {
	Warn(ctx context.Context, msg string, args ...any)
	Error(ctx context.Context, msg string, args ...any)
	Fatal(ctx context.Context, msg string, args ...any)
}

type Module

type Module interface {
	GetStringIfExists(string) (string, bool, error)
	GetIntIfExists(string) (int64, bool, error)
	GetDurationIfExists(string) (time.Duration, bool, error)
	GetBoolIfExists(string) (bool, bool, error)
	GetString(string, ...string) (string, error)
	GetInt(string, ...int64) (int64, error)
	GetDuration(string, ...time.Duration) (time.Duration, error)
	GetBool(string, ...bool) (bool, error)
	GetStrings(string, []string) ([]string, error)
	GetStruct(string, interface{}) (bool, error)
	RegisterSubscription(subscription SubscriptionCallback)
	Reopen(mmappedFile *mmap.ReaderAt) (*mmap.ReaderAt, error)
	GetMmappedFile() *mmap.ReaderAt
	Clone(name string) Module
}

type Option

type Option interface {
	Apply(oi Instance)
}

type SubscriptionCallback

type SubscriptionCallback interface {
	GetPaths() []string
	InvokeCallback() error
}

Jump to

Keyboard shortcuts

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