Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type FactoryManager
- type Group
- func (sg *Group) AddInfo(serviceID int, info *Info)
- func (sg *Group) EachConfig(f func(export.IConfig) bool)
- func (sg *Group) EachInfo(f func(int, *Info) bool)
- func (sg *Group) EachInstance(f func(string, int, *Instance) bool)
- func (sg *Group) EachPayload(f func(string, int, int) bool)
- func (sg *Group) GetConfigByID(serviceID int) export.IConfig
- func (sg *Group) GetInfoByID(serviceID int) *Info
- func (sg *Group) GetInstance(serviceID int) *Instance
- func (sg *Group) GetPayloadByID(serviceID int) int
- func (sg *Group) RemoveInfo(serviceID int)
- func (sg *Group) RoundRobinPickInstance() *Info
- type Info
- type Instance
- type Producer
Constants ¶
View Source
const GlobalConfigServiceID = "global"
View Source
const (
PayloadNil = -1
)
Variables ¶
View Source
var ErrDuplicateFactory = errors.New("duplicate factory")
View Source
var ErrProducerIsNil = errors.New("producer is nil")
View Source
var ErrUnsupportedService = errors.New("unsupported service")
View Source
var FM = NewFactoryManager()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (Config) GetPutPayloadSec ¶
func (*Config) SetPutPayloadSec ¶
func (*Config) TidyAndCheck ¶
type FactoryManager ¶
type FactoryManager struct {
// contains filtered or unexported fields
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func NewFactoryManager ¶
func NewFactoryManager() *FactoryManager
func (*FactoryManager) MustRegister ¶
func (mgr *FactoryManager) MustRegister(name string, producer Producer)
type Group ¶
type Group struct { Name string GlobalConfigReflectType reflect.Type ConfigReflectType reflect.Type GlobalConfig export.IConfig GlobalConfigData []byte Infos *linkedhashmap.Map // contains filtered or unexported fields }
func (*Group) GetInfoByID ¶
func (*Group) GetInstance ¶
func (*Group) GetPayloadByID ¶
func (*Group) RemoveInfo ¶
func (*Group) RoundRobinPickInstance ¶
type Info ¶
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
type Instance ¶
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func NewInstance ¶
func NewInstance() (i *Instance)
Click to show internal directories.
Click to hide internal directories.