publish

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 11 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, keyspace string, js nats.JetStreamContext, heartbeatBucket nats.KeyValue, inputOpts ...PublishOption) *Publish

NewPublish returns `Publish`.

func (*Publish) Cleanup

func (p *Publish) Cleanup()

Cleanup cleans up the data associated with key. TODO: move this to control plane

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.

type PublishOption

type PublishOption func(*publishOptions)

func WithAutoRefreshHeartbeat

func WithAutoRefreshHeartbeat(enable bool) 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
}

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