collectors

package
Version: v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchHandler

type BatchHandler func(chan *sabuhp.Message)

type BytesBatchHandler

type BytesBatchHandler func(chan []byte)

type BytesCollector

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

func NewBytesCollector

func NewBytesCollector(ctx context.Context, maxCount int, batchWait time.Duration, handler BytesBatchHandler) *BytesCollector

func (*BytesCollector) Start

func (mc *BytesCollector) Start()

func (*BytesCollector) Stop

func (mc *BytesCollector) Stop()

func (*BytesCollector) Take

func (mc *BytesCollector) Take(msg []byte) error

func (*BytesCollector) TakeTill

func (mc *BytesCollector) TakeTill(msg []byte, timeout time.Duration) error

func (*BytesCollector) Wait

func (mc *BytesCollector) Wait()

type MessageCollection

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

func NewMessageCollection

func NewMessageCollection(ctx context.Context, maxCount int, batchWait time.Duration, handler BatchHandler) *MessageCollection

func (*MessageCollection) Start

func (mc *MessageCollection) Start()

func (*MessageCollection) Stop

func (mc *MessageCollection) Stop()

func (*MessageCollection) Take

func (mc *MessageCollection) Take(msg *sabuhp.Message) error

func (*MessageCollection) TakeTill

func (mc *MessageCollection) TakeTill(msg *sabuhp.Message, timeout time.Duration) error

func (*MessageCollection) Wait

func (mc *MessageCollection) Wait()

type StringBatchHandler

type StringBatchHandler func(chan string)

type StringCollector

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

func NewStringCollector

func NewStringCollector(ctx context.Context, maxCount int, batchWait time.Duration, handler StringBatchHandler) *StringCollector

func (*StringCollector) Start

func (mc *StringCollector) Start()

func (*StringCollector) Stop

func (mc *StringCollector) Stop()

func (*StringCollector) Take

func (mc *StringCollector) Take(msg string) error

func (*StringCollector) TakeTill

func (mc *StringCollector) TakeTill(msg string, timeout time.Duration) error

func (*StringCollector) Wait

func (mc *StringCollector) Wait()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL