sls

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SLS_INGRESS_QPS           = "sls_ingress_qps"
	SLS_INGRESS_LATENCY_AVG   = "sls_ingress_latency_avg"
	SLS_INGRESS_LATENCY_P50   = "sls_ingress_latency_p50"
	SLS_INGRESS_LATENCY_P95   = "sls_ingress_latency_p95"
	SLS_INGRESS_LATENCY_P9999 = "sls_ingress_latency_p9999"
	SLS_INGRESS_LATENCY_P99   = "sls_ingress_latency_p99"
	SLS_INGRESS_INFLOW        = "sls_ingress_inflow" // byte per second

	SLS_LABEL_PROJECT         = "sls.project"
	SLS_LABEL_LOGSTORE        = "sls.logstore"
	SLS_LABEL_QUERY_INTERVAL  = "sls.query.interval"  // query interval seconds, min val 15s
	SLS_LABEL_QUERY_DELAY     = "sls.query.delay"     // query delay seconds, default 0s
	SLS_LABEL_QUERY_MAX_RETRY = "sls.query.max_retry" // max retry, default 5
	SLS_LABEL_INGRESS_ROUTE   = "sls.ingress.route"   // e.g. namespace-svc-port

	MIN_INTERVAL      = 15
	MAX_RETRY_DEFAULT = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type QPSResponse

type QPSResponse struct {
	Data []qps `json:"data"`
}

type SLSGlobalParams

type SLSGlobalParams struct {
	Project      string
	LogStore     string
	Interval     int
	DelaySeconds int
	MaxRetry     int
}

Global params

type SLSIngressParams

type SLSIngressParams struct {
	SLSGlobalParams
	Route string
}

type SLSMetricSource

type SLSMetricSource struct{}

func NewSLSMetricSource

func NewSLSMetricSource() *SLSMetricSource

func (*SLSMetricSource) Client

func (ss *SLSMetricSource) Client(project string) (client sls.ClientInterface, err error)

create client with specific project

func (*SLSMetricSource) GetExternalMetric

func (ss *SLSMetricSource) GetExternalMetric(info p.ExternalMetricInfo, namespace string, requirements labels.Requirements) (values []external_metrics.ExternalMetricValue, err error)

func (*SLSMetricSource) GetExternalMetricInfoList

func (ss *SLSMetricSource) GetExternalMetricInfoList() []p.ExternalMetricInfo

Jump to

Keyboard shortcuts

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