scalers

package
v2.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 126 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MockExternalServerStatusOffline int32 = 0
	MockExternalServerStatusOnline  int32 = 1
)
View Source
const (
	ORG  = "org"
	ENT  = "ent"
	REPO = "repo"
)
View Source
const (
	KafkaSASLTypeNone        kafkaSaslType = "none"
	KafkaSASLTypePlaintext   kafkaSaslType = "plaintext"
	KafkaSASLTypeSCRAMSHA256 kafkaSaslType = "scram_sha256"
	KafkaSASLTypeSCRAMSHA512 kafkaSaslType = "scram_sha512"
	KafkaSASLTypeOAuthbearer kafkaSaslType = "oauthbearer"
	KafkaSASLTypeGSSAPI      kafkaSaslType = "gssapi"
)

supported SASL types

View Source
const (
	DefaultBrowserVersion string = "latest"
	DefaultPlatformName   string = "linux"
)
View Source
const (
	KafkaSASLTypeMskIam = "aws_msk_iam"
)

Variables

View Source
var (
	// ErrAwsDynamoNoTableName is returned when "tableName" is missing from the config.
	ErrAwsDynamoNoTableName = errors.New("no tableName given")

	// ErrAwsDynamoNoAwsRegion is returned when "awsRegion" is missing from the config.
	ErrAwsDynamoNoAwsRegion = errors.New("no awsRegion given")

	// ErrAwsDynamoNoKeyConditionExpression is returned when "keyConditionExpression" is missing from the config.
	ErrAwsDynamoNoKeyConditionExpression = errors.New("no keyConditionExpression given")

	// ErrAwsDynamoEmptyExpressionAttributeNames is returned when "expressionAttributeNames" is empty.
	ErrAwsDynamoEmptyExpressionAttributeNames = errors.New("empty map")

	// ErrAwsDynamoInvalidExpressionAttributeNames is returned when "expressionAttributeNames" is an invalid JSON.
	ErrAwsDynamoInvalidExpressionAttributeNames = errors.New("invalid expressionAttributeNames")

	// ErrAwsDynamoNoExpressionAttributeNames is returned when "expressionAttributeNames" is missing from the config.
	ErrAwsDynamoNoExpressionAttributeNames = errors.New("no expressionAttributeNames given")

	// ErrAwsDynamoInvalidExpressionAttributeValues is returned when "expressionAttributeNames" is missing an invalid JSON.
	ErrAwsDynamoInvalidExpressionAttributeValues = errors.New("invalid expressionAttributeValues")

	// ErrAwsDynamoNoExpressionAttributeValues is returned when "expressionAttributeValues" is missing from the config.
	ErrAwsDynamoNoExpressionAttributeValues = errors.New("no expressionAttributeValues given")

	// ErrAwsDynamoNoTargetValue is returned when "targetValue" is missing from the config.
	ErrAwsDynamoNoTargetValue = errors.New("no targetValue given")
)
View Source
var (
	// ErrElasticsearchMissingAddressesOrCloudConfig is returned when endpoint addresses or cloud config is missing.
	ErrElasticsearchMissingAddressesOrCloudConfig = errors.New("must provide either endpoint addresses or cloud config")

	// ErrElasticsearchConfigConflict is returned when both endpoint addresses and cloud config are provided.
	ErrElasticsearchConfigConflict = errors.New("can't provide endpoint addresses and cloud config at the same time")
)
View Source
var (
	MockExternalServerStatus       = MockExternalServerStatusOnline
	ErrMock                        = errors.New("mock error")
	MockMetricName                 = "mockMetricName"
	MockMetricTarget         int64 = 50
	MockMetricValue          int64 = 100
)
View Source
var (
	// ErrLiiklusNoTopic is returned when "topic" in the config is empty.
	ErrLiiklusNoTopic = errors.New("no topic provided")

	// ErrLiiklusNoAddress is returned when "address" in the config is empty.
	ErrLiiklusNoAddress = errors.New("no liiklus API address provided")

	// ErrLiiklusNoGroup is returned when "group" in the config is empty.
	ErrLiiklusNoGroup = errors.New("no consumer group provided")
)
View Source
var (
	// ErrMsSQLNoQuery is returned when "query" is missing from the config.
	ErrMsSQLNoQuery = errors.New("no query given")

	// ErrMsSQLNoTargetValue is returned when "targetValue" is missing from the config.
	ErrMsSQLNoTargetValue = errors.New("no targetValue given")
)
View Source
var (
	// ErrRedisNoListName is returned when "listName" is missing from the config.
	ErrRedisNoListName = errors.New("no list name given")

	// ErrRedisNoAddresses is returned when the "addresses" in the connection info is empty.
	ErrRedisNoAddresses = errors.New("no addresses or hosts given. address should be a comma separated list of host:port or set the host/port values")

	// ErrRedisUnequalHostsAndPorts is returned when the number of hosts and ports are unequal.
	ErrRedisUnequalHostsAndPorts = errors.New("not enough hosts or ports given. number of hosts should be equal to the number of ports")
)
View Source
var (
	// ErrScalerUnsupportedUtilizationMetricType is returned when v2.UtilizationMetricType
	// is provided as the metric target type for scaler.
	ErrScalerUnsupportedUtilizationMetricType = errors.New("'Utilization' metric type is unsupported for external metrics, allowed values are 'Value' or 'AverageValue'")

	// ErrScalerConfigMissingField is returned when a required field is missing from the scaler config.
	ErrScalerConfigMissingField = errors.New("missing required field in scaler config")
)
View Source
var (
	// ErrRedisMissingStreamName is returned when "stream" is missing.
	ErrRedisMissingStreamName = errors.New("missing redis stream name")
)

Functions

func AvgFloatFromSlice added in v2.8.2

func AvgFloatFromSlice(results []float64) float64

AvgFloatFromSlice finds the average value in a slice of floats

func GenerateMetricInMili added in v2.8.0

func GenerateMetricInMili(metricName string, value float64) external_metrics.ExternalMetricValue

GenerateMetricInMili returns a externalMetricValue with mili as metric scale

func GenerateMetricNameWithIndex added in v2.5.0

func GenerateMetricNameWithIndex(triggerIndex int, metricName string) string

GenerateMetricNameWithIndex helps to add the index prefix to the metric name

func GetFromAuthOrMeta added in v2.5.0

func GetFromAuthOrMeta(config *scalersconfig.ScalerConfig, field string) (string, error)

GetFromAuthOrMeta helps to get a field from Auth or Meta sections

func GetMetricTarget added in v2.7.0

func GetMetricTarget(metricType v2.MetricTargetType, metricValue int64) v2.MetricTarget

GetMetricTarget returns a metric target for a valid given metric target type (Value or AverageValue) and value

func GetMetricTargetMili added in v2.8.0

func GetMetricTargetMili(metricType v2.MetricTargetType, metricValue float64) v2.MetricTarget

GetMetricTargetMili returns a metric target for a valid given metric target type (Value or AverageValue) and value in mili scale

func GetMetricTargetType added in v2.7.0

func GetMetricTargetType(config *scalersconfig.ScalerConfig) (v2.MetricTargetType, error)

GetMetricTargetType helps get the metric target type of the scaler

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) (float64, error)

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

func InitializeLogger added in v2.8.0

func InitializeLogger(config *scalersconfig.ScalerConfig, scalerName string) logr.Logger

func MaxFloatFromSlice added in v2.8.2

func MaxFloatFromSlice(results []float64) float64

MaxFloatFromSlice finds the largest value in a slice of floats

func RemoveIndexFromMetricName added in v2.7.0

func RemoveIndexFromMetricName(triggerIndex int, metricName string) (string, error)

RemoveIndexFromMetricName removes the index prefix from the metric name

Types

type CassandraMetadata added in v2.5.0

type CassandraMetadata struct {
	// contains filtered or unexported fields
}

CassandraMetadata defines metadata used by KEDA to query a Cassandra table.

type CommandResponse

type CommandResponse struct {
	CommandResponse []Response `json:"commandResponse"`
}

CommandResponse Full structured response from MQ admin REST query

type DynamodbStreamWrapperClient added in v2.12.0

type DynamodbStreamWrapperClient interface {
	DescribeStream(ctx context.Context, params *dynamodbstreams.DescribeStreamInput, optFns ...func(*dynamodbstreams.Options)) (*dynamodbstreams.DescribeStreamOutput, error)
}

type IBMMQMetadata

type IBMMQMetadata struct {
	// contains filtered or unexported fields
}

IBMMQMetadata Metadata used by KEDA to query IBM MQ queue depth and scale

type IBMMQScaler

type IBMMQScaler struct {
	// contains filtered or unexported fields
}

IBMMQScaler assigns struct data pointer to metadata variable

func (*IBMMQScaler) Close

func (s *IBMMQScaler) Close(context.Context) error

Close closes and returns nil

func (*IBMMQScaler) GetMetricSpecForScaling

func (s *IBMMQScaler) GetMetricSpecForScaling(context.Context) []v2.MetricSpec

GetMetricSpecForScaling returns the MetricSpec for the Horizontal Pod Autoscaler

func (*IBMMQScaler) GetMetricsAndActivity added in v2.9.0

func (s *IBMMQScaler) GetMetricsAndActivity(ctx context.Context, metricName string) ([]external_metrics.ExternalMetricValue, bool, error)

GetMetricsAndActivity returns value for a supported metric and an error if there is a problem getting the metric

type Job added in v2.10.0

type Job struct {
	ID          int       `json:"id"`
	RunID       int       `json:"run_id"`
	RunURL      string    `json:"run_url"`
	NodeID      string    `json:"node_id"`
	HeadSha     string    `json:"head_sha"`
	URL         string    `json:"url"`
	HTMLURL     string    `json:"html_url"`
	Status      string    `json:"status"`
	Conclusion  string    `json:"conclusion"`
	StartedAt   time.Time `json:"started_at"`
	CompletedAt time.Time `json:"completed_at"`
	Name        string    `json:"name"`
	Steps       []struct {
		Name        string    `json:"name"`
		Status      string    `json:"status"`
		Conclusion  string    `json:"conclusion"`
		Number      int       `json:"number"`
		StartedAt   time.Time `json:"started_at"`
		CompletedAt time.Time `json:"completed_at"`
	} `json:"steps"`
	CheckRunURL     string   `json:"check_run_url"`
	Labels          []string `json:"labels"`
	RunnerID        int      `json:"runner_id"`
	RunnerName      string   `json:"runner_name"`
	RunnerGroupID   int      `json:"runner_group_id"`
	RunnerGroupName string   `json:"runner_group_name"`
	WorkflowName    string   `json:"workflow_name"`
	HeadBranch      string   `json:"head_branch"`
}

type JobRequest added in v2.9.0

type JobRequest struct {
	RequestID     int       `json:"requestId"`
	QueueTime     time.Time `json:"queueTime"`
	AssignTime    time.Time `json:"assignTime,omitempty"`
	ReceiveTime   time.Time `json:"receiveTime,omitempty"`
	LockedUntil   time.Time `json:"lockedUntil,omitempty"`
	ServiceOwner  string    `json:"serviceOwner"`
	HostID        string    `json:"hostId"`
	Result        *string   `json:"result"`
	ScopeID       string    `json:"scopeId"`
	PlanType      string    `json:"planType"`
	PlanID        string    `json:"planId"`
	JobID         string    `json:"jobId"`
	Demands       []string  `json:"demands"`
	ReservedAgent *struct {
		Links struct {
			Self struct {
				Href string `json:"href"`
			} `json:"self"`
			Web struct {
				Href string `json:"href"`
			} `json:"web"`
		} `json:"_links"`
		ID                int    `json:"id"`
		Name              string `json:"name"`
		Version           string `json:"version"`
		OsDescription     string `json:"osDescription"`
		Enabled           bool   `json:"enabled"`
		Status            string `json:"status"`
		ProvisioningState string `json:"provisioningState"`
		AccessPoint       string `json:"accessPoint"`
	} `json:"reservedAgent,omitempty"`
	Definition struct {
		Links struct {
			Web struct {
				Href string `json:"href"`
			} `json:"web"`
			Self struct {
				Href string `json:"href"`
			} `json:"self"`
		} `json:"_links"`
		ID   int    `json:"id"`
		Name string `json:"name"`
	} `json:"definition"`
	Owner struct {
		Links struct {
			Web struct {
				Href string `json:"href"`
			} `json:"web"`
			Self struct {
				Href string `json:"href"`
			} `json:"self"`
		} `json:"_links"`
		ID   int    `json:"id"`
		Name string `json:"name"`
	} `json:"owner"`
	Data struct {
		ParallelismTag string `json:"ParallelismTag"`
		IsScheduledKey string `json:"IsScheduledKey"`
	} `json:"data"`
	PoolID          int    `json:"poolId"`
	OrchestrationID string `json:"orchestrationId"`
	Priority        int    `json:"priority"`
	MatchedAgents   *[]struct {
		Links struct {
			Self struct {
				Href string `json:"href"`
			} `json:"self"`
			Web struct {
				Href string `json:"href"`
			} `json:"web"`
		} `json:"_links"`
		ID                int    `json:"id"`
		Name              string `json:"name"`
		Version           string `json:"version"`
		Enabled           bool   `json:"enabled"`
		Status            string `json:"status"`
		ProvisioningState string `json:"provisioningState"`
	} `json:"matchedAgents,omitempty"`
}

type JobRequests added in v2.9.0

type JobRequests struct {
	Count int          `json:"count"`
	Value []JobRequest `json:"value"`
}

type Jobs added in v2.10.0

type Jobs struct {
	TotalCount int   `json:"total_count"`
	Jobs       []Job `json:"jobs"`
}

type KinesisWrapperClient added in v2.12.0

type KinesisWrapperClient interface {
	DescribeStreamSummary(context.Context, *kinesis.DescribeStreamSummaryInput, ...func(*kinesis.Options)) (*kinesis.DescribeStreamSummaryOutput, error)
}

type Parameters

type Parameters struct {
	Curdepth int `json:"curdepth"`
}

Parameters Contains the current depth of the IBM MQ Queue

type PredictKubeScaler added in v2.6.0

type PredictKubeScaler struct {
	// contains filtered or unexported fields
}

func NewPredictKubeScaler added in v2.6.0

func NewPredictKubeScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (*PredictKubeScaler, error)

NewPredictKubeScaler creates a new PredictKube scaler

func (*PredictKubeScaler) Close added in v2.6.0

func (s *PredictKubeScaler) Close(_ context.Context) error

func (*PredictKubeScaler) GetMetricSpecForScaling added in v2.6.0

func (s *PredictKubeScaler) GetMetricSpecForScaling(context.Context) []v2.MetricSpec

func (*PredictKubeScaler) GetMetricsAndActivity added in v2.9.0

func (s *PredictKubeScaler) GetMetricsAndActivity(ctx context.Context, metricName string) ([]external_metrics.ExternalMetricValue, bool, error)

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(config *scalersconfig.ScalerConfig) (PushScaler, error)

NewExternalPushScaler creates a new externalPushScaler push scaler

type Repo added in v2.10.0

type Repo struct {
	ID       int    `json:"id"`
	NodeID   string `json:"node_id"`
	Name     string `json:"name"`
	FullName string `json:"full_name"`
	Owner    struct {
		Login             string `json:"login"`
		ID                int    `json:"id"`
		NodeID            string `json:"node_id"`
		AvatarURL         string `json:"avatar_url"`
		GravatarID        string `json:"gravatar_id"`
		URL               string `json:"url"`
		HTMLURL           string `json:"html_url"`
		FollowersURL      string `json:"followers_url"`
		FollowingURL      string `json:"following_url"`
		GistsURL          string `json:"gists_url"`
		StarredURL        string `json:"starred_url"`
		SubscriptionsURL  string `json:"subscriptions_url"`
		OrganizationsURL  string `json:"organizations_url"`
		ReposURL          string `json:"repos_url"`
		EventsURL         string `json:"events_url"`
		ReceivedEventsURL string `json:"received_events_url"`
		Type              string `json:"type"`
		SiteAdmin         bool   `json:"site_admin"`
	} `json:"owner"`
	Private          bool        `json:"private"`
	HTMLURL          string      `json:"html_url"`
	Description      string      `json:"description"`
	Fork             bool        `json:"fork"`
	URL              string      `json:"url"`
	ArchiveURL       string      `json:"archive_url"`
	AssigneesURL     string      `json:"assignees_url"`
	BlobsURL         string      `json:"blobs_url"`
	BranchesURL      string      `json:"branches_url"`
	CollaboratorsURL string      `json:"collaborators_url"`
	CommentsURL      string      `json:"comments_url"`
	CommitsURL       string      `json:"commits_url"`
	CompareURL       string      `json:"compare_url"`
	ContentsURL      string      `json:"contents_url"`
	ContributorsURL  string      `json:"contributors_url"`
	DeploymentsURL   string      `json:"deployments_url"`
	DownloadsURL     string      `json:"downloads_url"`
	EventsURL        string      `json:"events_url"`
	ForksURL         string      `json:"forks_url"`
	GitCommitsURL    string      `json:"git_commits_url"`
	GitRefsURL       string      `json:"git_refs_url"`
	GitTagsURL       string      `json:"git_tags_url"`
	GitURL           string      `json:"git_url"`
	IssueCommentURL  string      `json:"issue_comment_url"`
	IssueEventsURL   string      `json:"issue_events_url"`
	IssuesURL        string      `json:"issues_url"`
	KeysURL          string      `json:"keys_url"`
	LabelsURL        string      `json:"labels_url"`
	LanguagesURL     string      `json:"languages_url"`
	MergesURL        string      `json:"merges_url"`
	MilestonesURL    string      `json:"milestones_url"`
	NotificationsURL string      `json:"notifications_url"`
	PullsURL         string      `json:"pulls_url"`
	ReleasesURL      string      `json:"releases_url"`
	SSHURL           string      `json:"ssh_url"`
	StargazersURL    string      `json:"stargazers_url"`
	StatusesURL      string      `json:"statuses_url"`
	SubscribersURL   string      `json:"subscribers_url"`
	SubscriptionURL  string      `json:"subscription_url"`
	TagsURL          string      `json:"tags_url"`
	TeamsURL         string      `json:"teams_url"`
	TreesURL         string      `json:"trees_url"`
	CloneURL         string      `json:"clone_url"`
	MirrorURL        string      `json:"mirror_url"`
	HooksURL         string      `json:"hooks_url"`
	SvnURL           string      `json:"svn_url"`
	Homepage         string      `json:"homepage"`
	Language         interface{} `json:"language"`
	ForksCount       int         `json:"forks_count"`
	StargazersCount  int         `json:"stargazers_count"`
	WatchersCount    int         `json:"watchers_count"`
	Size             int         `json:"size"`
	DefaultBranch    string      `json:"default_branch"`
	OpenIssuesCount  int         `json:"open_issues_count"`
	IsTemplate       bool        `json:"is_template"`
	Topics           []string    `json:"topics"`
	HasIssues        bool        `json:"has_issues"`
	HasProjects      bool        `json:"has_projects"`
	HasWiki          bool        `json:"has_wiki"`
	HasPages         bool        `json:"has_pages"`
	HasDownloads     bool        `json:"has_downloads"`
	Archived         bool        `json:"archived"`
	Disabled         bool        `json:"disabled"`
	Visibility       string      `json:"visibility"`
	PushedAt         time.Time   `json:"pushed_at"`
	CreatedAt        time.Time   `json:"created_at"`
	UpdatedAt        time.Time   `json:"updated_at"`
	Permissions      struct {
		Admin bool `json:"admin"`
		Push  bool `json:"push"`
		Pull  bool `json:"pull"`
	} `json:"permissions"`
	AllowRebaseMerge    bool        `json:"allow_rebase_merge"`
	TemplateRepository  interface{} `json:"template_repository"`
	TempCloneToken      string      `json:"temp_clone_token"`
	AllowSquashMerge    bool        `json:"allow_squash_merge"`
	AllowAutoMerge      bool        `json:"allow_auto_merge"`
	DeleteBranchOnMerge bool        `json:"delete_branch_on_merge"`
	AllowMergeCommit    bool        `json:"allow_merge_commit"`
	SubscribersCount    int         `json:"subscribers_count"`
	NetworkCount        int         `json:"network_count"`
	License             struct {
		Key     string `json:"key"`
		Name    string `json:"name"`
		URL     string `json:"url"`
		SpdxID  string `json:"spdx_id"`
		NodeID  string `json:"node_id"`
		HTMLURL string `json:"html_url"`
	} `json:"license"`
	Forks      int `json:"forks"`
	OpenIssues int `json:"open_issues"`
	Watchers   int `json:"watchers"`
}

type Repos added in v2.10.0

type Repos struct {
	Repo []Repo
}

type Res added in v2.9.0

type Res struct {
	ID       string `json:"_id"`
	Feet     int    `json:"feet"`
	Greeting string `json:"greeting"`
}

type Response

type Response struct {
	Parameters Parameters `json:"parameters"`
}

Response The body of the response returned from the MQ admin query

type Scaler

type Scaler interface {
	// GetMetricsAndActivity returns the metric values and activity for a metric Name
	GetMetricsAndActivity(ctx context.Context, metricName string) ([]external_metrics.ExternalMetricValue, bool, error)

	// GetMetricSpecForScaling returns the metrics based on which this scaler determines that the ScaleTarget scales. This is used to construct the HPA spec that is created for
	// this scaled object. The labels used should match the selectors used in GetMetrics
	GetMetricSpecForScaling(ctx context.Context) []v2.MetricSpec

	// Close any resources that need disposing when scaler is no longer used or destroyed
	Close(ctx context.Context) error
}

Scaler interface

func NewActiveMQScaler added in v2.6.0

func NewActiveMQScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewActiveMQScaler creates a new activeMQ Scaler

func NewApacheKafkaScaler added in v2.12.0

func NewApacheKafkaScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewApacheKafkaScaler creates a new apacheKafkaScaler

func NewArangoDBScaler added in v2.10.0

func NewArangoDBScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewArangoDBScaler creates a new arangodbScaler

func NewArtemisQueueScaler

func NewArtemisQueueScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewArtemisQueueScaler creates a new artemis queue Scaler

func NewAwsCloudwatchScaler

func NewAwsCloudwatchScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewAwsCloudwatchScaler creates a new awsCloudwatchScaler

func NewAwsDynamoDBScaler added in v2.7.0

func NewAwsDynamoDBScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

func NewAwsDynamoDBStreamsScaler added in v2.8.0

func NewAwsDynamoDBStreamsScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewAwsDynamoDBStreamsScaler creates a new awsDynamoDBStreamsScaler

func NewAwsKinesisStreamScaler

func NewAwsKinesisStreamScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewAwsKinesisStreamScaler creates a new awsKinesisStreamScaler

func NewAwsSqsQueueScaler

func NewAwsSqsQueueScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewAwsSqsQueueScaler creates a new awsSqsQueueScaler

func NewAzureAppInsightsScaler added in v2.6.0

func NewAzureAppInsightsScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewAzureAppInsightsScaler creates a new AzureAppInsightsScaler

func NewAzureBlobScaler

func NewAzureBlobScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewAzureBlobScaler creates a new azureBlobScaler

func NewAzureDataExplorerScaler added in v2.7.0

func NewAzureDataExplorerScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

func NewAzureEventHubScaler

func NewAzureEventHubScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewAzureEventHubScaler creates a new scaler for eventHub

func NewAzureLogAnalyticsScaler

func NewAzureLogAnalyticsScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewAzureLogAnalyticsScaler creates a new Azure Log Analytics Scaler

func NewAzureMonitorScaler

func NewAzureMonitorScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewAzureMonitorScaler creates a new AzureMonitorScaler

func NewAzurePipelinesScaler added in v2.3.0

func NewAzurePipelinesScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewAzurePipelinesScaler creates a new AzurePipelinesScaler

func NewAzureQueueScaler

func NewAzureQueueScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewAzureQueueScaler creates a new scaler for queue

func NewAzureServiceBusScaler

func NewAzureServiceBusScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewAzureServiceBusScaler creates a new AzureServiceBusScaler

func NewCPUMemoryScaler

func NewCPUMemoryScaler(resourceName v1.ResourceName, config *scalersconfig.ScalerConfig) (Scaler, error)

NewCPUMemoryScaler creates a new cpuMemoryScaler

func NewCassandraScaler added in v2.5.0

func NewCassandraScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewCassandraScaler creates a new Cassandra scaler.

func NewCouchDBScaler added in v2.9.0

func NewCouchDBScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

func NewCronScaler

func NewCronScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewCronScaler creates a new cronScaler

func NewDatadogScaler added in v2.6.0

func NewDatadogScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewDatadogScaler creates a new Datadog scaler

func NewElasticsearchScaler added in v2.5.0

func NewElasticsearchScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewElasticsearchScaler creates a new elasticsearch scaler

func NewEtcdScaler added in v2.9.0

func NewEtcdScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewEtcdScaler creates a new etcdScaler

func NewExternalMockScaler added in v2.8.0

func NewExternalMockScaler(_ *scalersconfig.ScalerConfig) (Scaler, error)

func NewExternalScaler

func NewExternalScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewExternalScaler creates a new external scaler - calls the GRPC interface to create a new scaler

func NewGcpCloudTasksScaler added in v2.12.0

func NewGcpCloudTasksScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewGcpCloudTasksScaler creates a new cloudTaskScaler

func NewGcsScaler added in v2.7.0

func NewGcsScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewGcsScaler creates a new gcsScaler

func NewGitHubRunnerScaler added in v2.10.0

func NewGitHubRunnerScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewGitHubRunnerScaler creates a new GitHub Runner Scaler

func NewGraphiteScaler added in v2.5.0

func NewGraphiteScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewGraphiteScaler creates a new graphiteScaler

func NewHuaweiCloudeyeScaler

func NewHuaweiCloudeyeScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewHuaweiCloudeyeScaler creates a new huaweiCloudeyeScaler

func NewIBMMQScaler

func NewIBMMQScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewIBMMQScaler creates a new IBM MQ scaler

func NewInfluxDBScaler

func NewInfluxDBScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewInfluxDBScaler creates a new influx db scaler

func NewKafkaScaler

func NewKafkaScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewKafkaScaler creates a new kafkaScaler

func NewKubernetesWorkloadScaler added in v2.4.0

func NewKubernetesWorkloadScaler(kubeClient client.Client, config *scalersconfig.ScalerConfig) (Scaler, error)

NewKubernetesWorkloadScaler creates a new kubernetesWorkloadScaler

func NewLiiklusScaler

func NewLiiklusScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewLiiklusScaler creates a new liiklusScaler scaler

func NewLokiScaler added in v2.9.0

func NewLokiScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewLokiScaler returns a new lokiScaler

func NewMSSQLScaler added in v2.2.0

func NewMSSQLScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewMSSQLScaler creates a new mssql scaler

func NewMetricsAPIScaler

func NewMetricsAPIScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewMetricsAPIScaler creates a new HTTP scaler

func NewMongoDBScaler

func NewMongoDBScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewMongoDBScaler creates a new mongoDB scaler

func NewMySQLScaler

func NewMySQLScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewMySQLScaler creates a new MySQL scaler

func NewNATSJetStreamScaler added in v2.8.0

func NewNATSJetStreamScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

func NewNewRelicScaler added in v2.6.0

func NewNewRelicScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

func NewOpenstackMetricScaler added in v2.3.0

func NewOpenstackMetricScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewOpenstackMetricScaler creates new openstack metrics scaler instance

func NewOpenstackSwiftScaler

func NewOpenstackSwiftScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewOpenstackSwiftScaler creates a new OpenStack Swift scaler

func NewPostgreSQLScaler

func NewPostgreSQLScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewPostgreSQLScaler creates a new postgreSQL scaler

func NewPrometheusScaler

func NewPrometheusScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewPrometheusScaler creates a new prometheusScaler

func NewPubSubScaler

func NewPubSubScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewPubSubScaler creates a new pubsubScaler

func NewPulsarScaler added in v2.8.0

func NewPulsarScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewPulsarScaler creates a new PulsarScaler

func NewRabbitMQScaler

func NewRabbitMQScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewRabbitMQScaler creates a new rabbitMQ scaler

func NewRedisScaler

func NewRedisScaler(ctx context.Context, isClustered, isSentinel bool, config *scalersconfig.ScalerConfig) (Scaler, error)

NewRedisScaler creates a new redisScaler

func NewRedisStreamsScaler

func NewRedisStreamsScaler(ctx context.Context, isClustered, isSentinel bool, config *scalersconfig.ScalerConfig) (Scaler, error)

NewRedisStreamsScaler creates a new redisStreamsScaler

func NewSeleniumGridScaler added in v2.4.0

func NewSeleniumGridScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

func NewSolaceScaler added in v2.4.0

func NewSolaceScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewSolaceScaler is the constructor for SolaceScaler

func NewSolrScaler added in v2.11.0

func NewSolrScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewSolrScaler creates a new solr Scaler

func NewStackdriverScaler added in v2.7.0

func NewStackdriverScaler(ctx context.Context, config *scalersconfig.ScalerConfig) (Scaler, error)

NewStackdriverScaler creates a new stackdriverScaler

func NewStanScaler

func NewStanScaler(config *scalersconfig.ScalerConfig) (Scaler, error)

NewStanScaler creates a new stanScaler

type SolaceMetadata added in v2.4.0

type SolaceMetadata struct {
	// contains filtered or unexported fields
}

type SolaceMetricValues added in v2.4.0

type SolaceMetricValues struct {
	// contains filtered or unexported fields
}

SolaceMetricValues is the struct for Observed Metric Values

type SolaceScaler added in v2.4.0

type SolaceScaler struct {
	// contains filtered or unexported fields
}

func (*SolaceScaler) Close added in v2.4.0

func (s *SolaceScaler) Close(context.Context) error

Do Nothing - Satisfies Interface

func (*SolaceScaler) GetMetricSpecForScaling added in v2.4.0

func (s *SolaceScaler) GetMetricSpecForScaling(context.Context) []v2.MetricSpec

INTERFACE METHOD DEFINE METRIC FOR SCALING CURRENT SUPPORTED METRICS ARE: - QUEUE MESSAGE COUNT (msgCount) - QUEUE SPOOL USAGE (msgSpoolUsage in MBytes) METRIC IDENTIFIER HAS THE SIGNATURE: - solace-[Queue_Name]-[metric_type] e.g. solace-QUEUE1-msgCount

func (*SolaceScaler) GetMetricsAndActivity added in v2.9.0

func (s *SolaceScaler) GetMetricsAndActivity(ctx context.Context, metricName string) ([]external_metrics.ExternalMetricValue, bool, error)

INTERFACE METHOD Call SEMP API to retrieve metrics returns value for named metric returns true if queue messageCount > 0 || msgSpoolUsage > 0

type SqsWrapperClient added in v2.12.0

type SqsWrapperClient interface {
	GetQueueAttributes(ctx context.Context, params *sqs.GetQueueAttributesInput, optFns ...func(*sqs.Options)) (*sqs.GetQueueAttributesOutput, error)
}

type WorkflowRun added in v2.10.0

type WorkflowRun struct {
	ID               int64   `json:"id"`
	Name             string  `json:"name"`
	NodeID           string  `json:"node_id"`
	HeadBranch       string  `json:"head_branch"`
	HeadSha          string  `json:"head_sha"`
	Path             string  `json:"path"`
	DisplayTitle     string  `json:"display_title"`
	RunNumber        int     `json:"run_number"`
	Event            string  `json:"event"`
	Status           string  `json:"status"`
	Conclusion       *string `json:"conclusion"`
	WorkflowID       int     `json:"workflow_id"`
	CheckSuiteID     int64   `json:"check_suite_id"`
	CheckSuiteNodeID string  `json:"check_suite_node_id"`
	URL              string  `json:"url"`
	HTMLURL          string  `json:"html_url"`
	PullRequests     []struct {
		URL    string `json:"url"`
		ID     int    `json:"id"`
		Number int    `json:"number"`
		Head   struct {
			Ref  string `json:"ref"`
			Sha  string `json:"sha"`
			Repo struct {
				ID   int    `json:"id"`
				URL  string `json:"url"`
				Name string `json:"name"`
			} `json:"repo"`
		} `json:"head"`
		Base struct {
			Ref  string `json:"ref"`
			Sha  string `json:"sha"`
			Repo struct {
				ID   int    `json:"id"`
				URL  string `json:"url"`
				Name string `json:"name"`
			} `json:"repo"`
		} `json:"base"`
	} `json:"pull_requests"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Actor     struct {
		Login             string `json:"login"`
		ID                int    `json:"id"`
		NodeID            string `json:"node_id"`
		AvatarURL         string `json:"avatar_url"`
		GravatarID        string `json:"gravatar_id"`
		URL               string `json:"url"`
		HTMLURL           string `json:"html_url"`
		FollowersURL      string `json:"followers_url"`
		FollowingURL      string `json:"following_url"`
		GistsURL          string `json:"gists_url"`
		StarredURL        string `json:"starred_url"`
		SubscriptionsURL  string `json:"subscriptions_url"`
		OrganizationsURL  string `json:"organizations_url"`
		ReposURL          string `json:"repos_url"`
		EventsURL         string `json:"events_url"`
		ReceivedEventsURL string `json:"received_events_url"`
		Type              string `json:"type"`
		SiteAdmin         bool   `json:"site_admin"`
	} `json:"actor"`
	RunAttempt          int           `json:"run_attempt"`
	ReferencedWorkflows []interface{} `json:"referenced_workflows"`
	RunStartedAt        time.Time     `json:"run_started_at"`
	TriggeringActor     struct {
		Login             string `json:"login"`
		ID                int    `json:"id"`
		NodeID            string `json:"node_id"`
		AvatarURL         string `json:"avatar_url"`
		GravatarID        string `json:"gravatar_id"`
		URL               string `json:"url"`
		HTMLURL           string `json:"html_url"`
		FollowersURL      string `json:"followers_url"`
		FollowingURL      string `json:"following_url"`
		GistsURL          string `json:"gists_url"`
		StarredURL        string `json:"starred_url"`
		SubscriptionsURL  string `json:"subscriptions_url"`
		OrganizationsURL  string `json:"organizations_url"`
		ReposURL          string `json:"repos_url"`
		EventsURL         string `json:"events_url"`
		ReceivedEventsURL string `json:"received_events_url"`
		Type              string `json:"type"`
		SiteAdmin         bool   `json:"site_admin"`
	} `json:"triggering_actor"`
	JobsURL            string  `json:"jobs_url"`
	LogsURL            string  `json:"logs_url"`
	CheckSuiteURL      string  `json:"check_suite_url"`
	ArtifactsURL       string  `json:"artifacts_url"`
	CancelURL          string  `json:"cancel_url"`
	RerunURL           string  `json:"rerun_url"`
	PreviousAttemptURL *string `json:"previous_attempt_url"`
	WorkflowURL        string  `json:"workflow_url"`
	HeadCommit         struct {
		ID        string    `json:"id"`
		TreeID    string    `json:"tree_id"`
		Message   string    `json:"message"`
		Timestamp time.Time `json:"timestamp"`
		Author    struct {
			Name  string `json:"name"`
			Email string `json:"email"`
		} `json:"author"`
		Committer struct {
			Name  string `json:"name"`
			Email string `json:"email"`
		} `json:"committer"`
	} `json:"head_commit"`
	Repository     Repo `json:"repository"`
	HeadRepository Repo `json:"head_repository"`
}

type WorkflowRuns added in v2.10.0

type WorkflowRuns struct {
	TotalCount   int           `json:"total_count"`
	WorkflowRuns []WorkflowRun `json:"workflow_runs"`
}

Directories

Path Synopsis
This file contains all the logic for caching aws.Config across all the (AWS) triggers.
This file contains all the logic for caching aws.Config across all the (AWS) triggers.
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