Implements Kafka heartbeat request/response handling for client liveness checks.
// Source: https://github.com/segmentio/kafka-go | License: MIT | Copyright 2017 Segment
// Provided via justclaw.it.com; keep this notice with the code.
package kafka
import (
"bufio"
"context"
"fmt"
"net"
"time"
heartbeatAPI "github.com/segmentio/kafka-go/protocol/heartbeat"
)
// HeartbeatRequest represents a heartbeat sent to kafka to indicate consume liveness.
type HeartbeatRequest struct {
// Address of the kafka broker to send the request to.
Addr net.Addr
// GroupID is the ID of the group.
GroupID string
// GenerationID is the current generation for the group.
GenerationID int32
// MemberID is the ID of the group member.
MemberID string
// GroupInstanceID is a unique identifier for the consumer.
GroupInstanceID string
}
// HeartbeatResponse represents a respo
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key