Documentation
¶
Index ¶
Constants ¶
View Source
const ( Version = "gonzb-connect/1.0" MessageOffer = "offer" MessageAnswer = "answer" MessageConnect = "connect" MessageError = "error" MaxMessageBytes = 128 << 10 )
Variables ¶
This section is empty.
Functions ¶
func NodeIDFromPublicKey ¶
func ValidNodeID ¶
Types ¶
type Envelope ¶
type Envelope struct {
ProtocolVersion string `json:"protocol_version"`
MessageType string `json:"message_type"`
SessionID string `json:"session_id"`
SourceNodeID string `json:"source_node_id"`
TargetNodeID string `json:"target_node_id"`
CreatedAt string `json:"created_at"`
ExpiresAt string `json:"expires_at"`
Nonce string `json:"nonce"`
PayloadSHA256 string `json:"payload_sha256"`
SourcePublicKey string `json:"source_public_key"`
Payload string `json:"payload"`
Signature string `json:"signature"`
}
Envelope signs the hash of the exact SDP payload, not a re-encoded form. Coordinators inspect routing metadata but never need to parse Payload.
func NewEnvelope ¶
type ReplayCache ¶
type ReplayCache struct {
// contains filtered or unexported fields
}
func NewReplayCache ¶
func NewReplayCache() *ReplayCache
func NewReplayCacheWithLimit ¶
func NewReplayCacheWithLimit(limit int) *ReplayCache
Click to show internal directories.
Click to hide internal directories.