manager

package
v0.0.0-...-bf6f042 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigManager

type ConfigManager[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](repo Repository, initCfg T, scanInterval time.Duration) *ConfigManager[T]

func (*ConfigManager[T]) GetConfig

func (m *ConfigManager[T]) GetConfig() T

func (*ConfigManager[T]) LoadConfig

func (m *ConfigManager[T]) LoadConfig(ctx context.Context) error

func (*ConfigManager[T]) Run

func (m *ConfigManager[T]) Run(ctx context.Context, wg *sync.WaitGroup) error

type Repository

type Repository interface {
	UpdateConfig(ctx context.Context, value any) error
	GetConfig(ctx context.Context, obj, defaultValue any) error
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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