Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Spec ¶
func Spec() yarpcconfig.PeerListSpec
Spec returns a configuration specification for the round-robin peer list implementation, making it possible to select the least recently chosen peer with transports that use outbound peer list configuration (like HTTP).
cfg := yarpcconfig.New() cfg.MustRegisterPeerList(roundrobin.Spec())
This enables the round-robin peer list:
outbounds: otherservice: unary: http: url: https://host:port/rpc round-robin: peers: - 127.0.0.1:8080 - 127.0.0.1:8081
Types ¶
type ListOption ¶
type ListOption func(*listConfig)
ListOption customizes the behavior of a roundrobin list.
func Capacity ¶
func Capacity(capacity int) ListOption
Capacity specifies the default capacity of the underlying data structures for this list.
Defaults to 10.
Click to show internal directories.
Click to hide internal directories.