queue

package
v0.0.0-...-dac20d5 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncConsumer

type AsyncConsumer interface {
	// Start start the consumer
	Start(cb func(uint32, uint64, [][]byte))
	// Commit commit completed offset
	Commit(map[uint32]uint64, func(error))
	// CommitPartition commit completed offset
	CommitPartition(uint32, uint64, func(error))
	// Stop stop consumer
	Stop()
}

AsyncConsumer async consumer

func NewAsyncConsumer

func NewAsyncConsumer(tid uint64, store storage.Storage, consumer []byte) (AsyncConsumer, error)

NewAsyncConsumer create a async consumer

func NewAsyncConsumerWithOffsets

func NewAsyncConsumerWithOffsets(tid uint64, store storage.Storage, consumer []byte, offsets []uint64) (AsyncConsumer, error)

NewAsyncConsumerWithOffsets create a async consumer with offsets

type Consumer

type Consumer interface {
	// Start start the consumer
	Start(batch uint64, cb func(uint32, uint64, ...[]byte) (uint64, error))
	// Stop stop consumer
	Stop()
}

Consumer a simple queue consumer

Jump to

Keyboard shortcuts

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