cursor

package
v0.0.65 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	LSN        uint64
	Seq        uint32
	Data       []byte
	ServerTime time.Time
}

func ToCheckpoint

func ToCheckpoint(msg pulsar.Message) (cp Checkpoint, err error)

func (*Checkpoint) After

func (cp *Checkpoint) After(cp2 Checkpoint) bool

func (*Checkpoint) Equal

func (cp *Checkpoint) Equal(cp2 Checkpoint) bool

func (*Checkpoint) FromKey

func (cp *Checkpoint) FromKey(str string) error

func (*Checkpoint) ToKey

func (cp *Checkpoint) ToKey() string

type PulsarSubscriptionTracker

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

func NewPulsarSubscriptionTracker

func NewPulsarSubscriptionTracker(client pulsar.Client, topic string, commitInterval time.Duration, replicateState bool) (*PulsarSubscriptionTracker, error)

func (*PulsarSubscriptionTracker) Close

func (p *PulsarSubscriptionTracker) Close()

func (*PulsarSubscriptionTracker) Commit

func (*PulsarSubscriptionTracker) Last

func (*PulsarSubscriptionTracker) Start

func (p *PulsarSubscriptionTracker) Start()

type PulsarTracker

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

func NewPulsarTracker

func NewPulsarTracker(client pulsar.Client, topic string) (*PulsarTracker, error)

func (*PulsarTracker) Close

func (p *PulsarTracker) Close()

func (*PulsarTracker) Commit

func (p *PulsarTracker) Commit(_ Checkpoint, _ pulsar.MessageID) error

func (*PulsarTracker) Last

func (p *PulsarTracker) Last() (last Checkpoint, err error)

func (*PulsarTracker) Start

func (p *PulsarTracker) Start()

type Tracker

type Tracker interface {
	Last() (cp Checkpoint, err error)
	Start()
	Commit(cp Checkpoint, mid pulsar.MessageID) error
	Close()
}

Jump to

Keyboard shortcuts

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