checkpoint

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckpointManager

type CheckpointManager interface {
	GetCheckpoint(Id string) (string, time.Time, error)
	SetCheckpoint(Id string, sequenceNumber string) error
}

func GetDefaultCheckpointManager

func GetDefaultCheckpointManager(config config.Config) (CheckpointManager, error)

type DynamoCheckpointManager

type DynamoCheckpointManager struct {
	sync.Mutex
	StorageConfig
	// contains filtered or unexported fields
}

func (*DynamoCheckpointManager) GetCheckpoint

func (cm *DynamoCheckpointManager) GetCheckpoint(Id string) (string, time.Time, error)

func (*DynamoCheckpointManager) SetCheckpoint

func (cm *DynamoCheckpointManager) SetCheckpoint(Id string, sequenceNumber string) error

type InMemoryCheckpointManager

type InMemoryCheckpointManager struct {
	sync.Mutex
	StorageConfig
	// contains filtered or unexported fields
}

func (*InMemoryCheckpointManager) GetCheckpoint

func (cm *InMemoryCheckpointManager) GetCheckpoint(Id string) (string, time.Time, error)

func (*InMemoryCheckpointManager) SetCheckpoint

func (cm *InMemoryCheckpointManager) SetCheckpoint(Id string, sequenceNumber string) error

type StorageConfig

type StorageConfig struct {
	Env                    string
	StorageType            string
	Table                  string
	Region                 string
	UpdateFrequencySeconds int
}

func GetStorageConfig

func GetStorageConfig(config config.Config) StorageConfig

Jump to

Keyboard shortcuts

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