Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NoopLogger = &noopLogger{}
A logger that does not output information
var StdLogger = &stdLogger{}
A logger using golang's builtin log.Printf() method, prefixed with the level
Functions ¶
This section is empty.
Types ¶
type BrokerError ¶
An error that includes the origin of the error
type ConsumerCommitResult ¶
type ConsumerCommitResult struct { // The amount of errors with the origin Errors []BrokerError // The number of manual commit requests that succeeded SuccessCount int }
Represents the result of a manual commit operations to all brokers in the cluster.
type ConsumerOptions ¶
type ConsumerOptions struct { Group string // The consumer group Id string // A unique identifier for the consumer. When not set a random identifier will be generated. Topics []string // The topics to subscribe to MaxPollInterval time.Duration Logger Logger // The logger for the consumer to output the log messages }
Represents the options for creating a Consumer.
type ConsumerPollResult ¶
type ConsumerPollResult struct { TopicRecords []TopicRecords Error error }
Represents the result of a poll operation.
type GenVersion ¶
type GenVersion uint32
Generation version
func (GenVersion) String ¶
func (v GenVersion) String() string
type Logger ¶
type Logger interface { Debug(format string, a ...interface{}) Info(format string, a ...interface{}) Warn(format string, a ...interface{}) Error(format string, a ...interface{}) }
The logger to be used by the client to output log messages
type ProducerOptions ¶
type ProducerOptions struct { // The logger for the producer to output internal log messages Logger Logger // The amount of bytes to coalesce internally before flushing the frames to the TCP connection (defaults to 16 KiB) FlushThresholdBytes int // The amount of persistent connections to maintain per broker (defaults to 1) ConnectionsPerBroker int }
Represents the additional options to set when creating a Producer.
type RangeIndex ¶
type RangeIndex uint8
Represents an index within a token range
func (RangeIndex) String ¶
func (t RangeIndex) String() string
type TopicDataId ¶
type TopicDataId struct { Name string `json:"topic"` Token Token `json:"token"` RangeIndex RangeIndex `json:"rangeIndex"` Version GenVersion `json:"version"` }
TopicDataId contains information to locate a certain piece of data.
Specifies a topic, for a token, for a defined gen id.
func (*TopicDataId) String ¶
func (t *TopicDataId) String() string
type TopicRecords ¶
type TopicRecords struct { Topic *TopicDataId Records []Record }
Represents a set of records of a topic.