Documentation
¶
Index ¶
Constants ¶
View Source
const (
NL = "\n"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageHandler ¶
MessageHandler represents Message handler for Subscriber.
type PubSub ¶
type PubSub interface {
Publisher
Subscriber
}
PubSub represents aggregation interface for publisher and subscriber.
type Publisher ¶
type Publisher interface {
// Publishes message to the stream.
Publish(topic, subtopic string, msg []byte) error
}
Publisher specifies message publishing API.
type Subscriber ¶
type Subscriber interface {
// Subscribe subscribes to the message stream and consumes messages.
Subscribe(topic string, handler MessageHandler) error
// Unsubscribe unsubscribes from the message stream and
// stops consuming messages.
Unsubscribe(topic string) error
}
Subscriber specifies message subscription API.
Directories
¶
| Path | Synopsis |
|---|---|
|
snowflake is a distributed unique ID generator inspired by Twitter's snowflake.
|
snowflake is a distributed unique ID generator inspired by Twitter's snowflake. |
|
gcache-adapter
|
|
|
examples/client
command
|
|
|
examples/server
command
|
|
|
Redis Stream 是 Redis 5.0 版本新增加的数据结构。
|
Redis Stream 是 Redis 5.0 版本新增加的数据结构。 |
|
Package guuid generates and inspects UUIDs.
|
Package guuid generates and inspects UUIDs. |
Click to show internal directories.
Click to hide internal directories.