checkpoints

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobStore

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

BlobStore is a CheckpointStore implementation that uses Azure Blob storage.

func NewBlobStore

func NewBlobStore(containerClient *container.Client, options *BlobStoreOptions) (*BlobStore, error)

NewBlobStore creates a checkpoint store that stores ownership and checkpoints in Azure Blob storage. NOTE: the container must exist before the checkpoint store can be used.

func (*BlobStore) ClaimOwnership

func (b *BlobStore) ClaimOwnership(ctx context.Context, partitionOwnership []azeventhubs.Ownership, options *azeventhubs.ClaimOwnershipOptions) ([]azeventhubs.Ownership, error)

ClaimOwnership attempts to claim ownership of the partitions in partitionOwnership and returns the actual partitions that were claimed.

If we fail to claim ownership because of another update then it will be omitted from the returned slice of [Ownership]'s. It is not considered an error.

func (*BlobStore) ListCheckpoints

func (b *BlobStore) ListCheckpoints(ctx context.Context, fullyQualifiedNamespace string, eventHubName string, consumerGroup string, options *azeventhubs.ListCheckpointsOptions) ([]azeventhubs.Checkpoint, error)

ListCheckpoints lists all the available checkpoints.

func (*BlobStore) ListOwnership

func (b *BlobStore) ListOwnership(ctx context.Context, fullyQualifiedNamespace string, eventHubName string, consumerGroup string, options *azeventhubs.ListOwnershipOptions) ([]azeventhubs.Ownership, error)

ListOwnership lists all ownerships.

func (*BlobStore) SetCheckpoint added in v1.0.0

func (b *BlobStore) SetCheckpoint(ctx context.Context, checkpoint azeventhubs.Checkpoint, options *azeventhubs.SetCheckpointOptions) error

SetCheckpoint updates a specific checkpoint with a sequence and offset.

NOTE: This function doesn't attempt to prevent simultaneous checkpoint updates - ownership is assumed.

type BlobStoreOptions added in v0.2.0

type BlobStoreOptions struct {
	azcore.ClientOptions
}

BlobStoreOptions contains optional parameters for the New, NewFromConnectionString and NewWithSharedKey functions

Jump to

Keyboard shortcuts

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