Documentation ¶
Overview ¶
Package broker implements a broker server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { pb.UnimplementedSchedulerServiceServer // contains filtered or unexported fields }
Handler implements the broker grpc server.
func (*Handler) SendDelayMessage ¶
func (s *Handler) SendDelayMessage(ctx context.Context, req *pb.SendDelayMessageRequest) (*emptypb.Empty, error)
SendDelayMessage send a delay message to the broker.
type Scheduler ¶
type Scheduler interface { // Run start the scheduler Run() // Produce produce a Message to DelayStorage Produce(ctx context.Context, msg *types.Message) error // NewConsumer consume Messages from the RealTime Connector queue NewConsumer(topic, group string, batchSize int, fn type2.HandleMessage) error // Close close the scheduler Close() error }
Scheduler interface
func New ¶
func New(config *configs.BrokerConfig, delay storage.DelayStorage, realtime connector.RealTimeConnector) (Scheduler, error)
New create a new scheduler
Directories ¶
Path | Synopsis |
---|---|
Package connector provides the connector of the broker.
|
Package connector provides the connector of the broker. |
kafka_connector
Package kafka_connector provides a connector to Kafka
|
Package kafka_connector provides a connector to Kafka |
redis_connector
Package redis_connector implements a connector with redis
|
Package redis_connector implements a connector with redis |
pkg
|
|
types
Package types provides the types of the broker.
|
Package types provides the types of the broker. |
Package server provides the start and dependency registration of the broker server
|
Package server provides the start and dependency registration of the broker server |
Package storage provides the storage of the broker.
|
Package storage provides the storage of the broker. |
redis_storage
Package redis_storage implements a storage with redis.
|
Package redis_storage implements a storage with redis. |
Click to show internal directories.
Click to hide internal directories.