@@ -37,7 +37,7 @@ type SyncGroupRequest struct {
37
37
ProtocolName string
38
38
39
39
// The group member assignments.
40
- Assigments []SyncGroupRequestAssignment
40
+ Assignments []SyncGroupRequestAssignment
41
41
}
42
42
43
43
// SyncGroupRequestAssignment represents an assignement for a goroup memeber.
@@ -67,7 +67,7 @@ type SyncGroupResponse struct {
67
67
ProtocolName string
68
68
69
69
// The member assignment.
70
- Assigment GroupProtocolAssignment
70
+ Assignment GroupProtocolAssignment
71
71
}
72
72
73
73
// GroupProtocolAssignment represents an assignment of topics and partitions for a group memeber.
@@ -88,17 +88,17 @@ func (c *Client) SyncGroup(ctx context.Context, req *SyncGroupRequest) (*SyncGro
88
88
GroupInstanceID : req .GroupInstanceID ,
89
89
ProtocolType : req .ProtocolType ,
90
90
ProtocolName : req .ProtocolName ,
91
- Assignments : make ([]syncgroup.RequestAssignment , 0 , len (req .Assigments )),
91
+ Assignments : make ([]syncgroup.RequestAssignment , 0 , len (req .Assignments )),
92
92
}
93
93
94
- for _ , assigment := range req .Assigments {
94
+ for _ , assignment := range req .Assignments {
95
95
assign := consumer.Assignment {
96
96
Version : consumer .MaxVersionSupported ,
97
- AssignedPartitions : make ([]consumer.TopicPartition , 0 , len (assigment .Assignment .AssignedPartitions )),
98
- UserData : assigment .Assignment .UserData ,
97
+ AssignedPartitions : make ([]consumer.TopicPartition , 0 , len (assignment .Assignment .AssignedPartitions )),
98
+ UserData : assignment .Assignment .UserData ,
99
99
}
100
100
101
- for topic , partitions := range assigment .Assignment .AssignedPartitions {
101
+ for topic , partitions := range assignment .Assignment .AssignedPartitions {
102
102
tp := consumer.TopicPartition {
103
103
Topic : topic ,
104
104
Partitions : make ([]int32 , 0 , len (partitions )),
@@ -115,7 +115,7 @@ func (c *Client) SyncGroup(ctx context.Context, req *SyncGroupRequest) (*SyncGro
115
115
}
116
116
117
117
syncGroup .Assignments = append (syncGroup .Assignments , syncgroup.RequestAssignment {
118
- MemberID : assigment .MemberID ,
118
+ MemberID : assignment .MemberID ,
119
119
Assignment : assignBytes ,
120
120
})
121
121
}
@@ -138,7 +138,7 @@ func (c *Client) SyncGroup(ctx context.Context, req *SyncGroupRequest) (*SyncGro
138
138
Error : makeError (r .ErrorCode , "" ),
139
139
ProtocolType : r .ProtocolType ,
140
140
ProtocolName : r .ProtocolName ,
141
- Assigment : GroupProtocolAssignment {
141
+ Assignment : GroupProtocolAssignment {
142
142
AssignedPartitions : make (map [string ][]int , len (assignment .AssignedPartitions )),
143
143
UserData : assignment .UserData ,
144
144
},
@@ -149,7 +149,7 @@ func (c *Client) SyncGroup(ctx context.Context, req *SyncGroupRequest) (*SyncGro
149
149
partitions [topicPartition .Topic ] = append (partitions [topicPartition .Topic ], int (partition ))
150
150
}
151
151
}
152
- res .Assigment .AssignedPartitions = partitions
152
+ res .Assignment .AssignedPartitions = partitions
153
153
154
154
return res , nil
155
155
}
0 commit comments