Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterReaderFactory ¶
func RegisterReaderFactory(protocol string, factory ReaderFactoryFunc)
Types ¶
type Reader ¶
type Reader interface {
Subscribe(ctx context.Context, h func(message []byte, topic string, args ...any)) error
HSubscribe(ctx context.Context, h func(message []byte, topic string, hs [][]byte, args ...any)) error
Fetch(
ctx context.Context, n uint32,
fetchResponseHandler func(n uint32, err error),
msgHandler func(message []byte, topic string, args ...any),
)
HFetch(
ctx context.Context, n uint32,
fetchResponseHandler func(n uint32, err error),
msgHandler func(message []byte, topic string, hs [][]byte, args ...any),
)
Ack(
ctx context.Context, msgIDs [][]byte,
ackHandler func(error),
ackMsgHandler func([]byte, error),
)
Nack(
ctx context.Context, msgIDs [][]byte,
nackHandler func(error),
nackMsgHandler func([]byte, error),
)
MsgIDStaticArgsLen() int
EncodeMsgID(buf []byte, topic string, args ...any) []byte
IsAutoCommit() bool
Close()
}
type ReaderFactoryFunc ¶
Click to show internal directories.
Click to hide internal directories.