publish

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publish

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

Publish publishes the watermark for a processor entity.

func NewPublish

func NewPublish(ctx context.Context, processorEntity processor.ProcessorEntitier, hbStore store.WatermarkKVStorer, otStore store.WatermarkKVStorer, inputOpts ...PublishOption) *Publish

NewPublish returns `Publish`.

func (*Publish) GetLatestWatermark

func (p *Publish) GetLatestWatermark() processor.Watermark

GetLatestWatermark returns the latest watermark for that processor.

func (*Publish) PublishWatermark

func (p *Publish) PublishWatermark(wm processor.Watermark, offset isb.Offset)

PublishWatermark publishes watermark and will retry until it can succeed. It will not publish if the new-watermark is less than the current head watermark.

func (*Publish) StopPublisher added in v0.5.2

func (p *Publish) StopPublisher()

StopPublisher stops the publisher and cleans up the data associated with key.

type PublishOption

type PublishOption func(*publishOptions)

func WithAutoRefreshHeartbeatDisabled added in v0.5.2

func WithAutoRefreshHeartbeatDisabled() PublishOption

func WithBucketConfigs

func WithBucketConfigs(cfgs *nats.KeyValueConfig) PublishOption

func WithPodHeartbeatRate

func WithPodHeartbeatRate(rate int64) PublishOption

type Publisher

type Publisher interface {
	// PublishWatermark publishes the watermark.
	PublishWatermark(processor.Watermark, isb.Offset)
	// GetLatestWatermark returns the latest published watermark.
	GetLatestWatermark() processor.Watermark
	// StopPublisher stops the publisher
	StopPublisher()
}

Publisher interface defines how to publish Watermark for a ProcessorEntity.

Jump to

Keyboard shortcuts

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