Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientID ¶
type ClientID struct {
// contains filtered or unexported fields
}
ClientID identifies a client using 8 arbitrary bytes and can be used as a map key.
func BytesToClientID ¶
BytesToClientID creates a ClientID based on the provided bytes.
func MakeClientID ¶
MakeClientID generates a ClientID from the provided public key.
func StringToClientID ¶
StringToClientID creates a ClientID based on the provided hex string.
type MessageID ¶
type MessageID struct {
// contains filtered or unexported fields
}
MessageID identifies a message using 32 arbitrary bytes and can be used as a map key.
func BytesToMessageID ¶
BytesToMessageID converts a slice of 32 bytes to a message id.
func MakeMessageID ¶
MakeMessageID generates a MessageID from the provided Origin and OriginMessageID. It is deterministic, so that if a client needs to send a message twice, we can deduplicate the message by ID. It is a good hash so that we can be sure that IDs are uniformly distributed, even if the clients are miscoded or hostile.
func RandomMessageID ¶
RandomMessageID generates a MessageID from random bytes. This is appropriate for messages created on the server, client messages should use MakeMessageID.
func StringToMessageID ¶
StringToMessageID creates a MessageID based on the provided hex string.
Directories ¶
Path | Synopsis |
---|---|
Package anypbtest offers test helpers for working with AnyPb protos.
|
Package anypbtest offers test helpers for working with AnyPb protos. |
Package fscontext contains helpers for migrating Fleetspeak to context.Context.
|
Package fscontext contains helpers for migrating Fleetspeak to context.Context. |
proto
|
|
Package should lets callers indicate impossible conditions from the code.
|
Package should lets callers indicate impossible conditions from the code. |