Documentation
¶
Overview ¶
Package hbclient provides a client for the sentinel heartbeat protocol. It allows hosts to register their presence with sentinel DNS servers using a challenge-response protocol over DNS.
Index ¶
Constants ¶
View Source
const ( EDNSOptSentinelPubKey = 65001 // Public key in CERT request EDNSOptSentinelChallenge = 65002 // Challenge in TSIG request EDNSOptSentinelSignature = 65003 // Signature in TSIG request )
EDNS0 option codes for sentinel protocol
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
SentinelFQDN string // e.g., "test.g-dns.net"
PrivateKey crypto.Signer // Ed25519 or ECDSA P-256 private key
PublicKey crypto.PublicKey // Corresponding public key
PKIXData []byte // PKIX-encoded public key
// Timeout for DNS operations
Timeout time.Duration
// contains filtered or unexported fields
}
Client represents a heartbeat client for a specific sentinel
func (*Client) Heartbeat ¶
Heartbeat performs a full heartbeat cycle against all authoritative servers. Each server gets its own CERT→sign→TSIG cycle since challenges are server-specific.
func (*Client) PublicKeyHash ¶
PublicKeyHash returns the SHA-256 hash of the PKIX-encoded public key (hex)
Click to show internal directories.
Click to hide internal directories.