onlineconfInterface

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 2 Imported by: 1

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) (int, bool, error)
	GetBoolIfExists(string) (bool, bool, error)
	GetString(string, ...string) (string, error)
	GetInt(string, ...int) (int, error)
	GetBool(string, ...bool) (bool, error)
	GetStrings(string, []string) ([]string, error)
	GetStruct(string, interface{}) (bool, error)
	Clone() (Instance, error)
	Release(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) (int, bool, error)
	GetBoolIfExists(string) (bool, bool, error)
	GetString(string, ...string) (string, error)
	GetInt(string, ...int) (int, 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