Documentation ¶
Index ¶
- func WithAddresses(addrs ...string) optionFn
- func WithGRPCClientConn(conn *grpc.ClientConn) optionFn
- type Client
- func (c *Client) Close() error
- func (c *Client) CreateTopic(ctx context.Context, params *sgproto.CreateTopicParams) error
- func (c *Client) ListPartitions(ctx context.Context, topic string) ([]string, error)
- func (c *Client) NewConsumer(topic, partition, group, name string) *Consumer
- func (c *Client) ProduceMessage(ctx context.Context, msg *sgproto.Message) error
- func (c *Client) ProduceMessageCh(ctx context.Context) (chan<- *sgproto.Message, <-chan error)
- type Consumer
- func (c *Consumer) Acknowledge(ctx context.Context, msg *sgproto.Message) error
- func (c *Consumer) AcknowledgeMessages(ctx context.Context, offsets []sandflake.ID) error
- func (c *Consumer) Commit(ctx context.Context, msg *sgproto.Message) error
- func (c *Consumer) Consume(ctx context.Context) (chan *sgproto.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAddresses ¶
func WithAddresses(addrs ...string) optionFn
func WithGRPCClientConn ¶ added in v0.1.1
func WithGRPCClientConn(conn *grpc.ClientConn) optionFn
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateTopic ¶
func (*Client) ListPartitions ¶
func (*Client) NewConsumer ¶
func (*Client) ProduceMessage ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func (*Consumer) Acknowledge ¶
func (*Consumer) AcknowledgeMessages ¶
Click to show internal directories.
Click to hide internal directories.