Documentation
¶
Overview ¶
Package monitor defines shared monitor event names without coupling peer packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
// Type of the event.
EventType EventType
// EntityName is the name of the channel, store, or endpoint entity related to this event.
EntityName string
// Data carries optional event-specific payload data.
Data any
}
Event describes a lifecycle event published by Ranch components.
type EventType ¶
type EventType string
EventType names a monitor event.
const ( // ChannelCreatedEvt is emitted when a bus channel is created. ChannelCreatedEvt EventType = "bus.channel.created" // ChannelDestroyedEvt is emitted when a bus channel is destroyed. ChannelDestroyedEvt EventType = "bus.channel.destroyed" // ChannelSubscriberJoinedEvt is emitted when a handler subscribes to a channel. ChannelSubscriberJoinedEvt EventType = "bus.channel.subscriber.joined" // ChannelSubscriberLeftEvt is emitted when a handler unsubscribes from a channel. ChannelSubscriberLeftEvt EventType = "bus.channel.subscriber.left" // BrokerSubscribedEvt is emitted when a broker subscription is created. BrokerSubscribedEvt EventType = "bus.broker.subscribed" // BrokerUnsubscribedEvt is emitted when a broker subscription is removed. BrokerUnsubscribedEvt EventType = "bus.broker.unsubscribed" )
const ( // StoreCreatedEvt is emitted when a store is created. StoreCreatedEvt EventType = "store.created" // StoreDestroyedEvt is emitted when a store is destroyed. StoreDestroyedEvt EventType = "store.destroyed" // StoreInitializedEvt is emitted when a store is initialized. StoreInitializedEvt EventType = "store.initialized" // FabricEndpointSubscribeEvt is emitted when a STOMP client subscribes through Fabric. FabricEndpointSubscribeEvt EventType = "fabric.endpoint.subscribe" // FabricEndpointUnsubscribeEvt is emitted when a STOMP client unsubscribes through Fabric. FabricEndpointUnsubscribeEvt EventType = "fabric.endpoint.unsubscribe" )
Click to show internal directories.
Click to hide internal directories.