Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addpartitionstotxn.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type AddPartitionToTxn struct {
Partition int
}

// AddPartitionsToTxnRequest is the request structure fo the AddPartitionsToTxn function.
// AddPartitionsToTxnRequest is the request structure for the AddPartitionsToTxn function.
type AddPartitionsToTxnRequest struct {
// Address of the kafka broker to send the request to.
Addr net.Addr
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const (
defaultMaxWait = 500 * time.Millisecond
)

// Client is a high-level API to interract with kafka brokers.
// Client is a high-level API to interact with kafka brokers.
//
// All methods of the Client type accept a context as first argument, which may
// be used to asynchronously cancel the requests.
Expand Down
2 changes: 1 addition & 1 deletion createpartitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// CreatePartitionsRequest represents a request sent to a kafka broker to create
// and update topic parititions.
// and update topic partitions.
type CreatePartitionsRequest struct {
// Address of the kafka broker to send the request to.
Addr net.Addr
Expand Down
2 changes: 1 addition & 1 deletion createtopics.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (t createTopicsRequestV0ConfigEntry) writeTo(wb *writeBuffer) {
type ReplicaAssignment struct {
Partition int
// The list of brokers where the partition should be allocated. There must
// be as many entries in thie list as there are replicas of the partition.
// be as many entries in the list as there are replicas of the partition.
// The first entry represents the broker that will be the preferred leader
// for the partition.
//
Expand Down
4 changes: 2 additions & 2 deletions endtxn.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/segmentio/kafka-go/protocol/endtxn"
)

// EndTxnRequest represets a request sent to a kafka broker to end a transaction.
// EndTxnRequest represents a request sent to a kafka broker to end a transaction.
type EndTxnRequest struct {
// Address of the kafka broker to send the request to.
Addr net.Addr
Expand All @@ -27,7 +27,7 @@ type EndTxnRequest struct {
Committed bool
}

// EndTxnResponse represents a resposne from a kafka broker to an end transaction request.
// EndTxnResponse represents a response from a kafka broker to an end transaction request.
type EndTxnResponse struct {
// The amount of time that the broker throttled the request.
Throttle time.Duration
Expand Down
6 changes: 3 additions & 3 deletions joingroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type GroupProtocolSubscription struct {
// The Topics to subscribe to.
Topics []string

// UserData assosiated with the subscription for the given protocol
// UserData associated with the subscription for the given protocol
UserData []byte

// Partitions owned by this consumer.
Expand Down Expand Up @@ -91,9 +91,9 @@ type JoinGroupResponse struct {
Members []JoinGroupResponseMember
}

// JoinGroupResponseMember represents a group memmber in a reponse to a JoinGroup request.
// JoinGroupResponseMember represents a group member in a response to a JoinGroup request.
type JoinGroupResponseMember struct {
// The group memmber ID.
// The group member ID.
ID string

// The unique identifier of the consumer instance.
Expand Down
4 changes: 2 additions & 2 deletions leavegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type LeaveGroupRequest struct {
Members []LeaveGroupRequestMember
}

// LeaveGroupRequestMember represents the indentify of a member leaving a group.
// LeaveGroupRequestMember represents the identity of a member leaving a group.
type LeaveGroupRequestMember struct {
// The member ID to remove from the group.
ID string
Expand Down Expand Up @@ -54,7 +54,7 @@ type LeaveGroupResponseMember struct {
// The group instance ID to remove from the group.
GroupInstanceID string

// An error that may have occured when attempting to remove the member from the group.
// An error that may have occurred when attempting to remove the member from the group.
//
// The errors contain the kafka error code. Programs may use the standard
// errors.Is function to test the error against kafka error codes.
Expand Down
4 changes: 2 additions & 2 deletions metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (r topicMetadataRequestV1) size() int32 {

func (r topicMetadataRequestV1) writeTo(wb *writeBuffer) {
// communicate nil-ness to the broker by passing -1 as the array length.
// for this particular request, the broker interpets a zero length array
// for this particular request, the broker interprets a zero length array
// as a request for no topics whereas a nil array is for all topics.
if r == nil {
wb.writeArrayLen(-1)
Expand Down Expand Up @@ -211,7 +211,7 @@ func (r topicMetadataRequestV6) size() int32 {

func (r topicMetadataRequestV6) writeTo(wb *writeBuffer) {
// communicate nil-ness to the broker by passing -1 as the array length.
// for this particular request, the broker interpets a zero length array
// for this particular request, the broker interprets a zero length array
// as a request for no topics whereas a nil array is for all topics.
if r.Topics == nil {
wb.writeArrayLen(-1)
Expand Down
2 changes: 1 addition & 1 deletion protocol/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (rc *refCount) unref(onZero func()) {
}

const (
// Size of the memory buffer for a single page. We use a farily
// Size of the memory buffer for a single page. We use a fairly
// large size here (64 KiB) because batches exchanged with kafka
// tend to be multiple kilobytes in size, sometimes hundreds.
// Using large pages amortizes the overhead of the page metadata
Expand Down
2 changes: 1 addition & 1 deletion protocol/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ type Partition struct {
Offline []int32
}

// RawExchanger is an extention to the Message interface to allow messages
// RawExchanger is an extension to the Message interface to allow messages
// to control the request response cycle for the message. This is currently
// only used to facilitate v0 SASL Authenticate requests being written in
// a non-standard fashion when the SASL Handshake was done at v0 but not
Expand Down
8 changes: 4 additions & 4 deletions syncgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type SyncGroupRequest struct {
Assignments []SyncGroupRequestAssignment
}

// SyncGroupRequestAssignment represents an assignement for a goroup memeber.
// SyncGroupRequestAssignment represents an assignment for a group member.
type SyncGroupRequestAssignment struct {
// The ID of the member to assign.
MemberID string
Expand Down Expand Up @@ -70,12 +70,12 @@ type SyncGroupResponse struct {
Assignment GroupProtocolAssignment
}

// GroupProtocolAssignment represents an assignment of topics and partitions for a group memeber.
// GroupProtocolAssignment represents an assignment of topics and partitions for a group member.
type GroupProtocolAssignment struct {
// The topics and partitions assigned to the group memeber.
// The topics and partitions assigned to the group member.
AssignedPartitions map[string][]int

// UserData for the assignemnt.
// UserData for the assignment.
UserData []byte
}

Expand Down
2 changes: 1 addition & 1 deletion transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ func (g *connGroup) connect(ctx context.Context, addr net.Addr) (*conn, error) {
ver := make(map[protocol.ApiKey]int16, len(res.ApiKeys))

if res.ErrorCode != 0 {
return nil, fmt.Errorf("negotating API versions with kafka broker at %s: %w", g.addr, Error(res.ErrorCode))
return nil, fmt.Errorf("negotiating API versions with kafka broker at %s: %w", g.addr, Error(res.ErrorCode))
}

for _, r := range res.ApiKeys {
Expand Down