Documentation
¶
Index ¶
- Constants
- type ClusteringHandler
- type CrudData
- type EventBus
- type EventFanoutData
- type Handler
- type Marshaler
- type PostgresEventBus
- func (b *PostgresEventBus) Broadcast(ctx context.Context, channel string, value interface{})
- func (b *PostgresEventBus) ClusteringBroadcast(ctx context.Context, channel string, value Marshaler) error
- func (b *PostgresEventBus) ClusteringSubscribe(channel string, handler ClusteringHandler)
- func (b *PostgresEventBus) Name() string
- func (b *PostgresEventBus) Start() error
- func (b *PostgresEventBus) Stop(ctx context.Context) error
- func (b *PostgresEventBus) Subscribe(channel string, handler Handler)
Constants ¶
View Source
const ( EventCRUD = "crud" EventEventFanout = "event.fanout" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusteringHandler ¶
type ClusteringHandler func(v []byte)
type CrudData ¶
type EventFanoutData ¶
type EventFanoutData struct {
EventId string `json:"event_id"`
AttemptIds []string `json:"attempt_ids"`
}
func (*EventFanoutData) Marshal ¶
func (m *EventFanoutData) Marshal() ([]byte, error)
type PostgresEventBus ¶
type PostgresEventBus struct {
// contains filtered or unexported fields
}
func NewPostgresEventBus ¶
func NewPostgresEventBus(nodeID string, dsn string, log *zap.SugaredLogger, db *sql.DB) *PostgresEventBus
func (*PostgresEventBus) Broadcast ¶
func (b *PostgresEventBus) Broadcast(ctx context.Context, channel string, value interface{})
func (*PostgresEventBus) ClusteringBroadcast ¶
func (*PostgresEventBus) ClusteringSubscribe ¶
func (b *PostgresEventBus) ClusteringSubscribe(channel string, handler ClusteringHandler)
func (*PostgresEventBus) Name ¶
func (b *PostgresEventBus) Name() string
func (*PostgresEventBus) Start ¶
func (b *PostgresEventBus) Start() error
func (*PostgresEventBus) Subscribe ¶
func (b *PostgresEventBus) Subscribe(channel string, handler Handler)
Click to show internal directories.
Click to hide internal directories.