Documentation
¶
Index ¶
- Variables
- func DelegatesWithId(nodeID string) *moleculer.BrokerDelegates
- func DelegatesWithIdAndConfig(nodeID string, config moleculer.Config) *moleculer.BrokerDelegates
- func Logger(name string, value string) *log.Entry
- func OrderMapArray(list []map[string]interface{}, field string) []map[string]interface{}
- type CounterCheck
- type NodeMock
- func (node *NodeMock) Available()
- func (node *NodeMock) ExportAsMap() map[string]interface{}
- func (node *NodeMock) GetID() string
- func (node *NodeMock) HeartBeat(heartbeat map[string]interface{})
- func (node *NodeMock) IncreaseSequence()
- func (node *NodeMock) IsAvailable() bool
- func (node *NodeMock) IsExpired(timeout time.Duration) bool
- func (node *NodeMock) Publish(service map[string]interface{})
- func (node *NodeMock) Unavailable()
- func (node *NodeMock) Update(id string, info map[string]interface{}) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var CounterCheckTimeout = 10 * time.Second
Functions ¶
func DelegatesWithId ¶
func DelegatesWithId(nodeID string) *moleculer.BrokerDelegates
func DelegatesWithIdAndConfig ¶
func DelegatesWithIdAndConfig(nodeID string, config moleculer.Config) *moleculer.BrokerDelegates
func OrderMapArray ¶
OrderMapArray given an array of map[string]... this func will order based on the field name.
Types ¶
type CounterCheck ¶
type CounterCheck struct {
// contains filtered or unexported fields
}
func Counter ¶
func Counter() CounterCheck
func (*CounterCheck) CheckPrefixed ¶
func (counter *CounterCheck) CheckPrefixed(name string, value int) error
func (*CounterCheck) Clear ¶
func (counter *CounterCheck) Clear()
func (*CounterCheck) Inc ¶
func (counter *CounterCheck) Inc(nodeID string, name string)
type NodeMock ¶
type NodeMock struct { UpdateResult bool ID string IncreaseSequenceCalls int HeartBeatCalls int ExportAsMapResult map[string]interface{} IsAvailableResult bool IsExpiredResult bool PublishCalls int }
func (*NodeMock) ExportAsMap ¶
func (*NodeMock) IncreaseSequence ¶
func (node *NodeMock) IncreaseSequence()
func (*NodeMock) IsAvailable ¶
func (*NodeMock) Unavailable ¶
func (node *NodeMock) Unavailable()
Click to show internal directories.
Click to hide internal directories.