package checkpoints

import "github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/checkpoints"

Index

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

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

type BlobStoreOptions struct {
	azcore.ClientOptions
}

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

Source Files

blob_store.go doc.go

Version
v1.3.0 (latest)
Published
Feb 8, 2025
Platform
linux/amd64
Imports
16 packages
Last checked
4 months ago

Tools for package owners.