Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/hashicorp/memberlist
/ functions
Functions
469 in github.com/hashicorp/memberlist
⨍
Functions
469
◇
Types & classes
76
↓ 466 callers
Method
Fatalf
(format string, args ...interface{})
internal/retry/retry.go:51
↓ 146 callers
Method
Fatal
(args ...interface{})
internal/retry/retry.go:46
↓ 141 callers
Method
Shutdown
Shutdown is called when memberlist is shutting down; this gives the transport a chance to clean up any listeners.
transport.go:68
↓ 136 callers
Method
String
String returns the node name
state.go:74
↓ 95 callers
Method
Errorf
(format string, args ...interface{})
internal/retry/retry.go:61
↓ 76 callers
Method
aliveNode
aliveNode is invoked by the network layer when we get a message about a live node.
state.go:943
↓ 60 callers
Method
Members
Members returns a list of all known live nodes. The node structures returned must not be modified. If you wish to modify a Node, make a copy first.
memberlist.go:608
↓ 59 callers
Function
Create
Create will create a new Memberlist using the given configuration. This will not connect to any other node (see Join) yet, but will start all the list
memberlist.go:248
↓ 57 callers
Method
BuildVsnArray
BuildVsnArray creates the array of Vsn
memberlist.go:90
↓ 51 callers
Function
getBindAddr
()
memberlist_test.go:39
↓ 39 callers
Method
Close
()
net_test.go:957
↓ 35 callers
Function
GetMemberlist
(tb testing.TB, f func(c *Config))
memberlist_test.go:150
↓ 34 callers
Function
buildBuffer
(t *testing.T, stuff ...interface{})
label_test.go:344
↓ 33 callers
Function
HostMemberlist
(host string, t *testing.T, f func(*Config))
state_test.go:24
↓ 32 callers
Function
testConfig
(tb testing.TB)
memberlist_test.go:55
↓ 29 callers
Function
LogAddress
(addr net.Addr)
logging.go:11
↓ 27 callers
Method
Error
(args ...interface{})
internal/retry/retry.go:56
↓ 25 callers
Method
Join
Join is used to take an existing Memberlist and attempt to join a cluster by contacting all the given hosts and performing a state sync. Initially, th
memberlist.go:270
↓ 23 callers
Function
DefaultLANConfig
DefaultLANConfig returns a sane set of configurations for Memberlist. It uses the hostname as the node name, and otherwise sets very conservative valu
config.go:302
↓ 20 callers
Function
encode
Encode writes an encoded object to a new bytes buffer
util.go:48
↓ 19 callers
Method
NumQueued
NumQueued returns the number of queued messages
queue.go:379
↓ 18 callers
Function
LogConn
(conn net.Conn)
logging.go:27
↓ 17 callers
Method
QueueBroadcast
QueueBroadcast is used to enqueue a broadcast
queue.go:167
↓ 17 callers
Method
Write
(p []byte)
transport_test.go:169
↓ 17 callers
Method
estNumNodes
estNumNodes is used to get the current estimate of the number of nodes
state.go:820
↓ 14 callers
Method
GetHealthScore
GetHealthScore returns the raw health score.
awareness.go:62
↓ 14 callers
Method
deadNode
deadNode is invoked by the network layer when we get a message about a dead node
state.go:1253
↓ 14 callers
Function
decode
Decode reverses the encode operation on a byte slice input
util.go:40
↓ 12 callers
Method
orderedView
for testing; emits in transmit order if reverse=false
queue.go:68
↓ 11 callers
Method
EncryptionEnabled
Returns whether or not encryption is enabled
config.go:395
↓ 11 callers
Method
GetKeys
GetKeys returns the current set of keys on the ring.
keyring.go:146
↓ 11 callers
Method
Message
Returns a byte form of the message
queue.go:123
↓ 11 callers
Method
rawSendMsgPacket
rawSendMsgPacket is used to send message via packet to another host without modification, other than compression or encryption if enabled.
net.go:825
↓ 11 callers
Method
suspectNode
suspectNode is invoked by the network layer when we get a message about a suspect node
state.go:1160
↓ 10 callers
Method
Reset
Reset clears all the queued messages. Should only be used for tests.
queue.go:395
↓ 9 callers
Method
FullAddress
FullAddress returns the node name and host:port form of a node's address, suitable for use with a transport.
state.go:66
↓ 9 callers
Method
LocalAddr
()
net_test.go:1050
↓ 9 callers
Method
metricsString
()
state.go:21
↓ 9 callers
Method
probeNode
probeNode handles a single round of failure checking on a node.
state.go:305
↓ 8 callers
Method
IPAllowed
IPAllowed return an error if access to memberlist is denied
config.go:365
↓ 8 callers
Function
NewKeyring
NewKeyring constructs a new container for a set of encryption keys. The keyring contains all key data used internally by memberlist. While creating a
keyring.go:43
↓ 8 callers
Method
SetDeadline
(t time.Time)
net_test.go:1058
↓ 8 callers
Method
WriteTo
WriteTo is a packet-oriented interface that fires off the given payload to the given address in a connectionless fashion. This should return a time st
transport.go:47
↓ 8 callers
Function
ackHandlerExists
(t *testing.T, m *Memberlist, idx uint32)
state_test.go:1177
↓ 8 callers
Function
listenUDP
(t *testing.T)
net_test.go:995
↓ 8 callers
Function
makeCompoundMessage
makeCompoundMessage takes a list of messages and generates a single compound message containing all of them
util.go:179
↓ 8 callers
Method
rawSendMsgStream
rawSendMsgStream is used to stream a message to another host without modification, other than applying compression and encryption if enabled.
net.go:892
↓ 7 callers
Method
DeadOrLeft
()
state.go:98
↓ 7 callers
Function
ParseCIDRs
ParseCIDRs return a possible empty list of all Network that have been parsed In case of error, it returns succesfully parsed CIDRs and the last error
config.go:273
↓ 7 callers
Method
encodeAndSendMsg
encodeAndSendMsg is used to combine the encoding and sending steps
net.go:785
↓ 7 callers
Method
schedule
Schedule is used to ensure the Tick is performed periodically. This function is safe to call multiple times. If the memberlist is already scheduled, t
state.go:122
↓ 7 callers
Function
testConfigNet
(tb testing.TB, network byte)
memberlist_test.go:43
↓ 7 callers
Function
yield
()
memberlist_test.go:59
↓ 6 callers
Method
ApplyDelta
ApplyDelta takes the given delta and applies it to the score in a thread-safe manner. It also enforces a floor of zero and a max of max, so deltas may
awareness.go:44
↓ 6 callers
Method
GetBroadcasts
GetBroadcasts is used to get a number of broadcasts, up to a byte limit and applying a per-message overhead as provided.
queue.go:291
↓ 6 callers
Method
NumMembers
NumMembers returns the number of alive nodes currently known. Between the time of calling this and calling Members, the number of alive nodes may have
memberlist.go:626
↓ 6 callers
Function
decryptPayload
decryptPayload is used to decrypt a message with a given key, and verify it's contents. Any padding will be removed, and a slice to the plaintext is r
security.go:172
↓ 6 callers
Method
getMessages
()
memberlist_test.go:99
↓ 6 callers
Method
invokeAckHandler
Invokes an ack handler if any is associated, and reaps the handler immediately
state.go:887
↓ 6 callers
Function
joinHostPort
joinHostPort returns the host:port form of an address, for use with a transport.
util.go:303
↓ 6 callers
Function
kRandomNodes
kRandomNodes is used to select up to k random Nodes, excluding any nodes where the exclude function returns true. It is possible that less than k node
util.go:130
↓ 6 callers
Function
prettyPrintMessages
(msgs [][]byte)
queue_test.go:154
↓ 6 callers
Method
readStream
readStream is used to read messages from a stream connection, decrypting and decompressing the stream if necessary. The provided streamLabel if prese
net.go:1170
↓ 6 callers
Function
run
(r Retryer, t Failer, f func(r *R))
internal/retry/retry.go:118
↓ 6 callers
Method
setAlive
setAlive is used to mark this node as being alive. This is the same as if we received an alive notification our own network channel for ourself.
memberlist.go:431
↓ 6 callers
Function
waitUntilSize
(t *testing.T, m *Memberlist, expected int)
memberlist_test.go:2027
↓ 5 callers
Method
Confirm
Confirm registers that a possibly new peer has also determined the given node is suspect. This returns true if this was new information, and false if
suspicion.go:106
↓ 5 callers
Method
Finished
Finished is invoked when the message will no longer be broadcast, either due to invalidation or to the transmit limit being reached
queue.go:128
↓ 5 callers
Method
GetPrimaryKey
GetPrimaryKey returns the key on the ring at position 0. This is the key used for encrypting messages, and is the first key tried for decrypting messa
keyring.go:155
↓ 5 callers
Method
NewTransport
NewTransport returns a new MockTransport with a unique address, wired up to talk to the other transports in the MockNetwork.
mock_transport.go:25
↓ 5 callers
Method
ProtocolVersion
ProtocolVersion returns the protocol version currently in use by this memberlist.
memberlist.go:717
↓ 5 callers
Function
decodeCompoundMessage
decodeCompoundMessage splits a compound message and returns the slices of individual messages. Also returns the number of truncated messages and any p
util.go:205
↓ 5 callers
Method
encodeAndBroadcast
encodeAndBroadcast encodes a message and enqueues it for broadcast. Fails silently if there is an encoding error.
broadcast.go:53
↓ 5 callers
Function
encryptPayload
encryptPayload is used to encrypt a message with a given key. We make use of AES-128 in GCM mode. New byte buffer is the version, nonce, ciphertext an
security.go:89
↓ 5 callers
Method
getNodeState
(addr string)
memberlist.go:761
↓ 5 callers
Method
handleCommand
(buf []byte, from net.Addr, timestamp time.Time)
net.go:431
↓ 5 callers
Function
labelOverhead
(label string)
label.go:176
↓ 5 callers
Method
lenLocked
lenLocked returns the length of the overall queue datastructure. You must hold the mutex.
queue.go:387
↓ 5 callers
Method
log
(s string)
internal/retry/retry.go:73
↓ 5 callers
Method
nextSeqNo
nextSeqNo returns a usable sequence number in a thread safe way
state.go:805
↓ 5 callers
Function
retransmitLimit
retransmitLimit computes the limit of retransmissions
util.go:77
↓ 5 callers
Function
retry
(t *testing.T, n int, w time.Duration, fn func(func(string, ...interface{})))
state_test.go:2326
↓ 5 callers
Method
sendPingAndWaitForAck
sendPingAndWaitForAck makes a stream connection to the given address, sends a ping, and waits for an ack. All of this is done as a series of blocking
net.go:1347
↓ 5 callers
Method
setProbeChannels
setProbeChannels is used to attach the ackCh to receive a message when an ack with a given sequence number is received. The `complete` field of the me
state.go:834
↓ 5 callers
Function
verifyGaugeExists
(t *testing.T, name string, sink *metrics.InmemSink)
state_test.go:2647
↓ 4 callers
Method
AddKey
AddKey will install a new key on the ring. Adding a key to the ring will make it available for use in decryption. If the key already exists on the rin
keyring.go:81
↓ 4 callers
Method
Address
Address returns the host:port form of a node's address, suitable for use with a transport.
state.go:60
↓ 4 callers
Method
DialAddressTimeout
(addr Address, timeout time.Duration)
transport.go:101
↓ 4 callers
Method
Log
Log is called for the final test output
internal/retry/retry.go:29
↓ 4 callers
Method
deleteItem
deleteItem removes the given item from the overall datastructure. You must already hold the mutex.
queue.go:249
↓ 4 callers
Function
encryptedLength
encryptedLength is used to compute the buffer size needed for a message of given length
security.go:73
↓ 4 callers
Method
encryptionVersion
encryptionVersion returns the encryption version to use
net.go:212
↓ 4 callers
Method
getAdvertise
()
memberlist.go:477
↓ 4 callers
Function
joinAndTestMemberShip
(t *testing.T, self *Memberlist, membersToJoin []string, expectedMembers int)
memberlist_test.go:1139
↓ 4 callers
Function
newSuspicion
newSuspicion returns a timer started with the max time, and that will drive to the min time after seeing k or more confirmations. The from node will b
suspicion.go:53
↓ 4 callers
Function
pushPullScale
pushPushScale is used to scale the time interval at which push/pull syncs take place. It is used to prevent network saturation as the cluster size gro
util.go:94
↓ 4 callers
Function
randomOffset
Returns a random offset between 0 and n
util.go:60
↓ 4 callers
Function
testVerifyProtocolSingle
(t *testing.T, A [][6]uint8, B [][6]uint8, expect bool)
state_test.go:2591
↓ 3 callers
Function
AddLabelHeaderToPacket
AddLabelHeaderToPacket prefixes outgoing packets with the correct header if the label is not empty.
label.go:24
↓ 3 callers
Function
AddLabelHeaderToStream
AddLabelHeaderToStream prefixes outgoing streams with the correct header if the label is not empty.
label.go:70
next →
1–100 of 469, ranked by callers