slsimport

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Example (Http_status)
status, typ, err := parseHTTPStatus("201")
fmt.Println(status, typ, err)

status, typ, err = parseHTTPStatus("404")
fmt.Println(status, typ, err)

status, typ, err = parseHTTPStatus("599")
fmt.Println(status, typ, err)

status, typ, err = parseHTTPStatus("1990")
fmt.Println(status, typ, err)
Output:

201 2XX <nil>
404 4XX <nil>
599 5XX <nil>
1990 19XX <nil>

Index

Examples

Constants

This section is empty.

Variables

View Source
var Endpoints = []string{
	"cn-hangzhou.log.aliyuncs.com",
	"cn-hangzhou-finance.log.aliyuncs.com",
	"cn-shanghai.log.aliyuncs.com",
	"cn-shanghai-finance-1.log.aliyuncs.com",
	"cn-qingdao.log.aliyuncs.com",
	"cn-beijing.log.aliyuncs.com",
	"cn-zhangjiakou.log.aliyuncs.com",
	"cn-huhehaote.log.aliyuncs.com",
	"cn-shenzhen.log.aliyuncs.com",
	"cn-shenzhen-finance.log.aliyuncs.com",
	"cn-chengdu.log.aliyuncs.com",
	"cn-hongkong.log.aliyuncs.com",
	"ap-northeast-1.log.aliyuncs.com",
	"ap-southeast-1.log.aliyuncs.com",
	"ap-southeast-2.log.aliyuncs.com",
	"ap-southeast-3.log.aliyuncs.com",
	"ap-southeast-5.log.aliyuncs.com",
	"me-east-1.log.aliyuncs.com",
	"us-west-1.log.aliyuncs.com",
	"eu-central-1.log.aliyuncs.com",
	"us-east-1.log.aliyuncs.com",
	"ap-south-1.log.aliyuncs.com",
	"eu-west-1.log.aliyuncs.com",
}

Endpoints sls endpoints

Functions

func InString

func InString(s string, ss []string) bool

Types

type AccountInfo

type AccountInfo struct {
	OrgID           string
	OrgName         string
	AccessKey       string
	AccessSecretKey string
	Endpoints       []string
}

AccountInfo .

type Consumer

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

Consumer 针对一个账号下,某个 Projects、LogStore 的消费者

func (*Consumer) Close

func (c *Consumer) Close() error

Close .

func (*Consumer) Start

func (c *Consumer) Start() error

Start .

type Contents

type Contents []*sls.LogContent

Contents .

func (Contents) Len

func (cs Contents) Len() int

func (Contents) Less

func (cs Contents) Less(i, j int) bool

func (Contents) Swap

func (cs Contents) Swap(i, j int)

type Filters

type Filters []*regexp.Regexp

Filters .

func (Filters) Match

func (fs Filters) Match(text string) bool

Match .

type Importer

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

Importer 处理某个账号下,所有的 Project 日志的导入

func (*Importer) Close

func (i *Importer) Close() error

Close .

func (*Importer) Start

func (i *Importer) Start(reloadInterval time.Duration) error

Start .

type LogFilter

type LogFilter interface {
	FilterSLSLog(logs []*sls.Log) []*sls.Log
	InitWithOptions(options map[string]interface{})
}

type LogProject

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

LogProject 处理某个 Project 下面的 LogStore Consumer

func (*LogProject) Close

func (p *LogProject) Close() error

Close .

type RDSLogFilter

type RDSLogFilter struct {
	SlowSQLThreshold time.Duration `mapstructure:"slow_sql_threshold"`
	ExcludeSQL       []string      `mapstructure:"exclude_sql"`
}

func (*RDSLogFilter) FilterSLSLog

func (rf *RDSLogFilter) FilterSLSLog(logs []*sls.Log) []*sls.Log

func (*RDSLogFilter) InitWithOptions

func (rf *RDSLogFilter) InitWithOptions(options map[string]interface{})

Jump to

Keyboard shortcuts

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