Documentation ¶
Index ¶
- Constants
- func DaemonAt(idx int) *gubernator.Daemon
- func FindOwningDaemon(name, key string) (*gubernator.Daemon, error)
- func FindOwningPeer(name, key string) (gubernator.PeerInfo, error)
- func GetDaemons() []*gubernator.Daemon
- func GetPeers() []gubernator.PeerInfo
- func GetRandomPeer(dc string) gubernator.PeerInfo
- func ListNonOwningDaemons(name, key string) ([]*gubernator.Daemon, error)
- func NumOfDaemons() int
- func PeerAt(idx int) gubernator.PeerInfo
- func Restart(ctx context.Context) error
- func Start(numInstances int) error
- func StartWith(localPeers []gubernator.PeerInfo) error
- func Stop()
Constants ¶
View Source
const ( DataCenterNone = "" DataCenterOne = "datacenter-1" DataCenterTwo = "datacenter-2" )
Variables ¶
This section is empty.
Functions ¶
func FindOwningDaemon ¶ added in v2.4.0
func FindOwningDaemon(name, key string) (*gubernator.Daemon, error)
FindOwningDaemon finds the daemon which owns the rate limit with the provided name and unique key
func FindOwningPeer ¶ added in v2.4.0
func FindOwningPeer(name, key string) (gubernator.PeerInfo, error)
FindOwningPeer finds the peer which owns the rate limit with the provided name and unique key
func GetDaemons ¶
func GetDaemons() []*gubernator.Daemon
GetDaemons returns a list of all daemons in the cluster
func GetPeers ¶
func GetPeers() []gubernator.PeerInfo
GetPeers returns a list of all peers in the cluster
func GetRandomPeer ¶
func GetRandomPeer(dc string) gubernator.PeerInfo
GetRandomPeer returns a random peer from the cluster
func ListNonOwningDaemons ¶ added in v2.4.0
func ListNonOwningDaemons(name, key string) ([]*gubernator.Daemon, error)
ListNonOwningDaemons returns a list of daemons in the cluster that do not own the rate limit for the name and key provided.
func StartWith ¶
func StartWith(localPeers []gubernator.PeerInfo) error
StartWith a local cluster with specific addresses
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.