scalers

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2020 License: Apache-2.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KafkaSASLTypeNone        kafkaSaslType = "none"
	KafkaSASLTypePlaintext   kafkaSaslType = "plaintext"
	KafkaSASLTypeSCRAMSHA256 kafkaSaslType = "scram_sha256"
	KafkaSASLTypeSCRAMSHA512 kafkaSaslType = "scram_sha512"
)

supported SASL types

Variables

View Source
var SHA256 scram.HashGeneratorFcn = func() hash.Hash { return sha256.New() }

SHA256 hash generator function for SCRAM conversation

View Source
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

func GetValueFromResponse

func GetValueFromResponse(body []byte, valueLocation string) (int64, error)

GetValueFromResponse uses provided valueLocation to access the numeric value in provided body

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

func NewArtemisQueueScaler(resolvedSecrets, metadata, authParams map[string]string) (Scaler, error)

NewArtemisQueueScaler creates a new artemis queue Scaler

func NewAwsCloudwatchScaler

func NewAwsCloudwatchScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)

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

func NewAzureEventHubScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)

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

func NewCronScaler(resolvedEnv, metadata map[string]string) (Scaler, error)

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

func NewHuaweiCloudeyeScaler(metadata, authParams map[string]string) (Scaler, error)

NewHuaweiCloudeyeScaler creates a new huaweiCloudeyeScaler

func NewKafkaScaler

func NewKafkaScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)

NewKafkaScaler creates a new kafkaScaler

func NewLiiklusScaler

func NewLiiklusScaler(resolvedEnv map[string]string, metadata map[string]string) (Scaler, error)

NewLiiklusScaler creates a new liiklusScaler scaler

func NewMetricsAPIScaler

func NewMetricsAPIScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)

NewMetricsAPIScaler creates a new HTTP scaler

func NewMySQLScaler

func NewMySQLScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)

NewMySQLScaler creates a new MySQL scaler

func NewPostgreSQLScaler

func NewPostgreSQLScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)

NewPostgreSQLScaler creates a new postgreSQL scaler

func NewPrometheusScaler

func NewPrometheusScaler(resolvedEnv, metadata map[string]string) (Scaler, error)

NewPrometheusScaler creates a new prometheusScaler

func NewPubSubScaler

func NewPubSubScaler(resolvedEnv, metadata map[string]string) (Scaler, error)

NewPubSubScaler creates a new pubsubScaler

func NewRabbitMQScaler

func NewRabbitMQScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)

NewRabbitMQScaler creates a new rabbitMQ scaler

func NewRedisScaler

func NewRedisScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)

NewRedisScaler creates a new redisScaler

func NewRedisStreamsScaler

func NewRedisStreamsScaler(resolvedEnv, metadata, authParams map[string]string) (Scaler, error)

NewRedisStreamsScaler creates a new redisStreamsScaler

func NewStanScaler

func NewStanScaler(resolvedSecrets, metadata map[string]string) (Scaler, error)

NewStanScaler creates a new stanScaler

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

func (s StackDriverClient) GetMetrics(ctx context.Context, filter string) (int64, error)

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

func (*XDGSCRAMClient) Step

func (x *XDGSCRAMClient) Step(challenge string) (response string, err error)

Step performs step in SCRAM conversation

Directories

Path Synopsis
mocks
Package mock_liiklus is a generated GoMock package.
Package mock_liiklus is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL