Produce

package
v0.0.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequest

func NewRequest(args *Args, recordSet []byte) *api.Request

Types

type Args added in v0.0.5

type Args struct {
	ClientId  string
	Topic     string
	Partition int32
	Acks      int16 // 0: no, 1: leader only, -1: all ISRs (as specified by min.insync.replicas)
	TimeoutMs int32
}

type Data

type Data struct {
	Partition int32
	RecordSet []byte
}

type PartitionResponse

type PartitionResponse struct {
	Partition      int32
	ErrorCode      int16
	BaseOffset     int64
	LogAppendTime  int64
	LogStartOffset int64
}

type Request

type Request struct {
	TransactionalId string // NULLABLE_STRING
	Acks            int16  // 0: no, 1: leader only, -1: all ISRs (as specified by min.insync.replicas)
	TimeoutMs       int32
	TopicData       []TopicData
}

type Response

type Response struct {
	TopicResponses []TopicResponse
	ThrottleTimeMs int32
}

func UnmarshalResponse

func UnmarshalResponse(b []byte) (*Response, error)

type TopicData

type TopicData struct {
	Topic string
	Data  []Data
}

type TopicResponse

type TopicResponse struct {
	Topic              string
	PartitionResponses []PartitionResponse
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL