simplebuffer

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryBuffer

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

InMemoryBuffer implements ISB interface.

func NewInMemoryBuffer

func NewInMemoryBuffer(name string, size int64) *InMemoryBuffer

NewInMemoryBuffer returns a new buffer.

func (*InMemoryBuffer) Ack

func (b *InMemoryBuffer) Ack(_ context.Context, offsets []isb.Offset) []error

Ack acknowledges the given offsets

func (*InMemoryBuffer) Close

func (b *InMemoryBuffer) Close() error

Close does nothing.

func (*InMemoryBuffer) GetName

func (b *InMemoryBuffer) GetName() string

GetName returns the buffer name.

func (*InMemoryBuffer) IsEmpty

func (b *InMemoryBuffer) IsEmpty() bool

IsEmpty returns whether the queue is empty.

func (*InMemoryBuffer) IsFull

func (b *InMemoryBuffer) IsFull() bool

IsFull returns whether the queue is full.

func (*InMemoryBuffer) Pending added in v0.5.3

func (b *InMemoryBuffer) Pending(_ context.Context) (int64, error)

func (*InMemoryBuffer) Rate added in v0.5.3

func (b *InMemoryBuffer) Rate(_ context.Context) (float64, error)

func (*InMemoryBuffer) Read

func (b *InMemoryBuffer) Read(ctx context.Context, count int64) ([]*isb.ReadMessage, error)

func (*InMemoryBuffer) String

func (b *InMemoryBuffer) String() string

Stringer

func (*InMemoryBuffer) Write

func (b *InMemoryBuffer) Write(_ context.Context, messages []isb.Message) ([]isb.Offset, []error)

Jump to

Keyboard shortcuts

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