Documentation ¶
Index ¶
- func GetAzureBlobListLength(ctx context.Context, podIdentity string, ...) (int, error)
- func GetAzureMetricValue(ctx context.Context, info AzureMonitorInfo) (int32, error)
- func GetAzureQueueLength(ctx context.Context, podIdentity string, connectionString, queueName string, ...) (int32, error)
- func GetEventHubClient(info EventHubInfo) (*eventhub.Hub, error)
- func ParseAzureEventHubConnectionString(connectionString string) (string, string, error)
- func ParseAzureStorageBlobConnection(podIdentity, connectionString, accountName string) (azblob.Credential, *url.URL, error)
- func ParseAzureStorageQueueConnection(podIdentity, connectionString, accountName string) (azqueue.Credential, *url.URL, error)
- type AADToken
- type AzureMonitorInfo
- type AzureStorageEndpointType
- type Checkpoint
- type EventHubInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAzureBlobListLength ¶
func GetAzureBlobListLength(ctx context.Context, podIdentity string, connectionString, blobContainerName string, accountName string, blobDelimiter string, blobPrefix string) (int, error)
GetAzureBlobListLength returns the count of the blobs in blob container in int
func GetAzureMetricValue ¶
func GetAzureMetricValue(ctx context.Context, info AzureMonitorInfo) (int32, error)
GetAzureMetricValue returns the value of an Azure Monitor metric, rounded to the nearest int
func GetAzureQueueLength ¶
func GetAzureQueueLength(ctx context.Context, podIdentity string, connectionString, queueName string, accountName string) (int32, error)
GetAzureQueueLength returns the length of a queue in int
func GetEventHubClient ¶
func GetEventHubClient(info EventHubInfo) (*eventhub.Hub, error)
GetEventHubClient returns eventhub client
func ParseAzureEventHubConnectionString ¶
ParseAzureEventHubConnectionString parses Event Hub connection string into (namespace, name) Connection string should be in following format: Endpoint=sb://eventhub-namespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=secretKey123;EntityPath=eventhub-name
Types ¶
type AADToken ¶
type AADToken struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` ExpiresIn string `json:"expires_in"` ExpiresOn string `json:"expires_on"` NotBefore string `json:"not_before"` Resource string `json:"resource"` TokenType string `json:"token_type"` }
AADToken is the token from Azure AD
type AzureMonitorInfo ¶
type AzureStorageEndpointType ¶
type AzureStorageEndpointType int
const ( BlobEndpoint AzureStorageEndpointType = iota QueueEndpoint TableEndpoint FileEndpoint )
func (AzureStorageEndpointType) Name ¶
func (e AzureStorageEndpointType) Name() string
func (AzureStorageEndpointType) Prefix ¶
func (e AzureStorageEndpointType) Prefix() string
type Checkpoint ¶
type Checkpoint struct { PartitionID string `json:"PartitionId"` SequenceNumber int64 `json:"SequenceNumber"` // contains filtered or unexported fields }
Checkpoint is the object eventhub processor stores in storage for checkpointing event processors. This matches the object stored by the eventhub C# sdk and Java sdk
func GetCheckpointFromBlobStorage ¶
func GetCheckpointFromBlobStorage(ctx context.Context, info EventHubInfo, partitionID string) (Checkpoint, error)
GetCheckpointFromBlobStorage accesses Blob storage and gets checkpoint information of a partition