scalers

package
v2.20.2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 161 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 (
	KafkaSASLOAuthTokenProviderBearer    kafkaSaslOAuthTokenProvider = "bearer"
	KafkaSASLOAuthTokenProviderAWSMSKIAM kafkaSaslOAuthTokenProvider = "aws_msk_iam"
)

supported SASL OAuth token provider types

View Source
const EnableManagedDownloadsCapability = "se:downloadsEnabled"
View Source
const (
	KafkaSASLTypeMskIam = "aws_msk_iam"
)

Variables

View Source
var (
	ErrAwsDynamoNoTargetValue = errors.New("no targetValue 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")
	// ErrAwsDynamoInvalidExpressionAttributeNames is returned when "expressionAttributeNames" is an invalid JSON.
	ErrAwsDynamoInvalidExpressionAttributeNames = errors.New("invalid expressionAttributeNames")
	// ErrAwsDynamoEmptyExpressionAttributeNames is returned when "expressionAttributeNames" is empty.
	ErrAwsDynamoEmptyExpressionAttributeNames = errors.New("empty map")
	// ErrAwsDynamoNoExpressionAttributeNames is returned when "expressionAttributeNames" is missing from the config.
	ErrAwsDynamoNoExpressionAttributeNames = errors.New("no expressionAttributeNames given")
)
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 (
	// 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")

	// ErrRedisParse is returned when "listName" is missing from the config.
	ErrRedisParse = errors.New("error parsing redis metadata")
)
View Source
var (
	// ErrRedisMissingStreamName is returned when "stream" is missing.
	ErrRedisMissingStreamName = errors.New("missing redis stream name")

	// ErrRedisStreamParse is returned when missing parameters or parsing parameters error.
	ErrRedisStreamParse = errors.New("error parsing redis stream metadata")
)
View Source
var (
	Windows      = Platform{"windows", nil}
	XP           = Platform{"Windows XP", &Windows}
	Vista        = Platform{"Windows Vista", &Windows}
	Win7         = Platform{"Windows 7", &Windows}
	Win8         = Platform{"Windows 8", &Windows}
	Win8_1       = Platform{"Windows 8.1", &Windows}
	Win10        = Platform{"Windows 10", &Windows}
	Win11        = Platform{"Windows 11", &Windows}
	Mac          = Platform{"mac", nil}
	SnowLeopard  = Platform{"OS X 10.6", &Mac}
	MountainLion = Platform{"OS X 10.8", &Mac}
	Mavericks    = Platform{"OS X 10.9", &Mac}
	Yosemite     = Platform{"OS X 10.10", &Mac}
	ElCapitan    = Platform{"OS X 10.11", &Mac}
	Sierra       = Platform{"macOS 10.12", &Mac}
	HighSierra   = Platform{"macOS 10.13", &Mac}
	Mojave       = Platform{"macOS 10.14", &Mac}
	Catalina     = Platform{"macOS 10.15", &Mac}
	BigSur       = Platform{"macOS 11.0", &Mac}
	Monterey     = Platform{"macOS 12.0", &Mac}
	Ventura      = Platform{"macOS 13.0", &Mac}
	Sonoma       = Platform{"macOS 14.0", &Mac}
	Sequoia      = Platform{"macOS 15.0", &Mac}
	Unix         = Platform{"unix", nil}
	Linux        = Platform{"linux", &Unix}
	Bsd          = Platform{"bsd", &Unix}
	Solaris      = Platform{"solaris", &Unix}
	Android      = Platform{"android", nil}
	IOS          = Platform{"iOS", nil}
	Any          = Platform{"any", nil}
)

Mapping of platform name enum used in the Selenium Grid core https://github.com/SeleniumHQ/selenium/blob/trunk/java/src/org/openqa/selenium/Platform.java

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'")
)
View Source
var ExtensionCapabilitiesPrefixes = []string{"goog:", "moz:", "ms:", "se:"}
View Source
var FunctionCapabilitiesPrefixes = []string{EnableManagedDownloadsCapability}

Functions

func AvgFloatFromSlice added in v2.8.2

func AvgFloatFromSlice(results []float64) float64

AvgFloatFromSlice finds the average value in a slice of floats

func CreateAzureLogsClient added in v2.15.0

func CreateAzureLogsClient(config *scalersconfig.ScalerConfig, meta *azureLogAnalyticsMetadata, logger logr.Logger) (*azquery.LogsClient, error)

func CreateAzureMetricsClient added in v2.15.0

func CreateAzureMetricsClient(config *scalersconfig.ScalerConfig, meta *azureMonitorMetadata, logger logr.Logger) (*azquery.MetricsClient, error)

func FindFactors added in v2.18.0

func FindFactors(n int64) []int64

FindFactors returns all factors of a given number

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 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 azeventhubs.PartitionProperties) int64

GetUnprocessedEventCountWithoutCheckpoint returns the number of messages on the without a checkoutpoint info

func GetValueFromResponse

func GetValueFromResponse(body []byte, valueLocation string, format APIFormat) (float64, error)

GetValueFromResponse uses provided valueLocation to access the numeric value in provided body using the format specified.

func InitializeLogger added in v2.8.0

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

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 APIFormat added in v2.14.0

type APIFormat string
const (
	PrometheusFormat APIFormat = "prometheus"
	JSONFormat       APIFormat = "json"
	XMLFormat        APIFormat = "xml"
	YAMLFormat       APIFormat = "yaml"
)

Options for APIFormat:

type AggregationType added in v2.19.0

type AggregationType string
const (
	AverageAggregationType AggregationType = "average"
	SumAggregationType     AggregationType = "sum"
	MaxAggregationType     AggregationType = "max"
	MinAggregationType     AggregationType = "min"
)

Options for APIFormat:

type BeanstalkdMetadata added in v2.16.0

type BeanstalkdMetadata struct {
	Server          string        `keda:"name=server,          order=triggerMetadata"`
	Tube            string        `keda:"name=tube,            order=triggerMetadata"`
	Value           float64       `keda:"name=value,           order=triggerMetadata"`
	ActivationValue float64       `keda:"name=activationValue, order=triggerMetadata, optional"`
	IncludeDelayed  bool          `keda:"name=includeDelayed,  order=triggerMetadata, optional"`
	Timeout         time.Duration `keda:"name=timeout,         order=triggerMetadata, default=30"`
	TriggerIndex    int
}

type BeanstalkdScaler added in v2.16.0

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

func (*BeanstalkdScaler) Close added in v2.16.0

func (*BeanstalkdScaler) GetMetricSpecForScaling added in v2.16.0

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

func (*BeanstalkdScaler) GetMetricsAndActivity added in v2.16.0

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

type CSClient added in v2.18.0

type CSClient struct {
	XMLName              xml.Name               `xml:"client"`
	PrimaryVirtualRouter CSPrimaryVirtualRouter `xml:"primary-virtual-router"`
}

type CSClientD added in v2.18.0

type CSClientD struct {
	XMLName        xml.Name `xml:"client"`
	ClientAddress  string   `xml:"client-address"`
	Name           string   `xml:"name"`
	MessageVpn     string   `xml:"message-vpn"`
	SlowSubscriber bool     `xml:"slow-subscriber"`
	ClientUsername string   `xml:"client-username"`
	Stats          CSStats  `xml:"stats"`
}

func (CSClientD) String added in v2.18.0

func (c CSClientD) String() string

type CSExecuteResult added in v2.18.0

type CSExecuteResult struct {
	XMLName xml.Name `xml:"execute-result"`
	Code    string   `xml:"code,attr"`
}

type CSPrimaryVirtualRouter added in v2.18.0

type CSPrimaryVirtualRouter struct {
	XMLName xml.Name    `xml:"primary-virtual-router"`
	Clients []CSClientD `xml:"client"`
}

type CSQClient added in v2.18.0

type CSQClient struct {
	XMLName              xml.Name                `xml:"client"`
	PrimaryVirtualRouter CSQPrimaryVirtualRouter `xml:"primary-virtual-router"`
}

type CSQClientD added in v2.18.0

type CSQClientD struct {
	XMLName        xml.Name         `xml:"client"`
	ClientAddress  string           `xml:"client-address"`
	Name           string           `xml:"name"`
	MessageVpn     string           `xml:"message-vpn"`
	SlowSubscriber bool             `xml:"slow-subscriber"`
	ClientUsername string           `xml:"client-username"`
	ClientQueues   []CSQClientQueue `xml:"client-queue"`
}

func (CSQClientD) String added in v2.18.0

func (c CSQClientD) String() string

type CSQClientQueue added in v2.18.0

type CSQClientQueue struct {
	XMLName           xml.Name `xml:"client-queue"`
	QueuePriority     string   `xml:"queue-priority"`
	LengthMsgs        int64    `xml:"length-msgs"`
	LengthWork        int64    `xml:"length-work"`
	HighWatermarkWork int64    `xml:"high-water-mark-work"`
	MaxWork           int64    `xml:"max-work"`
	DiscardsMsgs      int64    `xml:"discards-msgs"`
	DeliveredMsgs     int64    `xml:"delivered-msgs"`
}

type CSQExecuteResult added in v2.18.0

type CSQExecuteResult struct {
	XMLName xml.Name `xml:"execute-result"`
	Code    string   `xml:"code,attr"`
}

type CSQPrimaryVirtualRouter added in v2.18.0

type CSQPrimaryVirtualRouter struct {
	XMLName xml.Name     `xml:"primary-virtual-router"`
	Clients []CSQClientD `xml:"client"`
}

type CSQRpc added in v2.18.0

type CSQRpc struct {
	XMLName xml.Name `xml:"rpc"`
	Show    CSQShow  `xml:"show"`
}

type CSQRpcReply added in v2.18.0

type CSQRpcReply struct {
	XMLName       xml.Name         `xml:"rpc-reply"`
	SempVersion   string           `xml:"semp-version,attr"`
	RPC           CSQRpc           `xml:"rpc"`
	ExecuteResult CSQExecuteResult `xml:"execute-result"`
}

*********************************************************************** ** Client Stats Queues - structs ***********************************************************************

type CSQShow added in v2.18.0

type CSQShow struct {
	XMLName xml.Name  `xml:"show"`
	Client  CSQClient `xml:"client"`
}

type CSRpc added in v2.18.0

type CSRpc struct {
	XMLName xml.Name `xml:"rpc"`
	Show    CSShow   `xml:"show"`
}

type CSRpcReply added in v2.18.0

type CSRpcReply struct {
	XMLName       xml.Name        `xml:"rpc-reply"`
	SempVersion   string          `xml:"semp-version,attr"`
	RPC           CSRpc           `xml:"rpc"`
	ExecuteResult CSExecuteResult `xml:"execute-result"`
}

*********************************************************************** ** Client Stats - structs ***********************************************************************

type CSShow added in v2.18.0

type CSShow struct {
	XMLName xml.Name `xml:"show"`
	Client  CSClient `xml:"client"`
}

type CSStats added in v2.18.0

type CSStats struct {
	XMLName              xml.Name `xml:"stats"`
	MsgRatePerSecond     int64    `xml:"current-egress-rate-per-second"`
	AvgMsgRatePerMinute  int64    `xml:"average-egress-rate-per-minute"`
	ByteRatePerSecond    int64    `xml:"current-egress-byte-rate-per-second"`
	AvgByteRatePerMinute int64    `xml:"average-egress-byte-rate-per-minute"`
}

type CommandResponse

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

CommandResponse Full structured response from MQ admin REST query

type Data added in v2.16.0

type Data struct {
	Grid         Grid         `json:"grid"`
	NodesInfo    NodesInfo    `json:"nodesInfo"`
	SessionsInfo SessionsInfo `json:"sessionsInfo"`
}

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 ErrorResponse added in v2.17.0

type ErrorResponse struct {
	Error []struct {
		Message string `json:"message"`
	} `json:"error"`
}

ErrorResponse Structure for error messages from IBM MQ

type ForgejoJob added in v2.18.0

type ForgejoJob struct {
	ID int64 `json:"id"`
	// the repository id
	RepoID int64 `json:"repo_id"`
	// the owner id
	OwnerID int64 `json:"owner_id"`
	// the action run job name
	Name string `json:"name"`
	// the action run job needed ids
	Needs []string `json:"needs"`
	// the action run job labels to run on
	RunsOn []string `json:"runs_on"`
	// the action run job latest task id
	TaskID int64 `json:"task_id"`
	// the action run job status
	Status string `json:"status"`
}

type Grid added in v2.16.0

type Grid struct {
	SessionCount int64 `json:"sessionCount"`
	MaxSession   int64 `json:"maxSession"`
	TotalSlots   int64 `json:"totalSlots"`
}

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 Nodes added in v2.16.0

type Nodes []struct {
	ID           string   `json:"id"`
	Status       string   `json:"status"`
	SessionCount int64    `json:"sessionCount"`
	MaxSession   int64    `json:"maxSession"`
	SlotCount    int64    `json:"slotCount"`
	Stereotypes  string   `json:"stereotypes"`
	Sessions     Sessions `json:"sessions"`
}

type NodesInfo added in v2.16.0

type NodesInfo struct {
	Nodes Nodes `json:"nodes"`
}

type Parameters

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

Parameters Contains the current depth of the IBM MQ Queue

type Platform added in v2.17.0

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

func GetPlatform added in v2.17.0

func GetPlatform(input string) Platform

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 RateLimit added in v2.20.0

type RateLimit struct {
	Remaining      int64     `json:"remaining"`
	ResetTime      time.Time `json:"resetTime"`
	RetryAfterTime time.Time `json:"retryAfterTime"`
}

RateLimit holds rate limit information from GitHub API response headers

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 ReservedNodes added in v2.16.0

type ReservedNodes struct {
	ID         string `json:"id"`
	MaxSession int64  `json:"maxSession"`
	SlotCount  int64  `json:"slotCount"`
}

type Response

type Response struct {
	Parameters *Parameters `json:"parameters"`
	Message    []string    `json:"message"`
}

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(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)

func NewAzureServiceBusScaler

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

NewAzureServiceBusScaler creates a new AzureServiceBusScaler

func NewBeanstalkdScaler added in v2.16.0

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

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)

func NewDatadogScaler added in v2.6.0

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

NewDatadogScaler creates a new Datadog scaler

func NewDynatraceScaler added in v2.15.0

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

func NewElasticForecastScaler added in v2.20.0

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

func NewElasticsearchScaler added in v2.5.0

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

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 NewForgejoRunnerScaler added in v2.18.0

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

NewForgejoRunnerScaler creates a new Forgejo Runner 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)

func NewInfluxDBScaler

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

NewInfluxDBScaler creates a new influx db scaler

func NewKafkaScaler

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

NewKafkaScaler creates a new kafkaScaler

func NewKubernetesResourceScaler added in v2.19.0

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

NewKubernetesResourceScaler creates a new kubernetesResourceScaler

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)

func NewMSSQLScaler added in v2.2.0

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

func NewMetricsAPIScaler

func NewMetricsAPIScaler(config *scalersconfig.ScalerConfig, kubeClient client.Client) (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 NewNSQScaler added in v2.17.0

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

func NewNewRelicScaler added in v2.6.0

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

func NewOpensearchScaler added in v2.20.0

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

func NewOpenstackMetricScaler added in v2.3.0

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

NewOpenstackMetricScaler creates a 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(ctx context.Context, 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 NewSolaceDMScaler added in v2.18.0

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

Constructor for SolaceDMScaler

func NewSolaceScaler added in v2.4.0

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

NewSolaceScaler is the constructor for SolaceScaler

func NewSolarWindsScaler added in v2.18.0

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

func NewSolrScaler added in v2.11.0

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

NewSolrScaler creates a new solr Scaler

func NewSplunkObservabilityScaler added in v2.18.0

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

func NewSplunkScaler added in v2.15.0

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

func NewStackdriverScaler added in v2.7.0

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

NewStackdriverScaler creates a new stackdriverScaler

func NewSumologicScaler added in v2.18.0

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

func NewTemporalScaler added in v2.17.0

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

type SeleniumResponse added in v2.16.0

type SeleniumResponse struct {
	Data Data `json:"data"`
}

type Sessions added in v2.16.0

type Sessions []struct {
	ID           string `json:"id"`
	Capabilities string `json:"capabilities"`
	Slot         Slot   `json:"slot"`
}

type SessionsInfo added in v2.16.0

type SessionsInfo struct {
	SessionQueueRequests []string `json:"sessionQueueRequests"`
}

type Slot added in v2.16.0

type Slot struct {
	ID         string `json:"id"`
	Stereotype string `json:"stereotype"`
}

type SolaceDMScaler added in v2.18.0

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

*********************************************************************** ** Scaler ***********************************************************************

func (*SolaceDMScaler) Close added in v2.18.0

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

Close any resources that need disposing when scaler is no longer used or destroyed

func (*SolaceDMScaler) GetMetricSpecForScaling added in v2.18.0

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

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

func (*SolaceDMScaler) GetMetricsAndActivity added in v2.18.0

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

GetMetricsAndActivity returns the metric values and activity for a metric Name

func (*SolaceDMScaler) GetSolaceDMSempMetrics added in v2.18.0

func (s *SolaceDMScaler) GetSolaceDMSempMetrics(ctx context.Context, httpClient *http.Client, sempUrls []string, username string, password string, requestBody string) ([]byte, error)

func (*SolaceDMScaler) GetSolaceDMSempMetricsFromHost added in v2.18.0

func (s *SolaceDMScaler) GetSolaceDMSempMetricsFromHost(ctx context.Context, httpClient *http.Client, sempURL string, username string, password string, requestBody string) ([]byte, error)

type SolaceDMScalerConfiguration added in v2.18.0

type SolaceDMScalerConfiguration struct {

	// SolaceSEMPBaseURL
	SolaceSEMPBaseURL string `keda:"name=solaceSempBaseURL, order=triggerMetadata"`
	// Basic Auth Username
	Username string `keda:"name=username, order=authParams;resolvedEnv"`
	// Basic Auth Password
	Password string `keda:"name=password, order=authParams;resolvedEnv"`

	// Message VPN
	MessageVpn string `keda:"name=messageVpn, order=triggerMetadata"`
	// Client Name Prefix
	ClientNamePattern string `keda:"name=clientNamePattern, order=triggerMetadata"`

	// UnsafeSSL
	UnsafeSSL bool `keda:"name=unsafeSSL, order=triggerMetadata, default=false"`

	// factor to multiply queued messages length
	// to increase weight on queued messages and scale faster
	QueuedMessagesFactor int64 `keda:"name=queuedMessagesFactor, order=triggerMetadata, default=3"`
	// Target Client TxByteRate
	AggregatedClientTxByteRateTarget int64 `keda:"name=aggregatedClientTxByteRateTarget, order=triggerMetadata, default=0"`
	// Target Client AverageTxByteRate
	AggregatedClientAverageTxByteRateTarget int64 `keda:"name=aggregatedClientAverageTxByteRateTarget, order=triggerMetadata, default=0"`
	// Target Client TxMsgRate
	AggregatedClientTxMsgRateTarget int64 `keda:"name=aggregatedClientTxMsgRateTarget, order=triggerMetadata, default=0"`
	// Target Client AverageTxMsgRate
	AggregatedClientAverageTxMsgRateTarget int64 `keda:"name=aggregatedClientAverageTxMsgRateTarget, order=triggerMetadata, default=0"`

	// Activation Client TxByteRate
	ActivationAggregatedClientTxByteRateTarget int `keda:"name=activationAggregatedClientTxByteRateTarget, order=triggerMetadata, default=0"`
	// Activation Target Average TxByteRate
	ActivationAggregatedClientAverageTxByteRateTarget int `keda:"name=activationAggregatedClientAverageTxByteRateTarget, order=triggerMetadata, default=0"`
	// Activation Client TxMsgRate
	ActivationAggregatedClientTxMsgRateTarget int `keda:"name=activationAggregatedClientTxMsgRateTarget, order=triggerMetadata, default=0"`
	// Activation Target Average TxMsgRate
	ActivationAggregatedClientAverageTxMsgRateTarget int `keda:"name=activationAggregatedClientAverageTxMsgRateTarget, order=triggerMetadata, default=0"`
	// contains filtered or unexported fields
}

*********************************************************************** ** Scaler configuration ´Metadata´ ***********************************************************************

func (*SolaceDMScalerConfiguration) Validate added in v2.18.0

func (s *SolaceDMScalerConfiguration) Validate() error

type SolaceDMScalerMetricValues added in v2.18.0

type SolaceDMScalerMetricValues struct {
	//	Observed clientTxByteRate
	AggregatedClientTxByteRate int64
	//	Observed clientAverageTxByteRate
	AggregatedClientAverageTxByteRate int64
	//	Observed clientTxMsgRate
	AggregatedClientTxMsgRate int64
	//	Observed clientAverageTxMsgRate
	AggregatedClientAverageTxMsgRate int64
	//	Observed Client queued messages count
	AggregatedClientD1QueueMsgCount int64
	//	Observed Client queue units of work
	AggregatedClientD1QueueUnitsOfWork int64
	//	Observed Client queue units of work ratio
	AggregatedClientD1QueueUnitsOfWorkRatio int64
}

*********************************************************************** ** Scaler Metric values *********************************************************************** SolaceMetricValues is the struct for Observed Metric Values

func (SolaceDMScalerMetricValues) String added in v2.18.0

type SolaceMetadata added in v2.4.0

type SolaceMetadata struct {
	SolaceMetaSempBaseURL string `keda:"name=solaceSempBaseURL,  order=triggerMetadata"`

	// Solace Message VPN
	MessageVpn string `keda:"name=messageVpn,   order=triggerMetadata"`
	QueueName  string `keda:"name=queueName,    order=triggerMetadata"`

	// Basic Auth Username
	Username string `keda:"name=username, order=authParams;triggerMetadata;resolvedEnv"`
	// Basic Auth Password
	Password string `keda:"name=password, order=authParams;triggerMetadata;resolvedEnv"`

	// Target Message Count
	MsgCountTarget      int64 `keda:"name=messageCountTarget,       order=triggerMetadata, optional"`
	MsgSpoolUsageTarget int64 `keda:"name=messageSpoolUsageTarget,  order=triggerMetadata, optional"` // Spool Use Target in Megabytes
	MsgRxRateTarget     int64 `keda:"name=messageReceiveRateTarget, order=triggerMetadata, optional"` // Ingress Rate Target per consumer in msgs/second

	// Activation Target Message Count
	ActivationMsgCountTarget      int `keda:"name=activationMessageCountTarget,       order=triggerMetadata, default=0"`
	ActivationMsgSpoolUsageTarget int `keda:"name=activationMessageSpoolUsageTarget,  order=triggerMetadata, default=0"` // Spool Use Target in Megabytes
	ActivationMsgRxRateTarget     int `keda:"name=activationMessageReceiveRateTarget, order=triggerMetadata, default=0"` // Ingress Rate Target per consumer in msgs/second
	// contains filtered or unexported fields
}

func (*SolaceMetadata) Validate added in v2.15.0

func (s *SolaceMetadata) Validate() error

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 SplunkMetadata added in v2.15.0

type SplunkMetadata struct {
	APIToken        string `keda:"name=apiToken,        order=authParams, optional"`
	Password        string `keda:"name=password,        order=authParams, optional"`
	Username        string `keda:"name=username,        order=authParams"`
	Host            string `keda:"name=host,            order=triggerMetadata"`
	UnsafeSsl       bool   `keda:"name=unsafeSsl,       order=triggerMetadata, optional"`
	TargetValue     int    `keda:"name=targetValue,     order=triggerMetadata"`
	ActivationValue int    `keda:"name=activationValue, order=triggerMetadata"`
	SavedSearchName string `keda:"name=savedSearchName, order=triggerMetadata"`
	ValueField      string `keda:"name=valueField,      order=triggerMetadata"`
	// contains filtered or unexported fields
}

SplunkMetadata Metadata used by KEDA to search Splunk events and scale

type SplunkScaler added in v2.15.0

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

SplunkScaler assigns struct data pointer to metadata variable

func (*SplunkScaler) Close added in v2.15.0

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

func (*SplunkScaler) GetMetricSpecForScaling added in v2.15.0

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

GetMetricSpecForScaling returns the MetricSpec for the Horizontal Pod Autoscaler

func (*SplunkScaler) GetMetricsAndActivity added in v2.15.0

func (s *SplunkScaler) GetMetricsAndActivity(_ 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 SqsWrapperClient added in v2.12.0

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

type Stereotypes added in v2.16.0

type Stereotypes []struct {
	Slots      int64                  `json:"slots"`
	Stereotype map[string]interface{} `json:"stereotype"`
}

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"`
}

Source Files

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