store

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Configs []core.WatchConfig // 预加载配置列表
}

Config 配置存储管理器配置

type Manager

type Manager interface {
	GetConfig(key string, result any) bool                             // 从缓存获取配置(强类型)
	GetAllKeys(prefix string) []string                                 // 获取指定前缀的所有键
	PutConfig(ctx context.Context, key string, config any) error       // 写入配置(自动序列化)
	DeleteConfig(ctx context.Context, key string) error                // 删除配置
	AddPrefixWatcher(prefix string, callback core.PrefixWatchCallback) // 添加前缀监听器
}

Manager 配置存储管理器接口

func NewManager

func NewManager(client *clientv3.Client, logCtx *core.LogContext, config *Config) Manager

NewManager 创建配置存储管理器

Jump to

Keyboard shortcuts

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