Browse Source

Add CreatePartitions to Broker

Conor Mongey 8 năm trước cách đây
mục cha
commit
72220d25c4
1 tập tin đã thay đổi với 11 bổ sung0 xóa
  1. 11 0
      broker.go

+ 11 - 0
broker.go

@@ -386,6 +386,17 @@ func (b *Broker) ApiVersions(request *ApiVersionsRequest) (*ApiVersionsResponse,
 	return response, nil
 }
 
+func (b *Broker) CreatePartitions(request *CreatePartitionsRequest) (*CreatePartitionsResponse, error) {
+	response := new(CreatePartitionsResponse)
+
+	err := b.sendAndReceive(request, response)
+	if err != nil {
+		return nil, err
+	}
+
+	return response, nil
+}
+
 func (b *Broker) CreateTopics(request *CreateTopicsRequest) (*CreateTopicsResponse, error) {
 	response := new(CreateTopicsResponse)