Documentation
¶
Index ¶
- type Configure
- type Context
- type Driver
- type JsonParser
- type KV
- type Option
- type Parser
- type Unit
- type UnitOption
- func (opt *UnitOption) HotUpgrade(allow bool) *UnitOption
- func (opt *UnitOption) WithDriverName(name string) *UnitOption
- func (opt *UnitOption) WithHotUpgradeErrorFunc(fn func(err error)) *UnitOption
- func (opt *UnitOption) WithScheme(key string, value any) *UnitOption
- func (opt *UnitOption) WithSchemes(schemes KV) *UnitOption
- func (opt *UnitOption) WithSlotAfterCallback(fn func() error, useToInit bool) *UnitOption
- func (opt *UnitOption) WithSlotBeforeCallback(fn func() error, useToInit bool) *UnitOption
- func (opt *UnitOption) WithThreadSafe(locker sync.Locker) *UnitOption
- type XmlParser
- type YamlParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) HotUpgrade ¶
type JsonParser ¶
type JsonParser struct{}
type Parser ¶
type Parser interface {
Marshal(value any) ([]byte, error)
Unmarshal(config any, buf []byte) error
}
var ( Json Parser = new(JsonParser) Yaml Parser = new(YamlParser) Xml Parser = new(XmlParser) )
type Unit ¶
type Unit interface {
Option() *UnitOption
PreUnits() []string
Slot() any
}
type UnitOption ¶
type UnitOption struct {
// contains filtered or unexported fields
}
func NewOption ¶
func NewOption(key string, parser Parser) *UnitOption
func (*UnitOption) HotUpgrade ¶
func (opt *UnitOption) HotUpgrade(allow bool) *UnitOption
func (*UnitOption) WithDriverName ¶
func (opt *UnitOption) WithDriverName(name string) *UnitOption
func (*UnitOption) WithHotUpgradeErrorFunc ¶
func (opt *UnitOption) WithHotUpgradeErrorFunc(fn func(err error)) *UnitOption
func (*UnitOption) WithScheme ¶
func (opt *UnitOption) WithScheme(key string, value any) *UnitOption
func (*UnitOption) WithSchemes ¶
func (opt *UnitOption) WithSchemes(schemes KV) *UnitOption
func (*UnitOption) WithSlotAfterCallback ¶
func (opt *UnitOption) WithSlotAfterCallback(fn func() error, useToInit bool) *UnitOption
func (*UnitOption) WithSlotBeforeCallback ¶
func (opt *UnitOption) WithSlotBeforeCallback(fn func() error, useToInit bool) *UnitOption
func (*UnitOption) WithThreadSafe ¶
func (opt *UnitOption) WithThreadSafe(locker sync.Locker) *UnitOption
type YamlParser ¶
type YamlParser struct{}
Click to show internal directories.
Click to hide internal directories.