plugins

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumeListener

type ConsumeListener interface {
	// PrepareConsume does something before data is handled by your handler logic
	PrepareConsume(ctx context.Context, topic string, msg *model.Msg, err error)

	// OnConsumeSucceed does something after data is handled by your handler logic successfully
	OnConsumeSucceed(ctx context.Context, topic string, msg *model.Msg)

	// OnConsumeFail does something when data is failed to handled by your handler logic
	OnConsumeFail(ctx context.Context, topic string, msg *model.Msg, err error)
}

type IdCreator

type IdCreator interface {
	Create() string
}

type Limiter

type Limiter interface {
	BlockOK() bool
}

type ProducerListener

type ProducerListener interface {
	// PrepareSend does something before msg is sent
	PrepareSend(ctx context.Context, topic string, msg *model.Msg, err error)

	// OnSendSucceed does something after msg is sent successfully
	OnSendSucceed(ctx context.Context, topic string, msg *model.Msg)

	// OnSendFail does something when msg is failed to be sent
	OnSendFail(ctx context.Context, topic string, msg *model.Msg, err error)
}

type SnowflakeCreator

type SnowflakeCreator struct {
	// contains filtered or unexported fields
}

func NewSnowflakeCreator

func NewSnowflakeCreator(node int64) *SnowflakeCreator

func (*SnowflakeCreator) Create

func (s *SnowflakeCreator) Create() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳