cluster

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfig added in v0.9.0

func GetDefaultConfig() gubernator.Config

Returns default testing configuration

func GetRandomPeer added in v0.9.0

func GetRandomPeer() gubernator.PeerInfo

Returns a random peer from the cluster

func InstanceAt

func InstanceAt(idx int) *instance

Returns a specific instance

func InstanceForHost added in v0.9.0

func InstanceForHost(host string) *instance

Return the specific instance for a host

func NumOfInstances added in v0.9.0

func NumOfInstances() int

Returns the number of instances

func PeerAt

func PeerAt(idx int) gubernator.PeerInfo

Returns a specific peer

func Start

func Start(numInstances int) error

Start a local cluster of gubernator servers

func StartInstance added in v0.7.1

func StartInstance(address string, conf gubernator.Config) (*instance, error)

Start a single instance of gubernator with the provided config and listening address. If address is empty string a random port on the loopback device will be chosen.

func StartWith

func StartWith(addresses []string) error

Start a local cluster with specific addresses

func Stop

func Stop()

func StopInstanceAt added in v0.9.0

func StopInstanceAt(idx int)

Stop an instance without updating peers, used to cause connection errors

Types

This section is empty.

Jump to

Keyboard shortcuts

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