Documentation ¶
Index ¶
- func GetAzureBlobListLength(ctx context.Context, httpClient util.HTTPDoer, ...) (int, error)
- func GetAzureMetricValue(ctx context.Context, info MonitorInfo, ...) (int32, error)
- func GetAzureQueueLength(ctx context.Context, httpClient util.HTTPDoer, ...) (int32, error)
- func GetEventHubClient(info EventHubInfo) (*eventhub.Hub, error)
- func ParseAzureEventHubConnectionString(connectionString string) (string, string, error)
- func ParseAzureStorageBlobConnection(httpClient util.HTTPDoer, podIdentity kedav1alpha1.PodIdentityProvider, ...) (azblob.Credential, *url.URL, error)
- func ParseAzureStorageQueueConnection(httpClient util.HTTPDoer, podIdentity kedav1alpha1.PodIdentityProvider, ...) (azqueue.Credential, *url.URL, error)
- type AADToken
- type Checkpoint
- type EventHubInfo
- type MonitorInfo
- type StorageEndpointType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAzureBlobListLength ¶
func GetAzureBlobListLength(ctx context.Context, httpClient util.HTTPDoer, podIdentity kedav1alpha1.PodIdentityProvider, 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 MonitorInfo, podIdentity kedav1alpha1.PodIdentityProvider) (int32, error)
GetAzureMetricValue returns the value of an Azure Monitor metric, rounded to the nearest int
func GetAzureQueueLength ¶
func GetAzureQueueLength(ctx context.Context, httpClient util.HTTPDoer, podIdentity kedav1alpha1.PodIdentityProvider, 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
func ParseAzureStorageBlobConnection ¶
func ParseAzureStorageBlobConnection(httpClient util.HTTPDoer, podIdentity kedav1alpha1.PodIdentityProvider, connectionString, accountName string) (azblob.Credential, *url.URL, error)
ParseAzureStorageBlobConnection parses blob connection string and returns credential and resource url
func ParseAzureStorageQueueConnection ¶
func ParseAzureStorageQueueConnection(httpClient util.HTTPDoer, podIdentity kedav1alpha1.PodIdentityProvider, connectionString, accountName string) (azqueue.Credential, *url.URL, error)
ParseAzureStorageQueueConnection parses queue connection string and returns credential and resource url
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 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, httpClient util.HTTPDoer, info EventHubInfo, partitionID string) (Checkpoint, error)
GetCheckpointFromBlobStorage accesses Blob storage and gets checkpoint information of a partition
type EventHubInfo ¶
type EventHubInfo struct { EventHubConnection string EventHubConsumerGroup string StorageConnection string BlobContainer string Namespace string EventHubName string }
EventHubInfo to keep event hub connection and resources
type MonitorInfo ¶
type MonitorInfo struct { ResourceURI string TenantID string SubscriptionID string ResourceGroupName string Name string Filter string AggregationInterval string AggregationType string ClientID string ClientPassword string }
MonitorInfo to create metric request
type StorageEndpointType ¶
type StorageEndpointType int
StorageEndpointType for different types of storage provided by Azure
const ( // BlobEndpoint storage type BlobEndpoint StorageEndpointType = iota // QueueEndpoint storage type QueueEndpoint // TableEndpoint storage type TableEndpoint // FileEndpoint storage type FileEndpoint )
func (StorageEndpointType) Name ¶
func (e StorageEndpointType) Name() string
Name returns resource name for StorageEndpointType
func (StorageEndpointType) Prefix ¶
func (e StorageEndpointType) Prefix() string
Prefix returns prefix for a StorageEndpointType