github.com/QuangHoangHao/kafka-go@v0.4.36/protocol/findcoordinator/findcoordinator.go (about)

     1  package findcoordinator
     2  
     3  import "github.com/QuangHoangHao/kafka-go/protocol"
     4  
     5  func init() {
     6  	protocol.Register(&Request{}, &Response{})
     7  }
     8  
     9  type Request struct {
    10  	Key     string `kafka:"min=v0,max=v2"`
    11  	KeyType int8   `kafka:"min=v1,max=v2"`
    12  }
    13  
    14  func (r *Request) ApiKey() protocol.ApiKey { return protocol.FindCoordinator }
    15  
    16  type Response struct {
    17  	ThrottleTimeMs int32  `kafka:"min=v1,max=v2"`
    18  	ErrorCode      int16  `kafka:"min=v0,max=v2"`
    19  	ErrorMessage   string `kafka:"min=v1,max=v2,nullable"`
    20  	NodeID         int32  `kafka:"min=v0,max=v2"`
    21  	Host           string `kafka:"min=v0,max=v2"`
    22  	Port           int32  `kafka:"min=v0,max=v2"`
    23  }
    24  
    25  func (r *Response) ApiKey() protocol.ApiKey { return protocol.FindCoordinator }