Documentation ¶
Index ¶
- Variables
- type APIError
- type ConsumeResp
- type ErrType
- type KaproxyClient
- func (c *KaproxyClient) ACK(group, topic string, message *ConsumeResp) *APIError
- func (c *KaproxyClient) BatchProduce(topic string, messages []Message) (int, *APIError)
- func (c *KaproxyClient) Consume(group, topic string, durationArg ...time.Duration) (*ConsumeResp, *APIError)
- func (c *KaproxyClient) Produce(topic string, message Message) (*ProduceResp, *APIError)
- func (c *KaproxyClient) ProduceWithHash(topic string, message Message) (*ProduceResp, *APIError)
- func (c *KaproxyClient) ProduceWithPartition(topic string, partition int, message Message) (*ProduceResp, *APIError)
- func (c *KaproxyClient) WithHttpClient(httpCli *http.Client, blockingHttpCli *http.Client) *KaproxyClient
- func (c *KaproxyClient) WithTimeout(timeout time.Duration) *KaproxyClient
- func (c *KaproxyClient) WithoutReplicate() *KaproxyClient
- type Message
- type ProduceResp
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMessage = &APIError{requestErr, "[204]no message in brokers", ""}
Functions ¶
This section is empty.
Types ¶
type ConsumeResp ¶
type ConsumeResp struct { Partition int `json:"partition"` Offset int64 `json:"offset"` Key []byte `json:"key"` Value []byte `json:"value"` }
func (*ConsumeResp) UnmarshalJSON ¶
func (c *ConsumeResp) UnmarshalJSON(data []byte) error
type KaproxyClient ¶
type KaproxyClient struct {
// contains filtered or unexported fields
}
func NewKaproxyClient ¶
func NewKaproxyClient(host string, port int, token string) *KaproxyClient
func (*KaproxyClient) ACK ¶
func (c *KaproxyClient) ACK(group, topic string, message *ConsumeResp) *APIError
func (*KaproxyClient) BatchProduce ¶
func (c *KaproxyClient) BatchProduce(topic string, messages []Message) (int, *APIError)
func (*KaproxyClient) Consume ¶
func (c *KaproxyClient) Consume(group, topic string, durationArg ...time.Duration) (*ConsumeResp, *APIError)
func (*KaproxyClient) Produce ¶
func (c *KaproxyClient) Produce(topic string, message Message) (*ProduceResp, *APIError)
func (*KaproxyClient) ProduceWithHash ¶
func (c *KaproxyClient) ProduceWithHash(topic string, message Message) (*ProduceResp, *APIError)
func (*KaproxyClient) ProduceWithPartition ¶
func (c *KaproxyClient) ProduceWithPartition(topic string, partition int, message Message) (*ProduceResp, *APIError)
func (*KaproxyClient) WithHttpClient ¶
func (c *KaproxyClient) WithHttpClient(httpCli *http.Client, blockingHttpCli *http.Client) *KaproxyClient
WithHttpClient was used to allow the user to custom the http client
func (*KaproxyClient) WithTimeout ¶
func (c *KaproxyClient) WithTimeout(timeout time.Duration) *KaproxyClient
WithTimeout return a pointer to kaproxyClient which http client's timeout is specified
func (*KaproxyClient) WithoutReplicate ¶
func (c *KaproxyClient) WithoutReplicate() *KaproxyClient
For airbus only
type ProduceResp ¶
Click to show internal directories.
Click to hide internal directories.