blackhole

package
v0.9.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blackhole

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

Blackhole is a sink to emulate /dev/null

func NewBlackhole

func NewBlackhole(vertex *dfv1.Vertex,
	fromBuffer isb.BufferReader,
	fetchWatermark fetch.Fetcher,
	publishWatermark map[string]publish.Publisher,
	whereToDecider forward.GoWhere,
	opts ...Option) (*Blackhole, error)

NewBlackhole returns Blackhole type.

func (*Blackhole) Close

func (b *Blackhole) Close() error

func (*Blackhole) ForceStop

func (b *Blackhole) ForceStop()

ForceStop stops sinking

func (*Blackhole) GetName

func (b *Blackhole) GetName() string

GetName returns the name.

func (*Blackhole) GetPartitionIdx added in v0.9.0

func (b *Blackhole) GetPartitionIdx() int32

GetPartitionIdx returns the partition index. for sink it is always 0.

func (*Blackhole) IsFull

func (b *Blackhole) IsFull() bool

IsFull returns whether sink is full, which is never true.

func (*Blackhole) Start

func (b *Blackhole) Start() <-chan struct{}

Start starts the sink.

func (*Blackhole) Stop

func (b *Blackhole) Stop()

Stop stops sinking

func (*Blackhole) Write

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

Write writes to the blackhole.

type Option

type Option func(*Blackhole) error

func WithLogger

func WithLogger(log *zap.SugaredLogger) Option

Jump to

Keyboard shortcuts

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