Documentation
¶
Index ¶
- type ConsumerSessionMessage
- type Inbox
- func (i *Inbox) Cleanup(sarama.ConsumerGroupSession) error
- func (i *Inbox) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
- func (i *Inbox) Handler(handler MessageHandler) *Inbox
- func (i *Inbox) Setup(sarama.ConsumerGroupSession) error
- func (i *Inbox) Shutdown(ctx context.Context) error
- func (i *Inbox) Start(ctx context.Context) (err error)
- type InboxManager
- type Inboxes
- type MessageHandler
- type MultiBatchConsumerConfig
- type Opts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerSessionMessage ¶
type ConsumerSessionMessage struct {
Message *sarama.ConsumerMessage
Session sarama.ConsumerGroupSession
}
type Inbox ¶
type Inbox struct {
// contains filtered or unexported fields
}
func (*Inbox) ConsumeClaim ¶
func (i *Inbox) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
func (*Inbox) Handler ¶
func (i *Inbox) Handler(handler MessageHandler) *Inbox
type InboxManager ¶
type InboxManager struct {
// contains filtered or unexported fields
}
func NewInboxManager ¶
func NewInboxManager(db *pg.DB) *InboxManager
func (*InboxManager) ProcessMessage ¶
type Inboxes ¶
type Inboxes struct {
ID string `pg:"id,type:uuid,default:uuid_generate_v4()"`
Payload map[string]interface{} `pg:"type:jsonb,notnull"`
Topic string `pg:"type:varchar(255),notnull"`
IsAccepted bool `pg:"type:bool,notnull,default:false"`
Publisher string `pg:"type:varchar(255),default:null"`
CreatedAt time.Time `pg:"type:timestamptz,default:now()"`
ProcessedAt time.Time `pg:"type:timestamptz,default:null"`
CreatedBy string `pg:"type:varchar(255)"`
UpdatedAt time.Time `pg:"type:timestamptz,default:now()"`
UpdatedBy string `pg:"type:varchar(255)"`
}
type MessageHandler ¶
type Opts ¶
func WithConsumer ¶
func WithConsumer(consumer sarama.ConsumerGroup) Opts
func WithMultiBatchConfig ¶
func WithMultiBatchConfig(cfg *MultiBatchConsumerConfig) Opts
func WithTopics ¶
Click to show internal directories.
Click to hide internal directories.