Documentation
¶
Index ¶
- type Broker
- func (b *Broker) ACLManager() *acl.Manager
- func (b *Broker) CallRetry(task *retry.Task) error
- func (b *Broker) CallTimeout(task *retry.Task) error
- func (b *Broker) Close() error
- func (b *Broker) Name() string
- func (b *Broker) RoutePublish(ctx context.Context, m *brokerpublish.Message) error
- func (b *Broker) SetPublishRetry(schedule facade.RetrySchedule)
- func (b *Broker) SharedSubscriptionManager() *shared_manager.SharedSubscriptionManager
- func (b *Broker) Start(ctx context.Context) error
- type Handlers
- type Observer
- type Option
- func WithClientCenter(center session.Center) Option
- func WithClientDeliveryEvent(ev delivery_notify.ClientDeliveryEvent) Option
- func WithClientManager(manager *client.Manager) Option
- func WithClusterController(controller cluster.State) Option
- func WithDeliveryCursorStore(cursorStore delivery.CursorStore) Option
- func WithDeliveryTaskStore(taskStore delivery.TaskStore) Option
- func WithEvent(driver events.EventEmmiter) Option
- func WithGlobalNotify(notify cluster.NodeController) Option
- func WithHandlers(handlers *Handlers) Option
- func WithKeyStore(store store.KVStore) Option
- func WithNodeMeta(meta *cluster.NodeMeta) Option
- func WithPlugins(plugins *plugin.Plugins) Option
- func WithPublishRetry(schedule facade.RetrySchedule) Option
- func WithRetainStore(retain *retain.Store) Option
- func WithSharedSubscriptionStore(ss store.SharedSubscriptionStore) Option
- func WithStateRouter(router staterouter.Client) Option
- func WithSubCenter(tree subscription.Center) Option
- func WithWillDelayCenter(center willdelay.Center, sessionCenter session.Center, cluster *raft.Cluster, ...) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
func NewBroker ¶
func NewBroker( cfg config.Broker, pluginCfg config.Plugins, clusterCfg config.Cluster, deliveryCfg config.DeliveryRunner, option ...Option, ) (*Broker, error)
NewBroker 创建 Broker 核心实例,并完成 listener、基础缓存和插件依赖的初始化。
func (*Broker) ACLManager ¶
func (*Broker) CallTimeout ¶
CallTimeout handles publish retry timeout for the current connection while preserving persistent session state.
func (*Broker) RoutePublish ¶
RoutePublish 将 client 侧 publish 事件接入 Broker 的下行投递流水线。
func (*Broker) SetPublishRetry ¶
func (b *Broker) SetPublishRetry(schedule facade.RetrySchedule)
func (*Broker) SharedSubscriptionManager ¶
func (b *Broker) SharedSubscriptionManager() *shared_manager.SharedSubscriptionManager
type Handlers ¶
type Handlers struct {
Connect brokerHandler
Publish brokerHandler
PublishAck brokerHandler
PublishRec brokerHandler
PublishRel brokerHandler
PublishComp brokerHandler
Ping brokerHandler
Sub brokerHandler
UnSub brokerHandler
Auth brokerHandler
Disconnect brokerHandler
}
type Observer ¶
type Observer interface {
OnClientClose(b Broker, c *brokerclient.Client)
}
type Option ¶
type Option func(*Broker)
func WithClientCenter ¶
func WithClientDeliveryEvent ¶
func WithClientDeliveryEvent(ev delivery_notify.ClientDeliveryEvent) Option
func WithClientManager ¶
func WithClusterController ¶
func WithDeliveryCursorStore ¶
func WithDeliveryCursorStore(cursorStore delivery.CursorStore) Option
func WithDeliveryTaskStore ¶
func WithEvent ¶
func WithEvent(driver events.EventEmmiter) Option
func WithGlobalNotify ¶
func WithGlobalNotify(notify cluster.NodeController) Option
func WithHandlers ¶
func WithKeyStore ¶
func WithNodeMeta ¶
func WithPlugins ¶
func WithPublishRetry ¶
func WithPublishRetry(schedule facade.RetrySchedule) Option
func WithRetainStore ¶
func WithSharedSubscriptionStore ¶
func WithSharedSubscriptionStore(ss store.SharedSubscriptionStore) Option
func WithStateRouter ¶
func WithStateRouter(router staterouter.Client) Option
func WithSubCenter ¶
func WithSubCenter(tree subscription.Center) Option
Click to show internal directories.
Click to hide internal directories.