Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emitter ¶
type Emitter interface { Publish(ctx context.Context, event string, message interface{}, metadata map[string]interface{}) error Push(ctx context.Context, event, key string, message interface{}, metadata map[string]interface{}) error }
Emitter event emitter
type EmitterCache ¶
type EmitterCache struct {
// contains filtered or unexported fields
}
EmitterCache emitter key cache
func NewEmitterCache ¶
func NewEmitterCache(URL string) (*EmitterCache, error)
NewEmitterCache new emitter cache
type EventConfig ¶
type EventMessage ¶
type EventMessage struct { Data interface{} `json:"data,omitempty" mapstructure:"data"` Metadata map[string]interface{} `json:"metadata,omitempty" mapstructure:"metadata"` }
EventMessage event message
func (*EventMessage) ToBytes ¶
func (m *EventMessage) ToBytes() ([]byte, error)
type Hybrid ¶
type Hybrid struct { CollectionURL string `json:"collection_url,omitempty" mapstructure:"collection_url"` CacheURL string `json:"cache_url,omitempty" mapstructure:"cache_url"` Config EventConfig `json:"config,omitempty" mapstructure:"config"` PubsubURL string `json:"pubsub_url,omitempty" mapstructure:"pubsub_url"` KafkaBroker string `json:"kafka_broker,omitempty" mapstructure:"kafka_broker"` // contains filtered or unexported fields }
Hybrid hybrid outbox pubsub repository
func NewHybridEmitter ¶
NewHybridEmitter create instance of hybrid emitter
type Outbox ¶
type Outbox struct { CollectionURL string `json:"collection_url,omitempty" mapstructure:"collection_url"` CacheURL string `json:"cache_url,omitempty" mapstructure:"cache_url"` Config EventConfig `json:"config,omitempty" mapstructure:"config"` // contains filtered or unexported fields }
Outbox outbox repository
func NewOutboxEmitter ¶
NewOutboxEmitter create outbox emitter instance
type OutboxRecord ¶
type OutboxRecord struct { ID string `json:"_id,omitempty" mapstructure:"_id" docstore:"_id"` GroupID string `json:"group_id,omitempty" mapstructure:"group_id" docstore:"group_id"` KafkaTopic string `json:"kafka_topic,omitempty" mapstructure:"kafka_topic" docstore:"kafka_topic"` KafkaKey string `json:"kafka_key,omitempty" mapstructure:"kafka_key" docstore:"kafka_key"` KafkaValue string `json:"kafka_value,omitempty" mapstructure:"kafka_value" docstore:"kafka_value"` CreatedAt time.Time `json:"created_at,omitempty" mapstructure:"created_at" docstore:"created_at"` }
OutboxRecord outbox model
func (*OutboxRecord) GenerateID ¶
func (o *OutboxRecord) GenerateID() *OutboxRecord
GenerateID generate record ID
type PubSub ¶
type PubSub struct { Config EventConfig `json:"config,omitempty" mapstructure:"config"` CacheURL string `json:"cache_url,omitempty" mapstructure:"cache_url"` PubsubURL string `json:"pubsub_url,omitempty" mapstructure:"pubsub_url"` KafkaBroker string `json:"kafka_broker,omitempty" mapstructure:"kafka_broker"` // contains filtered or unexported fields }
PubSub pubsub event emitter
func NewPubSubEmitter ¶
NewPubSubEmitter create instance of pubsub emitter
Click to show internal directories.
Click to hide internal directories.