config

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateTokenFunction

func UpdateTokenFunction() (accessKeyID, accessKeySecret, securityToken string, expireTime time.Time, err error)

Types

type Configuration

type Configuration struct {
	Project             string
	Endpoint            string
	AliCloudK8SFlag     bool
	AccessKeyID         string
	AccessKeySecret     string
	SpanLogstore        string
	SpanAggLogstore     string
	SpanDepLogstore     string
	DependencyLogstore  string
	MaxQueryDuration    time.Duration
	InitResourceFlag    bool
	TagAppendRuleFile   string
	KindRewriteRuleFile string
}

Configuration describes the configuration properties needed to connect to an AliCloud Log Service cluster

func (*Configuration) ApplyDefaults

func (c *Configuration) ApplyDefaults(source *Configuration)

ApplyDefaults copies settings from source unless its own value is non-zero.

func (*Configuration) GetMaxQueryDuration

func (c *Configuration) GetMaxQueryDuration() time.Duration

func (*Configuration) NewClient

func (c *Configuration) NewClient(logstoreType LogstoreType) (client sls.ClientInterface, project string, logstore string, aggLogstore string, initResourceFlag bool, tagAppendRuleFile string, kindRewriteRuleFile string, err error)

NewClient return client, project, logstore, error

type LogstoreBuilder

type LogstoreBuilder interface {
	// NewClient return client, project, logstore, error
	NewClient(logstoreType LogstoreType) (sls.ClientInterface, string, string, string, bool, string, string, error)
	GetMaxQueryDuration() time.Duration
}

LogstoreBuilder creates new sls.ClientInterface

type LogstoreType

type LogstoreType int

LogstoreType describes the type of a logstore

const (
	// SpanType indicates the logstore is used to store span
	SpanType LogstoreType = iota
	// DependencyType indicates the logstore is used to store dependency
	DependencyType
)

type SecurityTokenResult

type SecurityTokenResult struct {
	AccessKeyId     string
	AccessKeySecret string
	Expiration      string
	SecurityToken   string
	Code            string
	LastUpdated     string
}

Jump to

Keyboard shortcuts

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