test

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 Logger

func Logger(name string, value string) *log.Entry

func OrderMapArray

func OrderMapArray(list []map[string]interface{}, field string) []map[string]interface{}

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) Check

func (counter *CounterCheck) Check(name string, value int) error

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) Available

func (node *NodeMock) Available()

func (*NodeMock) ExportAsMap

func (node *NodeMock) ExportAsMap() map[string]interface{}

func (*NodeMock) GetID

func (node *NodeMock) GetID() string

func (*NodeMock) HeartBeat

func (node *NodeMock) HeartBeat(heartbeat map[string]interface{})

func (*NodeMock) IncreaseSequence

func (node *NodeMock) IncreaseSequence()

func (*NodeMock) IsAvailable

func (node *NodeMock) IsAvailable() bool

func (*NodeMock) IsExpired

func (node *NodeMock) IsExpired(timeout time.Duration) bool

func (*NodeMock) Publish

func (node *NodeMock) Publish(service map[string]interface{})

func (*NodeMock) Unavailable

func (node *NodeMock) Unavailable()

func (*NodeMock) Update

func (node *NodeMock) Update(id string, info map[string]interface{}) bool

Jump to

Keyboard shortcuts

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