Documentation ¶
Index ¶
- Constants
- Variables
- func SliceIndex(limit int, predicate func(i int) bool) int
- type File
- type Metadata
- type OnChange
- type Options
- type Xconf
- func (c *Xconf) CheckCanary(canary string) bool
- func (c *Xconf) Get(ctx context.Context, key string) ([]byte, int64, error)
- func (c *Xconf) GetConfig(ctx context.Context, group, name string) (data []byte, err error)
- func (c *Xconf) Key(group, name string) string
- func (c *Xconf) Meta(key string) string
- func (c *Xconf) ReadCache(group, name string) ([]byte, error)
- func (c *Xconf) Watch(ctx context.Context, group, name string, h OnChange) error
- func (c *Xconf) WriteCache(group, name string, content []byte) error
Constants ¶
View Source
const ( DefaultName = "xconf" DefaultNamespace = "x" )
Variables ¶
View Source
var ( // ErrNotFound is the error returned by file not exists ErrNotFound = errors.New("not found") )
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.