Documentation ¶
Index ¶
Constants ¶
View Source
const ( // PeerTypeStore serves the store API PeerTypeStore members.PeerType = "store" )
Variables ¶
This section is empty.
Functions ¶
func CalculateAdvertiseAddress ¶
CalculateAdvertiseAddress attempts to clone logic from deep within memberlist (NetTransport.FinalAdvertiseAddr) in order to surface its conclusions to the application, so we can provide more actionable error messages if the user has inadvertently mis-configured their cluster.
https://github.com/hashicorp/memberlist/blob/022f081/net_transport.go#L126
Types ¶
type Peer ¶
type Peer interface { members.EventBus // Join the cluster Join() (int, error) // Leave the cluster. Leave() error // Name returns unique ID of this peer in the cluster. Name() string // Address returns host:port of this peer in the cluster. Address() string // ClusterSize returns the total size of the cluster from this node's // perspective. ClusterSize() int // State returns a JSON-serializable dump of cluster state. // Useful for debug. State() map[string]interface{} // Current API host:ports for the given type of node. // Bool defines if you want to include the current local node. Current(peerType members.PeerType, includeLocal bool) ([]string, error) // Close and shutdown the peer Close() }
Peer represents the node with in the cluster.
Directories ¶
Path | Synopsis |
---|---|
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.