consumer

package
v0.0.0-...-da226d4 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumeProcessor

type ConsumeProcessor = func(ctx context.Context, data []byte, id string) error

type Listener

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

type ListenerOptionFn

type ListenerOptionFn = func(c *Listener)

func WithBatchSize

func WithBatchSize(batchSize int) ListenerOptionFn

func WithConsumeTimeout

func WithConsumeTimeout(consumeTimeout time.Duration) ListenerOptionFn

func WithRepeatStrategyEven

func WithRepeatStrategyEven(maxAttempts int, intervalSec int) ListenerOptionFn

func WithRepeatStrategyProgressive

func WithRepeatStrategyProgressive(maxAttempts int, intervalSec int, multiplier float32) ListenerOptionFn

type ProcessResult

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

type RepeatStrategy

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

type RepeatStrategyEven

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

type RepeatStrategyProgressive

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

type Service

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

func New

func New(host string, port int, options ...ServiceOptionFn) *Service

func (*Service) Consume

func (c *Service) Consume(ctx context.Context, topic, group string, processor ConsumeProcessor, options ...ListenerOptionFn) error

type ServiceOptionFn

type ServiceOptionFn = func(c *Service)

func WithServiceUnavailableTimeout

func WithServiceUnavailableTimeout(unavailableTimeout time.Duration) ServiceOptionFn

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL