Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/hashicorp/memberlist
/ functions
Functions
469 in github.com/hashicorp/memberlist
⨍
Functions
469
◇
Types & classes
76
↓ 3 callers
Method
FailNow
()
internal/retry/retry.go:41
↓ 3 callers
Method
IPMustBeChecked
IPMustBeChecked return true if IPAllowed must be called
config.go:360
↓ 3 callers
Method
Invalidates
(other Broadcast)
broadcast.go:24
↓ 3 callers
Function
LogStringAddress
(addr string)
logging.go:19
↓ 3 callers
Method
Name
The unique identity of this broadcast message.
queue.go:150
↓ 3 callers
Method
RemoteAddr
()
net_test.go:1054
↓ 3 callers
Method
RemoveKey
RemoveKey drops a key from the keyring. This will return an error if the key requested for removal is currently at position 0 (primary key).
keyring.go:116
↓ 3 callers
Method
SendToAddress
(a Address, msg []byte)
memberlist.go:562
↓ 3 callers
Method
Toggle
(enabled bool)
state_test.go:1476
↓ 3 callers
Method
UseKey
UseKey changes the key used to encrypt messages. This is the only key used to encrypt messages, so peers should know this key before this method is ca
keyring.go:104
↓ 3 callers
Function
compressPayload
compressPayload takes an opaque input buffer, compresses it and wraps it in a compress{} message that is encoded.
util.go:243
↓ 3 callers
Function
decompressBuffer
decompressBuffer is used to decompress the buffer of a single compress message, handling multiple algorithms
util.go:278
↓ 3 callers
Method
encodeBroadcastNotify
encodeBroadcastNotify encodes a message and enqueues it for broadcast and notifies the given channel when transmission is finished. Fails silently if
broadcast.go:60
↓ 3 callers
Function
failedRemote
failedRemote checks the error and decides if it indicates a failure on the other end.
state.go:286
↓ 3 callers
Method
gossip
gossip is invoked every GossipInterval period to broadcast our gossip messages to a few random nodes.
state.go:590
↓ 3 callers
Method
hasLeft
()
memberlist.go:757
↓ 3 callers
Function
hasPort
hasPort is given a string of the form "host", "host:port", "ipv6::address", or "[ipv6::address]:port", and returns true if the string includes a port.
util.go:309
↓ 3 callers
Method
installKeys
installKeys will take out a lock on the keyring, and replace the keys with a new set of keys. The key indicated by primaryKey will be installed as the
keyring.go:132
↓ 3 callers
Method
invokeNackHandler
Invokes nack handler if any is associated.
state.go:900
↓ 3 callers
Function
newMemberlist
newMemberlist creates the network listeners. Does not schedule execution of background maintenance.
memberlist.go:100
↓ 3 callers
Method
nextIncarnation
nextIncarnation returns the next incarnation number in a thread safe way
state.go:810
↓ 3 callers
Method
refute
refute gossips an alive message in response to incoming information that we are suspect or dead. It will make sure the incarnation number beats the gi
state.go:915
↓ 3 callers
Function
registerInMemorySink
(t *testing.T)
state_test.go:2627
↓ 3 callers
Method
resetNodes
resetNodes is used when the tick wraps around. It will reap the dead nodes and shuffle the node list.
state.go:565
↓ 3 callers
Method
resolveAddr
resolveAddr is used to resolve the address into an address, port, and error. If no port is given, use the default
memberlist.go:371
↓ 3 callers
Function
runStep
Consul bug, rapid restart (before failure detection), with an updated meta data. Should be at incarnation 1 for both. This test is uncommented becaus
memberlist_test.go:2417
↓ 3 callers
Method
setAckHandler
setAckHandler is used to attach a handler to be invoked when an ack with a given sequence number is received. If a timeout is reached, the handler is
state.go:871
↓ 3 callers
Function
waitForCondition
(t *testing.T, fn func() (bool, string))
memberlist_test.go:1593
↓ 2 callers
Method
DialTimeout
DialTimeout is used to create a connection that allows us to perform two-way communication with a peer. This is generally more expensive than packet c
transport.go:59
↓ 2 callers
Method
FailNow
FailNow is called when the retrying is abandoned.
internal/retry/retry.go:32
↓ 2 callers
Method
GetAutoBindPort
GetAutoBindPort returns the bind port that was automatically given by the kernel, if a bind port of 0 was given.
net_transport.go:133
↓ 2 callers
Method
GetBroadcasts
GetBroadcasts is called when user data messages can be broadcast. It can return a list of buffers to send. Each buffer should assume an overhead as pr
delegate.go:27
↓ 2 callers
Method
Leave
Leave will broadcast a leave message but will not shutdown the background listeners, meaning the node will continue participating in gossip and state
memberlist.go:649
↓ 2 callers
Method
LocalNode
LocalNode is used to return the local Node
memberlist.go:501
↓ 2 callers
Method
NextOr
NextOr returns true if the operation should be repeated. Otherwise, it calls fail and returns false.
internal/retry/retry.go:163
↓ 2 callers
Method
NodeMeta
NodeMeta is used to retrieve meta-data about the current node when broadcasting an alive message. It's length is limited to the given byte size. This
delegate.go:13
↓ 2 callers
Method
NotifyJoin
NotifyJoin is invoked when a node is detected to have joined. The Node argument must not be modified.
event_delegate.go:13
↓ 2 callers
Method
NotifyLeave
NotifyLeave is invoked when a node is detected to have left. The Node argument must not be modified.
event_delegate.go:17
↓ 2 callers
Method
NotifyMsg
NotifyMsg is called when a user-data message is received. Care should be taken that this method does not block, since doing so would block the entire
delegate.go:19
↓ 2 callers
Method
NotifyUpdate
NotifyUpdate is invoked when a node is detected to have updated, usually involving the meta data. The Node argument must not be modified.
event_delegate.go:22
↓ 2 callers
Method
Ping
Ping initiates a ping to the node with the specified name.
state.go:524
↓ 2 callers
Function
RemoveLabelHeaderFromPacket
RemoveLabelHeaderFromPacket removes any label header from the provided packet and returns it along with the remaining packet contents.
label.go:37
↓ 2 callers
Function
RemoveLabelHeaderFromStream
RemoveLabelHeaderFromStream removes any label header from the beginning of the stream if present and returns it along with an updated conn with that h
label.go:90
↓ 2 callers
Method
ScaleTimeout
ScaleTimeout takes the given duration and scales it based on the current score. Less healthyness will lead to longer timeouts.
awareness.go:71
↓ 2 callers
Method
SendBestEffort
SendBestEffort uses the unreliable packet-oriented interface of the transport to target a user message at the given node (this does not use the gossip
memberlist.go:586
↓ 2 callers
Method
SendReliable
SendReliable uses the reliable stream-oriented interface of the transport to target a user message at the given node (this does not use the gossip mec
memberlist.go:601
↓ 2 callers
Method
UpdateNode
UpdateNode is used to trigger re-advertising the local node. This is primarily used with a Delegate to support dynamic updates to the local meta data.
memberlist.go:513
↓ 2 callers
Method
WriteToAddress
(b []byte, addr Address)
transport.go:100
↓ 2 callers
Method
addItem
addItem adds the given item into the overall datastructure. You must already hold the mutex.
queue.go:264
↓ 2 callers
Method
anyAlive
Check for any other alive node.
memberlist.go:697
↓ 2 callers
Function
appendBytes
(first []byte, second []byte)
security.go:204
↓ 2 callers
Function
decompressPayload
decompressPayload is used to unpack an encoded compress{} message and return its payload uncompressed
util.go:267
↓ 2 callers
Method
decryptRemoteState
decryptRemoteState is used to help decrypt the remote state
net.go:1121
↓ 2 callers
Function
encryptDecryptVersioned
(vsn encryptionVersion, t *testing.T)
security_test.go:46
↓ 2 callers
Method
encryptLocalState
encryptLocalState is used to help encrypt local state before sending
net.go:1092
↓ 2 callers
Function
encryptOverhead
encryptOverhead returns the maximum possible overhead of encryption by version
security.go:60
↓ 2 callers
Function
ensurePort
ensurePort makes sure the given string has a port number on it, otherwise it appends the given port as a default.
util.go:323
↓ 2 callers
Function
getBindAddrNet
(network byte)
memberlist_test.go:29
↓ 2 callers
Method
getBroadcasts
getBroadcasts is used to return a slice of broadcasts to send up to a maximum byte size, while imposing a per-broadcast overhead. This is used to fill
broadcast.go:80
↓ 2 callers
Function
getIntervalMetrics
(t *testing.T, sink *metrics.InmemSink)
state_test.go:2639
↓ 2 callers
Method
getNodeStateChange
(addr string)
memberlist.go:769
↓ 2 callers
Method
getPeer
(a Address)
mock_transport.go:186
↓ 2 callers
Method
getRemoteState
()
memberlist_test.go:90
↓ 2 callers
Method
hasShutdown
()
memberlist.go:753
↓ 2 callers
Method
ingestPacket
(buf []byte, from net.Addr, timestamp time.Time)
net.go:373
↓ 2 callers
Function
makeLabelHeader
(label string, rest []byte)
label.go:165
↓ 2 callers
Method
mergeRemoteState
mergeRemoteState is used to merge the remote state with our local state
net.go:1274
↓ 2 callers
Method
mergeState
mergeState is invoked by the network layer when we get a Push/Pull state transfer
state.go:1314
↓ 2 callers
Function
moveDeadNodes
moveDeadNodes moves dead and left nodes that that have not changed during the gossipToTheDeadTime interval to the end of the slice and returns the ind
util.go:106
↓ 2 callers
Function
newAwareness
newAwareness returns a new awareness object.
awareness.go:33
↓ 2 callers
Function
newPeekedConnFromBufferedReader
newPeekedConnFromBufferedReader will splice the buffer contents after the offset into the provided net.Conn and return the result so that the rest of
label.go:152
↓ 2 callers
Function
pkcs7decode
pkcs7decode is used to decode a buffer that has been padded
security.go:49
↓ 2 callers
Function
pkcs7encode
pkcs7encode is used to pad a byte buffer to a specific block size using the PKCS7 algorithm. "Ignores" some bytes to compensate for IV
security.go:40
↓ 2 callers
Method
pushPull
pushPull is invoked periodically to randomly perform a complete state exchange. Used to ensure a high level of convergence, but is also reasonably exp
state.go:648
↓ 2 callers
Method
pushPullNode
pushPullNode does a complete state exchange with a specific node.
state.go:670
↓ 2 callers
Method
queueBroadcast
queueBroadcast is like QueueBroadcast but you can use a nonzero value for the initial transmit tier assigned to the message. This is meant to be used
queue.go:185
↓ 2 callers
Method
readRemoteState
readRemoteState is used to read the remote state from a connection
net.go:1230
↓ 2 callers
Method
refreshAdvertise
()
memberlist.go:490
↓ 2 callers
Function
remainingSuspicionTime
remainingSuspicionTime takes the state variables of the suspicion timer and calculates the remaining time to wait before considering a node dead. The
suspicion.go:89
↓ 2 callers
Function
reservePort
(t *testing.T, ip net.IP, purpose string)
memberlist_test.go:1814
↓ 2 callers
Method
sendLocalState
sendLocalState is invoked to send our local state over a stream connection.
net.go:1010
↓ 2 callers
Method
setMeta
(meta []byte)
memberlist_test.go:72
↓ 2 callers
Method
setState
(state []byte)
memberlist_test.go:78
↓ 2 callers
Function
shuffleNodes
shuffleNodes randomly shuffles the input nodes using the Fisher-Yates shuffle
util.go:84
↓ 2 callers
Function
suspicionTimeout
suspicionTimeout computes the timeout that should be used when a node is suspected
util.go:69
↓ 2 callers
Method
tcpListen
tcpListen is a long running goroutine that accepts incoming TCP connections and hands them off to the stream channel.
net_transport.go:288
↓ 2 callers
Function
testMemberlist_Join_with_Labels
(t *testing.T, secretKey []byte)
memberlist_test.go:719
↓ 2 callers
Method
triggerFunc
triggerFunc is used to trigger a function call each time a message is received until a stop tick arrives.
state.go:164
↓ 2 callers
Method
verifyProtocol
verifyProtocol verifies that all the remote nodes can speak with our nodes and vice versa on both the core protocol as well as the delegate protocol l
state.go:697
↓ 2 callers
Function
verifySampleExists
(t *testing.T, name string, sink *metrics.InmemSink)
state_test.go:2657
↓ 2 callers
Method
walkReadOnlyLocked
walkReadOnlyLocked calls f for each item in the queue traversing it in natural order (by Less) when reverse=false and the opposite when true. You must
queue.go:87
↓ 1 callers
Method
AckPayload
AckPayload is invoked when an ack is being sent; the returned bytes will be appended to the ack
ping_delegate.go:14
↓ 1 callers
Function
CheckInteg
CheckInteg will skip a test if integration testing is not enabled.
integ_test.go:15
↓ 1 callers
Function
DefaultFailer
DefaultFailer provides default retry.Run() behavior for unit tests.
internal/retry/retry.go:144
↓ 1 callers
Function
DefaultWANConfig
DefaultWANConfig works like DefaultConfig, however it returns a configuration that is optimized for most WAN environments. The default configuration i
config.go:346
↓ 1 callers
Method
DialAddressTimeout
See NodeAwareTransport.
mock_transport.go:159
↓ 1 callers
Method
DialAddressTimeout
See NodeAwareTransport.
net_transport.go:250
↓ 1 callers
Method
FinalAdvertiseAddr
FinalAdvertiseAddr is given the user's configured values (which might be empty) and returns the desired IP and port to advertise to the rest of the cl
transport.go:35
↓ 1 callers
Method
IngestPacket
(conn net.Conn, addr net.Addr, now time.Time, shouldClose bool)
net_test.go:941
↓ 1 callers
Method
IngestStream
(conn net.Conn)
transport.go:95
← previous
next →
101–200 of 469, ranked by callers