common

package
v0.0.0-...-c28e036 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AgentIDPrefix = flag.String("agent-id-prefix", "", "A a prefix to include in the agent ID.")
	ContainerID   = flag.String("container-id", "", "The container ID. This flag is only populated when the agent binary is running inside a container.")
)

Functions

func AgentID

func AgentID() *pulsepb.AgentId

AgentID returns the ID of this agent.

func Hostname

func Hostname() string

Hostname returns the hostname string.

func NewClockTicker

func NewClockTicker(d time.Duration) *clockTicker

func NewMockTicker

func NewMockTicker() *mockTicker

Types

type Ticker

type Ticker interface {
	// GetChannel returns the channel on which the ticks are delivered.
	GetChannel() <-chan time.Time
}

Ticker is a wrapper interface around time.Ticker. This is mainly used to be able to mock the ticker in unit tests.

Jump to

Keyboard shortcuts

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