Documentation ¶
Index ¶
- type BlobStore
- func (b *BlobStore) ClaimOwnership(ctx context.Context, partitionOwnership []azeventhubs.Ownership, ...) ([]azeventhubs.Ownership, error)
- func (b *BlobStore) ListCheckpoints(ctx context.Context, fullyQualifiedNamespace string, eventHubName string, ...) ([]azeventhubs.Checkpoint, error)
- func (b *BlobStore) ListOwnership(ctx context.Context, fullyQualifiedNamespace string, eventHubName string, ...) ([]azeventhubs.Ownership, error)
- func (b *BlobStore) SetCheckpoint(ctx context.Context, checkpoint azeventhubs.Checkpoint, ...) error
- type BlobStoreOptions
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