Versions in this module Expand all Collapse all v0 v0.4.3 May 8, 2020 v0.4.2 May 8, 2020 Changes in this version + const ErrCorrupted + const ErrTruncated + func Register(req, res Message) + func WriteRequest(w io.Writer, apiVersion int16, correlationID int32, clientID string, ...) error + func WriteResponse(w io.Writer, apiVersion int16, correlationID int32, msg Message) error + type ApiKey int16 + const AddOffsetsToTxn + const AddPartitionsToTxn + const AlterConfigs + const AlterPartitionReassignments + const AlterReplicaLogDirs + const ApiVersions + const ControlledShutdown + const CreateAcls + const CreateDelegationToken + const CreatePartitions + const CreateTopics + const DeleteAcls + const DeleteGroups + const DeleteRecords + const DeleteTopics + const DescribeAcls + const DescribeConfigs + const DescribeDelegationToken + const DescribeGroups + const DescribeLogDirs + const ElectLeaders + const EndTxn + const ExpireDelegationToken + const Fetch + const FindCoordinator + const Heartbeat + const IncrementalAlterConfigs + const InitProducerId + const JoinGroup + const LeaderAndIsr + const LeaveGroup + const ListGroups + const ListOffsets + const ListPartitionReassignments + const Metadata + const OffsetCommit + const OffsetDelete + const OffsetFetch + const OffsetForLeaderEpoch + const Produce + const RenewDelegationToken + const SaslAuthenticate + const SaslHandshake + const StopReplica + const SyncGroup + const TxnOffsetCommit + const UpdateMetadata + const WriteTxnMarkers + func (k ApiKey) MaxVersion() int16 + func (k ApiKey) MinVersion() int16 + func (k ApiKey) SelectVersion(minVersion, maxVersion int16) int16 + func (k ApiKey) String() string + type Attributes int16 + const ControlBatch + const Gzip + const Lz4 + const Snappy + const Transactional + const Zstd + func (a Attributes) Compression() compress.Compression + func (a Attributes) ControlBatch() bool + func (a Attributes) Transactional() bool + type Broker struct + Host string + ID int + Port int + Rack string + func (b Broker) Network() string + func (b Broker) String() string + type BrokerMessage interface + Broker func(Cluster) (Broker, error) + type ByteSequence interface + Size func() int64 + func Bytes(b []byte) ByteSequence + func String(s string) ByteSequence + type Cluster struct + Brokers map[int]Broker + ClusterID string + Controller int + Topics map[string]Topic + func (c *Cluster) IsZero() bool + type Error string + func (e Error) Error() string + type GroupMessage interface + Group func() string + type Header struct + Key string + Value []byte + type Mapper interface + Map func(Cluster) ([]Message, Reducer, error) + type Message interface + ApiKey func() ApiKey + func ReadRequest(r io.Reader) (apiVersion int16, correlationID int32, clientID string, msg Message, err error) + func ReadResponse(r io.Reader, apiKey, apiVersion int16) (correlationID int32, msg Message, err error) + func Result(r interface{}) (Message, error) + func RoundTrip(rw io.ReadWriter, apiVersion int16, clientID string, msg Message) (Message, error) + type Partition struct + Error int + ID int + Leader int + type PreparedMessage interface + Prepare func(apiVersion int16) + type Record struct + Headers []Header + Key ByteSequence + Offset int64 + Time time.Time + Value ByteSequence + func (r *Record) Close() error + type RecordSet struct + Attributes Attributes + BaseOffset int64 + BaseSequence int32 + PartitionLeaderEpoch int32 + ProducerEpoch int16 + ProducerID int64 + Records []Record + Version int8 + func (rs *RecordSet) Close() error + func (rs *RecordSet) ReadFrom(r io.Reader) (int64, error) + func (rs *RecordSet) WriteTo(w io.Writer) (int64, error) + type Reducer interface + Reduce func(messages []Message, results []interface{}) (Message, error) + type Topic struct + Error int + Name string + Partitions map[int]Partition