Documentation ¶
Index ¶
- Constants
- Variables
- func GetUnprocessedEventCountWithoutCheckpoint(partitionInfo *eventhub.HubPartitionRuntimeInformation) int64
- func GetValueFromResponse(body []byte, valueLocation string) (int64, error)
- type GoogleApplicationCredentials
- type PushScaler
- type Scaler
- func NewArtemisQueueScaler(resolvedSecrets, metadata, authParams map[string]string) (Scaler, error)
- func NewAwsCloudwatchScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)
- func NewAwsKinesisStreamScaler(resolvedEnv, metadata map[string]string, authParams map[string]string) (Scaler, error)
- func NewAwsSqsQueueScaler(resolvedEnv, metadata map[string]string, authParams map[string]string) (Scaler, error)
- func NewAzureBlobScaler(resolvedEnv, metadata, authParams map[string]string, podIdentity string) (Scaler, error)
- func NewAzureEventHubScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)
- func NewAzureLogAnalyticsScaler(resolvedSecrets, metadata, authParams map[string]string, podIdentity string) (Scaler, error)
- func NewAzureMonitorScaler(resolvedEnv, metadata, authParams map[string]string, podIdentity string) (Scaler, error)
- func NewAzureQueueScaler(resolvedEnv, metadata, authParams map[string]string, podIdentity string) (Scaler, error)
- func NewAzureServiceBusScaler(resolvedEnv, metadata, authParams map[string]string, podIdentity string) (Scaler, error)
- func NewCronScaler(resolvedEnv, metadata map[string]string) (Scaler, error)
- func NewExternalScaler(name, namespace string, metadata, resolvedEnv map[string]string) (Scaler, error)
- func NewHuaweiCloudeyeScaler(metadata, authParams map[string]string) (Scaler, error)
- func NewKafkaScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)
- func NewLiiklusScaler(resolvedEnv map[string]string, metadata map[string]string) (Scaler, error)
- func NewMetricsAPIScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)
- func NewMySQLScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)
- func NewPostgreSQLScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)
- func NewPrometheusScaler(resolvedEnv, metadata map[string]string) (Scaler, error)
- func NewPubSubScaler(resolvedEnv, metadata map[string]string) (Scaler, error)
- func NewRabbitMQScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)
- func NewRedisScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)
- func NewRedisStreamsScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)
- func NewStanScaler(resolvedSecrets, metadata map[string]string) (Scaler, error)
- type StackDriverClient
- type XDGSCRAMClient
Constants ¶
const ( KafkaSASLTypeNone kafkaSaslType = "none" KafkaSASLTypePlaintext kafkaSaslType = "plaintext" KafkaSASLTypeSCRAMSHA256 kafkaSaslType = "scram_sha256" KafkaSASLTypeSCRAMSHA512 kafkaSaslType = "scram_sha512" )
supported SASL types
Variables ¶
var SHA256 scram.HashGeneratorFcn = func() hash.Hash { return sha256.New() }
SHA256 hash generator function for SCRAM conversation
var SHA512 scram.HashGeneratorFcn = func() hash.Hash { return sha512.New() }
SHA512 hash generator function for SCRAM converstaion
Functions ¶
func GetUnprocessedEventCountWithoutCheckpoint ¶
func GetUnprocessedEventCountWithoutCheckpoint(partitionInfo *eventhub.HubPartitionRuntimeInformation) int64
GetUnprocessedEventCountWithoutCheckpoint returns the number of messages on the without a checkoutpoint info
Types ¶
type GoogleApplicationCredentials ¶
type GoogleApplicationCredentials struct { Type string `json:"type"` ProjectID string `json:"project_id"` PrivateKeyID string `json:"private_key_id"` PrivateKey string `json:"private_key"` ClientEmail string `json:"client_email"` ClientID string `json:"client_id"` AuthURI string `json:"auth_uri"` TokenURI string `json:"token_uri"` AuthProviderCertURL string `json:"auth_provider_x509_cert_url"` ClientX509CertURL string `json:"client_x509_cert_url"` }
GoogleApplicationCredentials is a struct representing the format of a service account credentials file
type PushScaler ¶
type PushScaler interface { Scaler // Run is the only writer to the active channel and must close it once done. Run(ctx context.Context, active chan<- bool) }
PushScaler interface
func NewExternalPushScaler ¶
func NewExternalPushScaler(name, namespace string, metadata, resolvedEnv map[string]string) (PushScaler, error)
NewExternalPushScaler creates a new externalPushScaler push scaler
type Scaler ¶
type Scaler interface { // The scaler returns the metric values for a metric Name and criteria matching the selector GetMetrics(ctx context.Context, metricName string, metricSelector labels.Selector) ([]external_metrics.ExternalMetricValue, error) // Returns the metrics based on which this scaler determines that the ScaleTarget scales. This is used to contruct the HPA spec that is created for // this scaled object. The labels used should match the selectors used in GetMetrics GetMetricSpecForScaling() []v2beta2.MetricSpec IsActive(ctx context.Context) (bool, error) // Close any resources that need disposing when scaler is no longer used or destroyed Close() error }
Scaler interface
func NewArtemisQueueScaler ¶
NewArtemisQueueScaler creates a new artemis queue Scaler
func NewAwsCloudwatchScaler ¶
NewAwsCloudwatchScaler creates a new awsCloudwatchScaler
func NewAwsKinesisStreamScaler ¶
func NewAwsKinesisStreamScaler(resolvedEnv, metadata map[string]string, authParams map[string]string) (Scaler, error)
NewAwsKinesisStreamScaler creates a new awsKinesisStreamScaler
func NewAwsSqsQueueScaler ¶
func NewAwsSqsQueueScaler(resolvedEnv, metadata map[string]string, authParams map[string]string) (Scaler, error)
NewAwsSqsQueueScaler creates a new awsSqsQueueScaler
func NewAzureBlobScaler ¶
func NewAzureBlobScaler(resolvedEnv, metadata, authParams map[string]string, podIdentity string) (Scaler, error)
NewAzureBlobScaler creates a new azureBlobScaler
func NewAzureEventHubScaler ¶
NewAzureEventHubScaler creates a new scaler for eventHub
func NewAzureLogAnalyticsScaler ¶
func NewAzureLogAnalyticsScaler(resolvedSecrets, metadata, authParams map[string]string, podIdentity string) (Scaler, error)
NewAzureLogAnalyticsScaler creates a new Azure Log Analytics Scaler
func NewAzureMonitorScaler ¶
func NewAzureMonitorScaler(resolvedEnv, metadata, authParams map[string]string, podIdentity string) (Scaler, error)
NewAzureMonitorScaler creates a new AzureMonitorScaler
func NewAzureQueueScaler ¶
func NewAzureQueueScaler(resolvedEnv, metadata, authParams map[string]string, podIdentity string) (Scaler, error)
NewAzureQueueScaler creates a new scaler for queue
func NewAzureServiceBusScaler ¶
func NewAzureServiceBusScaler(resolvedEnv, metadata, authParams map[string]string, podIdentity string) (Scaler, error)
NewAzureServiceBusScaler creates a new AzureServiceBusScaler
func NewCronScaler ¶
NewCronScaler creates a new cronScaler
func NewExternalScaler ¶
func NewExternalScaler(name, namespace string, metadata, resolvedEnv map[string]string) (Scaler, error)
NewExternalScaler creates a new external scaler - calls the GRPC interface to create a new scaler
func NewHuaweiCloudeyeScaler ¶
NewHuaweiCloudeyeScaler creates a new huaweiCloudeyeScaler
func NewKafkaScaler ¶
NewKafkaScaler creates a new kafkaScaler
func NewLiiklusScaler ¶
NewLiiklusScaler creates a new liiklusScaler scaler
func NewMetricsAPIScaler ¶
NewMetricsAPIScaler creates a new HTTP scaler
func NewMySQLScaler ¶
NewMySQLScaler creates a new MySQL scaler
func NewPostgreSQLScaler ¶
NewPostgreSQLScaler creates a new postgreSQL scaler
func NewPrometheusScaler ¶
NewPrometheusScaler creates a new prometheusScaler
func NewPubSubScaler ¶
NewPubSubScaler creates a new pubsubScaler
func NewRabbitMQScaler ¶
NewRabbitMQScaler creates a new rabbitMQ scaler
func NewRedisScaler ¶
NewRedisScaler creates a new redisScaler
func NewRedisStreamsScaler ¶
NewRedisStreamsScaler creates a new redisStreamsScaler
type StackDriverClient ¶
type StackDriverClient struct {
// contains filtered or unexported fields
}
StackDriverClient is a generic client to fetch metrics from Stackdriver. Can be used for a stackdriver scaler in the future
func NewStackDriverClient ¶
func NewStackDriverClient(ctx context.Context, credentials string) (*StackDriverClient, error)
NewStackDriverClient creates a new stackdriver client with the credentials that are passed
func (StackDriverClient) GetMetrics ¶
GetMetrics fetches metrics from stackdriver for a specific filter for the last minute
type XDGSCRAMClient ¶
type XDGSCRAMClient struct { *scram.Client *scram.ClientConversation scram.HashGeneratorFcn }
XDGSCRAMClient struct to perform SCRAM conversation
func (*XDGSCRAMClient) Begin ¶
func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error)
Begin starts SCRAM conversation
func (*XDGSCRAMClient) Done ¶
func (x *XDGSCRAMClient) Done() bool
Done completes SCRAM conversation
Source Files ¶
- artemis_scaler.go
- aws_cloudwatch_scaler.go
- aws_iam_authorization.go
- aws_kinesis_stream_scaler.go
- aws_sqs_queue_scaler.go
- azure_blob_scaler.go
- azure_eventhub_scaler.go
- azure_log_analytics_scaler.go
- azure_monitor_scaler.go
- azure_queue_scaler.go
- azure_servicebus_scaler.go
- cron_scaler.go
- external_scaler.go
- gcp_pub_sub_scaler.go
- huawei_cloudeye_scaler.go
- kafka_scaler.go
- kafka_scram_client.go
- liiklus_scaler.go
- metrics_api_scaler.go
- mysql_scaler.go
- postgresql_scaler.go
- prometheus_scaler.go
- rabbitmq_scaler.go
- redis_scaler.go
- redis_streams_scaler.go
- scaler.go
- stackdriver_client.go
- stan_scaler.go