README ¶
User Guide (中文)
基本介绍
本项目是阿里云日志服务 (Log Service,简称SLS)API的Golang编程接口,提供了对于Log Service Rest API的封装和实现,帮助Golang开发人员更快编程使用阿里云日志服务。
本项目主要由3个部分组成:
- 日志服务基础API封装和实现。
- Golang Producer Library,用于向日志服务批量发送数据,详情参考Aliyun LOG Golang Producer 快速入门。
- Golang Consumer Library,用于消费日志服务中的数据,详情参考Consumer Library。
详细API接口以及含义请参考:https://help.aliyun.com/document_detail/29007.html
安装
go get -u github.com/aliyun/aliyun-log-go-sdk
快速入门
前言: 所有的使用样例都位于example目录下,使用该目录下的所有样例前,请先在该目录下的config.go文件中的init函数中配置您的 project, logstore等所需要的配置参数,example目录下的所有样例都会使用config.go文件中配置的参数。
-
创建Client
参考 config.go 文件
AccessKeyID = "your ak id" AccessKeySecret = "your ak secret" Endpoint = "your endpoint" // just like cn-hangzhou.log.aliyuncs.com Client = sls.CreateNormalInterface(Endpoint,AccessKeyID,AccessKeySecret,"")
-
创建project
参考 log_project.go文件
project, err := util.Client.CreateProject(ProjectName,"Project used for testing") if err != nil { fmt.Println(err) } fmt.Println(project)
-
创建logstore
err := util.Client.CreateLogStore(ProjectName, LogStoreName,2,2,true,64) if err != nil { fmt.Println(err) }
-
创建索引
indexKeys := map[string]sls.IndexKey{ "col_0": { Token: []string{" "}, CaseSensitive: false, Type: "long", }, "col_1": { Token: []string{",", ":", " "}, CaseSensitive: false, Type: "text", }, } index := sls.Index{ Keys: indexKeys, Line: &sls.IndexLine{ Token: []string{",", ":", " "}, CaseSensitive: false, IncludeKeys: []string{}, ExcludeKeys: []string{}, }, } err = util.Client.CreateIndex(util.ProjectName, logstore_name, index) if err != nil { fmt.Printf("CreateIndex fail, err: %s", err) return } fmt.Println("CreateIndex success")
-
写数据
这里展示了用sdk中原生的API接口去发送数据简单示例,但是我们不推荐用API直接向logstore写入数据,推荐使用SDK 中提供的producer 包向logstore 写入数据,自动压缩数据并且提供安全退出机制,不会使数据丢失。
logs := []*sls.Log{} for logIdx := 0; logIdx < 100; logIdx++ { content := []*sls.LogContent{} for colIdx := 0; colIdx < 10; colIdx++ { content = append(content, &sls.LogContent{ Key: proto.String(fmt.Sprintf("col_%d", colIdx)), Value: proto.String(fmt.Sprintf("loggroup idx: %d, log idx: %d, col idx: %d, value: %d", loggroupIdx, logIdx, colIdx, rand.Intn(10000000))), }) } log := &sls.Log{ Time: proto.Uint32(uint32(time.Now().Unix())), Contents: content, } logs = append(logs, log) } loggroup := &sls.LogGroup{ Topic: proto.String(""), Source: proto.String("10.230.201.117"), Logs: logs, } // PostLogStoreLogs API Ref: https://intl.aliyun.com/help/doc-detail/29026.htm for retryTimes := 0; retryTimes < 10; retryTimes++ { err := util.Client.PutLogs(util.ProjectName, util.LogStoreName, loggroup) if err == nil { fmt.Printf("PutLogs success, retry: %d\n", retryTimes) break } else { fmt.Printf("PutLogs fail, retry: %d, err: %s\n", retryTimes, err) //handle exception here, you can add retryable erorrCode, set appropriate put_retry if strings.Contains(err.Error(), sls.WRITE_QUOTA_EXCEED) || strings.Contains(err.Error(), sls.PROJECT_QUOTA_EXCEED) || strings.Contains(err.Error(), sls.SHARD_WRITE_QUOTA_EXCEED) { //mayby you should split shard time.Sleep(1000 * time.Millisecond) } else if strings.Contains(err.Error(), sls.INTERNAL_SERVER_ERROR) || strings.Contains(err.Error(), sls.SERVER_BUSY) { time.Sleep(200 * time.Millisecond) } } }
6.读数据
这里展示了使用SDK中原生API接口调用去拉取数据的方式,我们不推荐使用这种方式去读取消费logstore中的数据,推荐使用SDK中 consumer 消费组去拉取数据,消费组提供自动负载均衡以及失败重试等机制,并且会自动保存拉取断点,再次拉取不会拉取重复数据。
shards, err := client.ListShards(project, logstore)
totalLogCount := 0
for _, shard := range shards {
fmt.Printf("[shard] %d begin\n", shard.ShardID)
beginCursor, err := client.GetCursor(project, logstore, shard.ShardID, "begin")
if err != nil {
panic(err)
}
endCursor, err := client.GetCursor(project, logstore, shard.ShardID, "end")
if err != nil {
panic(err)
}
nextCursor := beginCursor
for nextCursor != endCursor {
gl, nc, err := client.PullLogs(project, logstore, shard.ShardID, nextCursor, endCursor, 10)
if err != nil {
fmt.Printf("pull log error : %s\n", err)
time.Sleep(time.Second)
continue
}
nextCursor = nc
fmt.Printf("now count %d \n", totalLogCount)
if gl != nil {
for _, lg := range gl.LogGroups {
for _, tag := range lg.LogTags {
fmt.Printf("[tag] %s : %s\n", tag.GetKey(), tag.GetValue())
}
for _, log := range lg.Logs {
totalLogCount++
// print log
for _, content := range log.Contents {
fmt.Printf("[log] %s : %s\n", content.GetKey(), content.GetValue())
}
}
}
}
}
-
创建机器组
机器组分为IP型机器组和标识型机器组,二选一
创建标识型机器组
attribute := sls.MachinGroupAttribute{
}
machineList := []string{"mac-user-defined-id-value_XX"}
var machineGroup = &sls.MachineGroup{
Name: groupName,
MachineIDType: "userdefined",
MachineIDList: machineList,
Attribute: attribute,
}
err = util.Client.CreateMachineGroup(ProjectName, machineGroup)
if err != nil {
fmt.Println(err)
}
创建IP型机器组
attribute := sls.MachinGroupAttribute{
}
machineList := []string{"192.168.XX.XX"}
var machineGroup = &sls.MachineGroup{
Name: groupName,
MachineIDType: "ip",
MachineIDList: machineList,
Attribute: attribute,
}
err = util.Client.CreateMachineGroup(ProjectName, machineGroup)
if err != nil {
fmt.Println(err)
}
-
创建logtail 采集配置
logtail 采集配置,目前通过sdk 支持创建下列几种模式的采集配置,分别为 完整正则,分隔符模式,json模式 ,插件模式,这里展示的完整正则模式的创建。
regexConfig := new(sls.RegexConfigInputDetail) regexConfig.DiscardUnmatch = false regexConfig.Key = []string{"logger", "time", "cluster", "hostname", "sr", "app", "workdir", "exe", "corepath", "signature", "backtrace"} regexConfig.Regex = "\\S*\\s+(\\S*)\\s+(\\S*\\s+\\S*)\\s+\\S*\\s+(\\S*)\\s+(\\S*)\\s+(\\S*)\\s+(\\S*)\\s+(\\S*)\\s+(\\S*)\\s+(\\S*)\\s+\\S*\\s+(\\S*)\\s*([^$]+)" regexConfig.TimeFormat = "%Y/%m/%d %H:%M:%S" regexConfig.LogBeginRegex = `INFO core_dump_info_data .*` regexConfig.LogPath = "/cloud/log/tianji/TianjiClient#/core_dump_manager" regexConfig.FilePattern = "core_dump_info_data.log*" regexConfig.MaxDepth = 0 sls.InitRegexConfigInputDetail(regexConfig) outputDetail := sls.OutputDetail{ ProjectName: projectName, LogStoreName: logstore, } logConfig := &sls.LogConfig{ Name: configName, InputType: "file", OutputType: "LogService", // Now only supports LogService InputDetail: regexConfig, OutputDetail: outputDetail, } err = util.Client.CreateConfig(projectName, logConfig) if err != nil { fmt.Println(err) }
-
logtail配置到机器组
err = util.Client.ApplyConfigToMachineGroup(ProjectName, confName, mgname) if err != nil { fmt.Println(err) }
开发者
更新protobuf工具
protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/gogo/protobuf/protobuf --gofast_out=. log.proto
Documentation ¶
Overview ¶
Package sls is a generated protocol buffer package.
It is generated from these files:
log.proto
It has these top-level messages:
LogContent Log LogTag LogGroup SlsLogPackage SlsLogPackageList LogGroupList
Index ¶
- Constants
- Variables
- func AddNecessaryApsaraLogInputConfigField(inputConfigDetail map[string]interface{})
- func AddNecessaryDelimiterLogInputConfigField(inputConfigDetail map[string]interface{})
- func AddNecessaryInputConfigField(inputConfigDetail map[string]interface{})
- func AddNecessaryJSONLogInputConfigField(inputConfigDetail map[string]interface{})
- func AddNecessaryLocalFileInputConfigField(inputConfigDetail map[string]interface{})
- func AddNecessaryRegexLogInputConfigField(inputConfigDetail map[string]interface{})
- func GenResourceId(project string, subResourceId string) string
- func GenerateInnerLogger(logFileName, isJsonType, logMaxSize, logFileBackupCount, allowLogLevel string) log.Logger
- func GetFileConfigInputDetailType(detail InputDetailInterface) (string, bool)
- func InitApsaraLogConfigInputDetail(detail *ApsaraLogConfigInputDetail)
- func InitCommonConfigInputDetail(detail *CommonConfigInputDetail)
- func InitDelimiterConfigInputDetail(detail *DelimiterConfigInputDetail)
- func InitJSONConfigInputDetail(detail *JSONConfigInputDetail)
- func InitLocalFileConfigInputDetail(detail *LocalFileConfigInputDetail)
- func InitPluginLogConfigInputDetail(detail *PluginLogConfigInputDetail)
- func InitRegexConfigInputDetail(detail *RegexConfigInputDetail)
- func InitStreamLogConfigInputDetail(detail *StreamLogConfigInputDetail)
- func IsDebugLevelMatched(level int) bool
- func IsTokenError(err error) bool
- func IsValidInputType(inputType string) bool
- func JsonMarshal(v interface{}) string
- func Retry(ctx context.Context, o backoff.Operation) error
- func RetryWithAttempt(ctx context.Context, maxAttempt int, o ConditionOperation) error
- func RetryWithBackOff(ctx context.Context, b backoff.BackOff, o backoff.Operation) error
- func RetryWithCondition(ctx context.Context, b backoff.BackOff, o ConditionOperation) error
- func UpdateInputConfigField(detail InputDetailInterface, key string, val interface{}) error
- type Alert
- type AlertConfiguration
- type AlertQuery
- type AliyunBssSource
- type AliyunCloudMonitorSource
- type AliyunGeneralSink
- type AliyunMaxComputeSource
- type AliyunODPSSink
- type AliyunOSSSink
- type AliyunOSSSource
- type ApsaraLogConfigInputDetail
- type AuthVersionType
- type BadResponseError
- type BaseJob
- type Chart
- type ChartDisplay
- type ChartSearch
- type Client
- func (c *Client) ApplyConfigToMachineGroup(project string, confName, groupName string) (err error)
- func (c *Client) CheckConfigExist(project string, config string) (ok bool, err error)
- func (c *Client) CheckLogstoreExist(project string, logstore string) (bool, error)
- func (c *Client) CheckMachineGroupExist(project string, machineGroup string) (bool, error)
- func (c *Client) CheckProjectExist(name string) (bool, error)
- func (c *Client) Close() error
- func (c *Client) CreateAlert(project string, alert *Alert) error
- func (c *Client) CreateAlertString(project string, alert string) error
- func (c *Client) CreateChart(project, dashboardName string, chart Chart) error
- func (c *Client) CreateConfig(project string, config *LogConfig) (err error)
- func (c *Client) CreateConfigString(project string, config string) (err error)
- func (c *Client) CreateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
- func (c *Client) CreateDashboard(project string, dashboard Dashboard) error
- func (c *Client) CreateDashboardString(project string, dashboardStr string) error
- func (c *Client) CreateETL(project string, etljob ETL) error
- func (c *Client) CreateEtlMeta(project string, etlMeta *EtlMeta) (err error)
- func (c *Client) CreateEventStore(project string, eventStore *LogStore) error
- func (c *Client) CreateExport(project string, export *Export) error
- func (c *Client) CreateIndex(project, logstore string, index Index) error
- func (c *Client) CreateIndexString(project, logstore string, index string) error
- func (c *Client) CreateIngestion(project string, ingestion *Ingestion) error
- func (c *Client) CreateLogStore(project string, logstore string, ttl, shardCnt int, autoSplit bool, ...) error
- func (c *Client) CreateLogStoreV2(project string, logstore *LogStore) error
- func (c *Client) CreateLogging(project string, detail *Logging) error
- func (c *Client) CreateMachineGroup(project string, m *MachineGroup) error
- func (c *Client) CreateMetricAggRules(project string, aggRules *MetricAggRules) error
- func (c *Client) CreateMetricStore(project string, metricStore *LogStore) error
- func (c *Client) CreateProject(name, description string) (*LogProject, error)
- func (c *Client) CreateResource(resource *Resource) error
- func (c *Client) CreateResourceRecord(resourceName string, record *ResourceRecord) error
- func (c *Client) CreateResourceRecordString(resourceName, recordStr string) error
- func (c *Client) CreateResourceString(resourceStr string) error
- func (c *Client) CreateSavedSearch(project string, savedSearch *SavedSearch) error
- func (c *Client) CreateScheduledSQL(project string, scheduledsql *ScheduledSQL) error
- func (c *Client) CreateSubStore(project, logstore string, sss *SubStore) (err error)
- func (c *Client) DeleteAlert(project string, alertName string) error
- func (c *Client) DeleteChart(project, dashboardName, chartName string) error
- func (c *Client) DeleteConfig(project string, config string) (err error)
- func (c *Client) DeleteConsumerGroup(project, logstore string, cgName string) (err error)
- func (c *Client) DeleteDashboard(project, name string) error
- func (c *Client) DeleteETL(project string, etlName string) error
- func (c *Client) DeleteEtlMeta(project string, etlMetaName, etlMetaKey string) (err error)
- func (c *Client) DeleteEventStore(project, name string) error
- func (c *Client) DeleteExport(project string, name string) error
- func (c *Client) DeleteIndex(project, logstore string) error
- func (c *Client) DeleteIngestion(project string, name string) error
- func (c *Client) DeleteLogStore(project string, logstore string) (err error)
- func (c *Client) DeleteLogging(project string) error
- func (c *Client) DeleteMachineGroup(project string, machineGroup string) (err error)
- func (c *Client) DeleteMetricAggRules(project string, ruleID string) error
- func (c *Client) DeleteMetricStore(project, name string) error
- func (c *Client) DeleteProject(name string) error
- func (c *Client) DeleteProjectPolicy(project string) error
- func (c *Client) DeleteResource(name string) error
- func (c *Client) DeleteResourceRecord(resourceName, recordId string) error
- func (c *Client) DeleteSavedSearch(project string, savedSearchName string) error
- func (c *Client) DeleteScheduledSQL(project string, name string) error
- func (c *Client) DeleteSubStore(project, logstore string, name string) (err error)
- func (c *Client) DisableAlert(project string, alertName string) error
- func (c *Client) EnableAlert(project string, alertName string) error
- func (c *Client) GetAlert(project string, alertName string) (*Alert, error)
- func (c *Client) GetAlertString(project string, alertName string) (string, error)
- func (c *Client) GetAppliedConfigs(project string, groupName string) (confNames []string, err error)
- func (c *Client) GetAppliedMachineGroups(project string, confName string) (groupNames []string, err error)
- func (c *Client) GetChart(project, dashboardName, chartName string) (chart *Chart, err error)
- func (c *Client) GetCheckpoint(project, logstore string, cgName string) (checkPointList []*ConsumerGroupCheckPoint, err error)
- func (c *Client) GetConfig(project string, config string) (logConfig *LogConfig, err error)
- func (c *Client) GetConfigString(project string, config string) (logConfig string, err error)
- func (c *Client) GetCursor(project, logstore string, shardID int, from string) (cursor string, err error)
- func (c *Client) GetCursorTime(project, logstore string, shardID int, cursor string) (cursorTime time.Time, err error)
- func (c *Client) GetDashboard(project, name string) (dashboard *Dashboard, err error)
- func (c *Client) GetDashboardString(project, name string) (dashboard string, err error)
- func (c *Client) GetETL(project string, etlName string) (ETLJob *ETL, err error)
- func (c *Client) GetEtlMeta(project string, etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error)
- func (c *Client) GetEventStore(project, name string) (*LogStore, error)
- func (c *Client) GetExport(project, name string) (*Export, error)
- func (c *Client) GetHistograms(project, logstore string, topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
- func (c *Client) GetHistogramsToCompleted(project, logstore string, topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
- func (c *Client) GetIndex(project, logstore string) (*Index, error)
- func (c *Client) GetIndexString(project, logstore string) (string, error)
- func (c *Client) GetIngestion(project string, name string) (*Ingestion, error)
- func (c *Client) GetLogLines(project, logstore string, topic string, from int64, to int64, queryExp string, ...) (*GetLogLinesResponse, error)
- func (c *Client) GetLogLinesV2(project, logstore string, req *GetLogRequest) (*GetLogLinesResponse, error)
- func (c *Client) GetLogStore(project string, logstore string) (*LogStore, error)
- func (c *Client) GetLogging(project string) (*Logging, error)
- func (c *Client) GetLogs(project, logstore string, topic string, from int64, to int64, queryExp string, ...) (*GetLogsResponse, error)
- func (c *Client) GetLogsBytes(project, logstore string, shardID int, cursor, endCursor string, ...) (out []byte, nextCursor string, err error)
- func (c *Client) GetLogsToCompleted(project, logstore string, topic string, from int64, to int64, queryExp string, ...) (*GetLogsResponse, error)
- func (c *Client) GetLogsToCompletedV2(project, logstore string, req *GetLogRequest) (*GetLogsResponse, error)
- func (c *Client) GetLogsV2(project, logstore string, req *GetLogRequest) (*GetLogsResponse, error)
- func (c *Client) GetLogsV3(project, logstore string, req *GetLogRequest) (*GetLogsV3Response, error)
- func (c *Client) GetMachineGroup(project string, machineGroup string) (m *MachineGroup, err error)
- func (c *Client) GetMetricAggRules(project string, ruleID string) (*MetricAggRules, error)
- func (c *Client) GetMetricStore(project, name string) (*LogStore, error)
- func (c *Client) GetPrevCursorTime(project, logstore string, shardID int, cursor string) (cursorTime time.Time, err error)
- func (c *Client) GetProject(name string) (*LogProject, error)
- func (c *Client) GetProjectPolicy(project string) (policy string, err error)
- func (c *Client) GetResource(name string) (resource *Resource, err error)
- func (c *Client) GetResourceRecord(resourceName, recordId string) (record *ResourceRecord, err error)
- func (c *Client) GetResourceRecordString(resourceName, recordId string) (recordStr string, err error)
- func (c *Client) GetResourceString(name string) (resource string, err error)
- func (c *Client) GetSavedSearch(project string, savedSearchName string) (*SavedSearch, error)
- func (c *Client) GetScheduledSQL(project string, name string) (*ScheduledSQL, error)
- func (c *Client) GetScheduledSQLJobInstance(projectName, jobName, instanceId string, result bool) (*ScheduledSQLJobInstance, error)
- func (c *Client) GetSubStore(project, logstore, name string) (sortedSubStore *SubStore, err error)
- func (c *Client) GetSubStoreTTL(project, logstore string) (ttl int, err error)
- func (c *Client) HeartBeat(project, logstore string, cgName, consumer string, heartBeatShardIDs []int) (shardIDs []int, err error)
- func (c *Client) ListAlert(project, alertName, dashboard string, offset, size int) (alerts []*Alert, total int, count int, err error)
- func (c *Client) ListConfig(project string, offset, size int) (cfgNames []string, total int, err error)
- func (c *Client) ListConsumerGroup(project, logstore string) (cgList []*ConsumerGroup, err error)
- func (c *Client) ListDashboard(project string, dashboardName string, offset, size int) (dashboardList []string, count, total int, err error)
- func (c *Client) ListDashboardV2(project string, dashboardName string, offset, size int) (dashboardList []string, dashboardItems []ResponseDashboardItem, ...)
- func (c *Client) ListETL(project string, offset int, size int) (*ListETLResponse, error)
- func (c *Client) ListEtlMeta(project string, etlMetaName string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (c *Client) ListEtlMetaName(project string, offset, size int) (total int, count int, etlMetaNameList []string, err error)
- func (c *Client) ListEtlMetaWithTag(project string, etlMetaName, etlMetaTag string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (c *Client) ListEventStore(project string, offset, size int) ([]string, error)
- func (c *Client) ListExport(project, logstore, name, displayName string, offset, size int) (exports []*Export, total, count int, error error)
- func (c *Client) ListIngestion(project, logstore, name, displayName string, offset, size int) (ingestions []*Ingestion, total, count int, error error)
- func (c *Client) ListLogStore(project string) ([]string, error)
- func (c *Client) ListLogStoreV2(project string, offset, size int, telemetryType string) ([]string, error)
- func (c *Client) ListMachineGroup(project string, offset, size int) (m []string, total int, err error)
- func (c *Client) ListMachines(project, machineGroupName string) (ms []*Machine, total int, err error)
- func (c *Client) ListMetricAggRules(project string, offset int, size int) ([]*MetricAggRules, error)
- func (c *Client) ListProject() (projectNames []string, err error)
- func (c *Client) ListProjectV2(offset, size int) (projects []LogProject, count, total int, err error)
- func (c *Client) ListResource(resourceType string, resourceName string, offset, size int) (resourceList []*Resource, count, total int, err error)
- func (c *Client) ListResourceRecord(resourceName string, offset, size int) (recordList []*ResourceRecord, count, total int, err error)
- func (c *Client) ListSavedSearch(project string, savedSearchName string, offset, size int) (savedSearches []string, total int, count int, err error)
- func (c *Client) ListSavedSearchV2(project string, savedSearchName string, offset, size int) (savedSearches []string, savedsearchItems []ResponseSavedSearchItem, total int, ...)
- func (c *Client) ListScheduledSQL(project, name, displayName string, offset, size int) (scheduledsqls []*ScheduledSQL, total, count int, error error)
- func (c *Client) ListScheduledSQLJobInstances(projectName, jobName string, status *InstanceStatus) (instances []*ScheduledSQLJobInstance, total, count int64, err error)
- func (c *Client) ListShards(project, logstore string) (shardIDs []*Shard, err error)
- func (c *Client) ListSubStore(project, logstore string) (sortedSubStores []string, err error)
- func (c *Client) ListTagResources(project string, resourceType string, resourceIDs []string, ...) (respTags []*ResourceTagResponse, respNextToken string, err error)
- func (c *Client) MergeShards(project, logstore string, shardID int) (shards []*Shard, err error)
- func (c *Client) ModifyScheduledSQLJobInstanceState(projectName, jobName, instanceId string, state ScheduledSQLState) error
- func (c *Client) PostLogStoreLogs(project, logstore string, lg *LogGroup, hashKey *string) (err error)
- func (c *Client) PublishAlertEvent(project string, alertResult []byte) error
- func (c *Client) PullLogs(project, logstore string, shardID int, cursor, endCursor string, ...) (gl *LogGroupList, nextCursor string, err error)
- func (c *Client) PutLogs(project, logstore string, lg *LogGroup) (err error)
- func (c *Client) PutLogsWithCompressType(project, logstore string, lg *LogGroup, compressType int) (err error)
- func (c *Client) PutRawLogWithCompressType(project, logstore string, rawLogData []byte, compressType int) (err error)
- func (c *Client) RemoveConfigFromMachineGroup(project string, confName, groupName string) (err error)
- func (c *Client) ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string)
- func (c *Client) RestartETL(project string, etljob ETL) error
- func (c *Client) RestartExport(project string, export *Export) error
- func (c *Client) SetAuthVersion(version AuthVersionType)
- func (c *Client) SetHTTPClient(client *http.Client)
- func (c *Client) SetRegion(region string)
- func (c *Client) SetUserAgent(userAgent string)
- func (c *Client) SplitNumShard(project, logstore string, shardID, shardsNum int) (shards []*Shard, err error)
- func (c *Client) SplitShard(project, logstore string, shardID int, splitKey string) (shards []*Shard, err error)
- func (c *Client) StartETL(project, name string) error
- func (c *Client) StopETL(project, name string) error
- func (c *Client) TagResources(project string, tags *ResourceTags) error
- func (c *Client) UnTagResources(project string, tags *ResourceUnTags) error
- func (c *Client) UpdateAlert(project string, alert *Alert) error
- func (c *Client) UpdateAlertString(project string, alertName, alert string) error
- func (c *Client) UpdateChart(project, dashboardName string, chart Chart) error
- func (c *Client) UpdateCheckpoint(project, logstore string, cgName string, consumer string, shardID int, ...) (err error)
- func (c *Client) UpdateConfig(project string, config *LogConfig) (err error)
- func (c *Client) UpdateConfigString(project string, configName, configDetail string) (err error)
- func (c *Client) UpdateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
- func (c *Client) UpdateDashboard(project string, dashboard Dashboard) error
- func (c *Client) UpdateDashboardString(project string, dashboardName, dashboardStr string) error
- func (c *Client) UpdateETL(project string, etljob ETL) error
- func (c *Client) UpdateEtlMeta(project string, etlMeta *EtlMeta) (err error)
- func (c *Client) UpdateEventStore(project string, eventStore *LogStore) error
- func (c *Client) UpdateExport(project string, export *Export) error
- func (c *Client) UpdateIndex(project, logstore string, index Index) error
- func (c *Client) UpdateIndexString(project, logstore string, index string) error
- func (c *Client) UpdateIngestion(project string, ingestion *Ingestion) error
- func (c *Client) UpdateLogStore(project string, logstore string, ttl, shardCnt int) (err error)
- func (c *Client) UpdateLogStoreV2(project string, logstore *LogStore) (err error)
- func (c *Client) UpdateLogging(project string, detail *Logging) error
- func (c *Client) UpdateMachineGroup(project string, m *MachineGroup) (err error)
- func (c *Client) UpdateMetricAggRules(project string, aggRules *MetricAggRules) error
- func (c *Client) UpdateMetricStore(project string, metricStore *LogStore) error
- func (c *Client) UpdateProject(name, description string) (*LogProject, error)
- func (c *Client) UpdateProjectPolicy(project string, policy string) error
- func (c *Client) UpdateResource(resource *Resource) error
- func (c *Client) UpdateResourceRecord(resourceName string, record *ResourceRecord) error
- func (c *Client) UpdateResourceRecordString(resourceName, recordStr string) error
- func (c *Client) UpdateResourceString(resourceName, resourceStr string) error
- func (c *Client) UpdateSavedSearch(project string, savedSearch *SavedSearch) error
- func (c *Client) UpdateScheduledSQL(project string, scheduledsql *ScheduledSQL) error
- func (c *Client) UpdateSubStore(project, logstore string, sss *SubStore) (err error)
- func (c *Client) UpdateSubStoreTTL(project, logstore string, ttl int) (err error)
- type ClientInterface
- type Column
- type ColumnStorageContentDetail
- type CommonConfigInputDetail
- type ConditionConfiguration
- type ConditionOperation
- type ConfigPluginCanal
- type ConfigPluginDockerStdout
- type ConsumerGroup
- type ConsumerGroupCheckPoint
- type CsvContentDetail
- type Dashboard
- type DataFormat
- type DataSink
- type DataSinkType
- type DataSource
- type DataSourceType
- type DelimitedTextFormat
- type DelimiterConfigInputDetail
- type ETL
- type ETLConfiguration
- type ETLJob
- type ETLSchedule
- type ETLSink
- type EncryptConf
- type EncryptUserCmkConf
- type Error
- type EtlMeta
- type Export
- type ExportConfiguration
- type ExportVersion
- type FunctionConfig
- type GetContextLogsResponse
- type GetHistogramsResponse
- type GetLogLinesResponse
- type GetLogRequest
- type GetLogsResponse
- type GetLogsV3Response
- type GetLogsV3ResponseMeta
- type GlobalConfig
- type GroupConfiguration
- type Index
- type IndexKey
- type IndexLine
- type Ingestion
- type IngestionConfiguration
- type IngestionGeneralSource
- type InputDetail
- type InputDetailInterface
- type InstanceStatus
- type JSONConfigInputDetail
- type JSONFormat
- type JobLogConfig
- type JobType
- type JoinConfiguration
- type JsonContentDetail
- type JsonKey
- type KafkaPosition
- type KafkaSource
- type KafkaValueType
- type LineFormat
- type ListETLResponse
- type LocalFileConfigInputDetail
- type Log
- func (*Log) Descriptor() ([]byte, []int)
- func (m *Log) GetContents() []*LogContent
- func (m *Log) GetTime() uint32
- func (m *Log) Marshal() (dAtA []byte, err error)
- func (m *Log) MarshalTo(dAtA []byte) (int, error)
- func (*Log) ProtoMessage()
- func (m *Log) Reset()
- func (m *Log) Size() (n int)
- func (m *Log) String() string
- func (m *Log) Unmarshal(dAtA []byte) error
- type LogConfig
- type LogConfigPluginInput
- type LogContent
- func (*LogContent) Descriptor() ([]byte, []int)
- func (m *LogContent) GetKey() string
- func (m *LogContent) GetValue() string
- func (m *LogContent) Marshal() (dAtA []byte, err error)
- func (m *LogContent) MarshalTo(dAtA []byte) (int, error)
- func (*LogContent) ProtoMessage()
- func (m *LogContent) Reset()
- func (m *LogContent) Size() (n int)
- func (m *LogContent) String() string
- func (m *LogContent) Unmarshal(dAtA []byte) error
- type LogGroup
- func (*LogGroup) Descriptor() ([]byte, []int)
- func (m *LogGroup) GetCategory() string
- func (m *LogGroup) GetLogTags() []*LogTag
- func (m *LogGroup) GetLogs() []*Log
- func (m *LogGroup) GetMachineUUID() string
- func (m *LogGroup) GetSource() string
- func (m *LogGroup) GetTopic() string
- func (m *LogGroup) Marshal() (dAtA []byte, err error)
- func (m *LogGroup) MarshalTo(dAtA []byte) (int, error)
- func (*LogGroup) ProtoMessage()
- func (m *LogGroup) Reset()
- func (m *LogGroup) Size() (n int)
- func (m *LogGroup) String() string
- func (m *LogGroup) Unmarshal(dAtA []byte) error
- type LogGroupList
- func (*LogGroupList) Descriptor() ([]byte, []int)
- func (m *LogGroupList) GetLogGroups() []*LogGroup
- func (m *LogGroupList) Marshal() (dAtA []byte, err error)
- func (m *LogGroupList) MarshalTo(dAtA []byte) (int, error)
- func (*LogGroupList) ProtoMessage()
- func (m *LogGroupList) Reset()
- func (m *LogGroupList) Size() (n int)
- func (m *LogGroupList) String() string
- func (m *LogGroupList) Unmarshal(dAtA []byte) error
- type LogProject
- func (p *LogProject) ApplyConfigToMachineGroup(confName, groupName string) (err error)
- func (p *LogProject) CheckConfigExist(name string) (bool, error)
- func (p *LogProject) CheckLogstoreExist(name string) (bool, error)
- func (p *LogProject) CheckMachineGroupExist(name string) (bool, error)
- func (p *LogProject) CreateConfig(c *LogConfig) (err error)
- func (p *LogProject) CreateConfigString(c string) (err error)
- func (p *LogProject) CreateETLJob(j *ETLJob) error
- func (p *LogProject) CreateEtlMeta(etlMeta *EtlMeta) (err error)
- func (p *LogProject) CreateLogStore(name string, ttl, shardCnt int, autoSplit bool, maxSplitShard int) error
- func (p *LogProject) CreateLogStoreV2(logstore *LogStore) error
- func (p *LogProject) CreateLogging(detail *Logging) (err error)
- func (p *LogProject) CreateMachineGroup(m *MachineGroup) error
- func (p *LogProject) DeleteConfig(name string) (err error)
- func (p *LogProject) DeleteETLJob(name string) error
- func (p *LogProject) DeleteEtlMeta(etlMetaName, etlMetaKey string) (err error)
- func (p *LogProject) DeleteLogStore(name string) (err error)
- func (p *LogProject) DeleteLogging() (err error)
- func (p *LogProject) DeleteMachineGroup(name string) (err error)
- func (p *LogProject) GetAppliedConfigs(groupName string) (confNames []string, err error)
- func (p *LogProject) GetAppliedMachineGroups(confName string) (groupNames []string, err error)
- func (p *LogProject) GetConfig(name string) (c *LogConfig, err error)
- func (p *LogProject) GetConfigString(name string) (c string, err error)
- func (p *LogProject) GetETLJob(name string) (*ETLJob, error)
- func (p *LogProject) GetEtlMeta(etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error)
- func (p *LogProject) GetLogStore(name string) (*LogStore, error)
- func (p *LogProject) GetLogging() (c *Logging, err error)
- func (p *LogProject) GetMachineGroup(name string) (m *MachineGroup, err error)
- func (p *LogProject) ListConfig(offset, size int) (cfgNames []string, total int, err error)
- func (p *LogProject) ListETLJobs() ([]string, error)
- func (p *LogProject) ListEtlMeta(etlMetaName string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (p *LogProject) ListEtlMetaName(offset, size int) (total int, count int, etlMetaNameList []string, err error)
- func (p *LogProject) ListEtlMetaWithTag(etlMetaName, etlMetaTag string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (p *LogProject) ListLogStore() ([]string, error)
- func (p *LogProject) ListLogStoreV2(offset, size int, telemetryType string) ([]string, error)
- func (p *LogProject) ListMachineGroup(offset, size int) (m []string, total int, err error)
- func (p *LogProject) RawRequest(method, uri string, headers map[string]string, body []byte) (*http.Response, error)
- func (p *LogProject) RemoveConfigFromMachineGroup(confName, groupName string) (err error)
- func (p *LogProject) UpdateConfig(c *LogConfig) (err error)
- func (p *LogProject) UpdateConfigString(configName, c string) (err error)
- func (p *LogProject) UpdateETLJob(name string, job *ETLJob) error
- func (p *LogProject) UpdateEtlMeta(etlMeta *EtlMeta) (err error)
- func (p *LogProject) UpdateLogStore(name string, ttl, shardCnt int) (err error)
- func (p *LogProject) UpdateLogStoreV2(logstore *LogStore) (err error)
- func (p *LogProject) UpdateLogging(detail *Logging) (err error)
- func (p *LogProject) UpdateMachineGroup(m *MachineGroup) (err error)
- func (p *LogProject) WithRequestTimeout(timeout time.Duration) *LogProject
- func (p *LogProject) WithRetryTimeout(timeout time.Duration) *LogProject
- func (p *LogProject) WithToken(token string) (*LogProject, error)
- type LogStore
- func (s *LogStore) CheckIndexExist() (bool, error)
- func (s *LogStore) CreateIndex(index Index) error
- func (s *LogStore) CreateIndexString(indexStr string) error
- func (s *LogStore) CreateShipper(shipper *Shipper) error
- func (s *LogStore) DeleteIndex() error
- func (s *LogStore) DeleteShipper(shipperName string) error
- func (s *LogStore) GetContextLogs(backLines int32, forwardLines int32, packID string, packMeta string) (*GetContextLogsResponse, error)
- func (s *LogStore) GetCursor(shardID int, from string) (cursor string, err error)
- func (s *LogStore) GetHistograms(topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
- func (s *LogStore) GetHistogramsToCompleted(topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
- func (s *LogStore) GetIndex() (*Index, error)
- func (s *LogStore) GetIndexString() (string, error)
- func (s *LogStore) GetLogLines(topic string, from int64, to int64, queryExp string, maxLineNum int64, ...) (*GetLogLinesResponse, error)
- func (s *LogStore) GetLogLinesV2(req *GetLogRequest) (*GetLogLinesResponse, error)
- func (s *LogStore) GetLogs(topic string, from int64, to int64, queryExp string, maxLineNum int64, ...) (*GetLogsResponse, error)
- func (s *LogStore) GetLogsBytes(shardID int, cursor, endCursor string, logGroupMaxCount int) (out []byte, nextCursor string, err error)
- func (s *LogStore) GetLogsToCompleted(topic string, from int64, to int64, queryExp string, maxLineNum int64, ...) (*GetLogsResponse, error)
- func (s *LogStore) GetLogsToCompletedV2(req *GetLogRequest) (*GetLogsResponse, error)
- func (s *LogStore) GetLogsV2(req *GetLogRequest) (*GetLogsResponse, error)
- func (s *LogStore) GetLogsV3(req *GetLogRequest) (*GetLogsV3Response, error)
- func (s *LogStore) GetShipper(shipperName string) (*Shipper, error)
- func (s *LogStore) ListShards() (shardIDs []*Shard, err error)
- func (s *LogStore) ListShipper() ([]string, error)
- func (s *LogStore) PostLogStoreLogs(lg *LogGroup, hashKey *string) (err error)
- func (s *LogStore) PullLogs(shardID int, cursor, endCursor string, logGroupMaxCount int) (gl *LogGroupList, nextCursor string, err error)
- func (s *LogStore) PutLogs(lg *LogGroup) (err error)
- func (s *LogStore) PutRawLog(rawLogData []byte) (err error)
- func (s *LogStore) SetPutLogCompressType(compressType int) error
- func (s *LogStore) UpdateIndex(index Index) error
- func (s *LogStore) UpdateIndexString(indexStr string) error
- func (s *LogStore) UpdateShipper(shipper *Shipper) error
- type LogTag
- func (*LogTag) Descriptor() ([]byte, []int)
- func (m *LogTag) GetKey() string
- func (m *LogTag) GetValue() string
- func (m *LogTag) Marshal() (dAtA []byte, err error)
- func (m *LogTag) MarshalTo(dAtA []byte) (int, error)
- func (*LogTag) ProtoMessage()
- func (m *LogTag) Reset()
- func (m *LogTag) Size() (n int)
- func (m *LogTag) String() string
- func (m *LogTag) Unmarshal(dAtA []byte) error
- type Logging
- type LoggingDetail
- type MachinGroupAttribute
- type Machine
- type MachineGroup
- type MachineList
- type MetricAggRuleItem
- type MetricAggRules
- type MultiLineFormat
- type Notification
- type OSSCompressionType
- type OSSContentType
- type OSSDataFormat
- type OSSDataFormatType
- type OSSShipperConfig
- type OrcContentDetail
- type OssStorageJsonDetail
- type OssStoreageCsvDetail
- type OssStoreageParquet
- type OutputDetail
- type ParquetConfig
- type ParquetContentDetail
- type ParquetFormat
- type PluginInputItem
- type PluginInterface
- type PluginLogConfigInputDetail
- type PolicyConfiguration
- type PowerSqlMode
- type RegexConfigInputDetail
- type Resource
- type ResourceActionPolicy
- type ResourceAlertPolicy
- type ResourceContentTemplate
- type ResourceFilterTag
- type ResourcePool
- type ResourceRecord
- type ResourceSchema
- type ResourceSchemaItem
- type ResourceTag
- type ResourceTagResponse
- type ResourceTags
- type ResourceTemplate
- type ResourceTemplates
- type ResourceUnTags
- type ResourceUser
- type ResourceUserGroup
- type ResourceWebhookHeader
- type ResponseDashboardItem
- type ResponseSavedSearchItem
- type SavedSearch
- type Schedule
- type ScheduledJob
- type ScheduledSQL
- type ScheduledSQLConfiguration
- type ScheduledSQLJobInstance
- type ScheduledSQLParameters
- type ScheduledSQLState
- type SensitiveKey
- type Severity
- type SeverityConfiguration
- type Shard
- type Shipper
- type ShipperStorage
- type Signer
- type SignerV1
- type SignerV4
- type SingleHistogram
- type SinkAlerthubConfiguration
- type SinkCmsConfiguration
- type SinkEventStoreConfiguration
- type SlsLogPackage
- func (*SlsLogPackage) Descriptor() ([]byte, []int)
- func (m *SlsLogPackage) GetData() []byte
- func (m *SlsLogPackage) GetUncompressSize() int32
- func (m *SlsLogPackage) Marshal() (dAtA []byte, err error)
- func (m *SlsLogPackage) MarshalTo(dAtA []byte) (int, error)
- func (*SlsLogPackage) ProtoMessage()
- func (m *SlsLogPackage) Reset()
- func (m *SlsLogPackage) Size() (n int)
- func (m *SlsLogPackage) String() string
- func (m *SlsLogPackage) Unmarshal(dAtA []byte) error
- type SlsLogPackageList
- func (*SlsLogPackageList) Descriptor() ([]byte, []int)
- func (m *SlsLogPackageList) GetPackages() []*SlsLogPackage
- func (m *SlsLogPackageList) Marshal() (dAtA []byte, err error)
- func (m *SlsLogPackageList) MarshalTo(dAtA []byte) (int, error)
- func (*SlsLogPackageList) ProtoMessage()
- func (m *SlsLogPackageList) Reset()
- func (m *SlsLogPackageList) Size() (n int)
- func (m *SlsLogPackageList) String() string
- func (m *SlsLogPackageList) Unmarshal(dAtA []byte) error
- type SourceConfig
- type SqlType
- type Status
- type StreamLogConfigInputDetail
- type StructureDataFormat
- type SubStore
- type SubStoreKey
- type Tag
- type TemplateConfiguration
- type Token
- type TokenAutoUpdateClient
- func (c *TokenAutoUpdateClient) ApplyConfigToMachineGroup(project string, confName, groupName string) (err error)
- func (c *TokenAutoUpdateClient) CheckConfigExist(project string, config string) (ok bool, err error)
- func (c *TokenAutoUpdateClient) CheckLogstoreExist(project string, logstore string) (ok bool, err error)
- func (c *TokenAutoUpdateClient) CheckMachineGroupExist(project string, machineGroup string) (ok bool, err error)
- func (c *TokenAutoUpdateClient) CheckProjectExist(name string) (ok bool, err error)
- func (c *TokenAutoUpdateClient) Close() error
- func (c *TokenAutoUpdateClient) CreateAlert(project string, alert *Alert) (err error)
- func (c *TokenAutoUpdateClient) CreateAlertString(project string, alert string) (err error)
- func (c *TokenAutoUpdateClient) CreateChart(project, dashboardName string, chart Chart) (err error)
- func (c *TokenAutoUpdateClient) CreateConfig(project string, config *LogConfig) (err error)
- func (c *TokenAutoUpdateClient) CreateConfigString(project string, config string) (err error)
- func (c *TokenAutoUpdateClient) CreateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
- func (c *TokenAutoUpdateClient) CreateDashboard(project string, dashboard Dashboard) (err error)
- func (c *TokenAutoUpdateClient) CreateDashboardString(project string, dashboardStr string) (err error)
- func (c *TokenAutoUpdateClient) CreateETL(project string, etljob ETL) (err error)
- func (c *TokenAutoUpdateClient) CreateEtlMeta(project string, etlMeta *EtlMeta) (err error)
- func (c *TokenAutoUpdateClient) CreateEventStore(project string, eventStore *LogStore) (err error)
- func (c *TokenAutoUpdateClient) CreateExport(project string, export *Export) (err error)
- func (c *TokenAutoUpdateClient) CreateIndex(project, logstore string, index Index) (err error)
- func (c *TokenAutoUpdateClient) CreateIndexString(project, logstore string, index string) (err error)
- func (c *TokenAutoUpdateClient) CreateIngestion(project string, ingestion *Ingestion) (err error)
- func (c *TokenAutoUpdateClient) CreateLogStore(project string, logstore string, ttl, shardCnt int, autoSplit bool, ...) (err error)
- func (c *TokenAutoUpdateClient) CreateLogStoreV2(project string, logstore *LogStore) (err error)
- func (c *TokenAutoUpdateClient) CreateMachineGroup(project string, m *MachineGroup) (err error)
- func (c *TokenAutoUpdateClient) CreateMetricStore(project string, metricStore *LogStore) (err error)
- func (c *TokenAutoUpdateClient) CreateProject(name, description string) (prj *LogProject, err error)
- func (c *TokenAutoUpdateClient) CreateResource(resource *Resource) (err error)
- func (c *TokenAutoUpdateClient) CreateResourceRecord(resourceName string, record *ResourceRecord) (err error)
- func (c *TokenAutoUpdateClient) CreateResourceRecordString(resourceName, recordStr string) (err error)
- func (c *TokenAutoUpdateClient) CreateResourceString(resourceStr string) (err error)
- func (c *TokenAutoUpdateClient) CreateSavedSearch(project string, savedSearch *SavedSearch) (err error)
- func (c *TokenAutoUpdateClient) CreateScheduledSQL(project string, scheduledsql *ScheduledSQL) (err error)
- func (c *TokenAutoUpdateClient) DeleteAlert(project string, alertName string) (err error)
- func (c *TokenAutoUpdateClient) DeleteChart(project, dashboardName, chartName string) (err error)
- func (c *TokenAutoUpdateClient) DeleteConfig(project string, config string) (err error)
- func (c *TokenAutoUpdateClient) DeleteConsumerGroup(project, logstore string, cgName string) (err error)
- func (c *TokenAutoUpdateClient) DeleteDashboard(project, name string) (err error)
- func (c *TokenAutoUpdateClient) DeleteETL(project string, etlName string) (err error)
- func (c *TokenAutoUpdateClient) DeleteEtlMeta(project string, etlMetaName, etlMetaKey string) (err error)
- func (c *TokenAutoUpdateClient) DeleteEventStore(project, name string) (err error)
- func (c *TokenAutoUpdateClient) DeleteExport(project string, name string) (err error)
- func (c *TokenAutoUpdateClient) DeleteIndex(project, logstore string) (err error)
- func (c *TokenAutoUpdateClient) DeleteIngestion(project string, name string) (err error)
- func (c *TokenAutoUpdateClient) DeleteLogStore(project string, logstore string) (err error)
- func (c *TokenAutoUpdateClient) DeleteMachineGroup(project string, machineGroup string) (err error)
- func (c *TokenAutoUpdateClient) DeleteMetricStore(project, name string) (err error)
- func (c *TokenAutoUpdateClient) DeleteProject(name string) (err error)
- func (c *TokenAutoUpdateClient) DeleteProjectPolicy(project string) (err error)
- func (c *TokenAutoUpdateClient) DeleteResource(name string) (err error)
- func (c *TokenAutoUpdateClient) DeleteResourceRecord(resourceName, recordId string) (err error)
- func (c *TokenAutoUpdateClient) DeleteSavedSearch(project string, savedSearchName string) (err error)
- func (c *TokenAutoUpdateClient) DeleteScheduledSQL(project string, name string) (err error)
- func (c *TokenAutoUpdateClient) DisableAlert(project string, alertName string) (err error)
- func (c *TokenAutoUpdateClient) EnableAlert(project string, alertName string) (err error)
- func (c *TokenAutoUpdateClient) GetAlert(project string, alertName string) (alert *Alert, err error)
- func (c *TokenAutoUpdateClient) GetAlertString(project string, alertName string) (alert string, err error)
- func (c *TokenAutoUpdateClient) GetAppliedConfigs(project string, groupName string) (confNames []string, err error)
- func (c *TokenAutoUpdateClient) GetAppliedMachineGroups(project string, confName string) (groupNames []string, err error)
- func (c *TokenAutoUpdateClient) GetChart(project, dashboardName, chartName string) (chart *Chart, err error)
- func (c *TokenAutoUpdateClient) GetCheckpoint(project, logstore string, cgName string) (checkPointList []*ConsumerGroupCheckPoint, err error)
- func (c *TokenAutoUpdateClient) GetConfig(project string, config string) (logConfig *LogConfig, err error)
- func (c *TokenAutoUpdateClient) GetConfigString(project string, config string) (logConfig string, err error)
- func (c *TokenAutoUpdateClient) GetCursor(project, logstore string, shardID int, from string) (cursor string, err error)
- func (c *TokenAutoUpdateClient) GetCursorTime(project, logstore string, shardID int, cursor string) (cursorTime time.Time, err error)
- func (c *TokenAutoUpdateClient) GetDashboard(project, name string) (dashboard *Dashboard, err error)
- func (c *TokenAutoUpdateClient) GetDashboardString(project, name string) (dashboard string, err error)
- func (c *TokenAutoUpdateClient) GetETL(project string, etlName string) (ETLJob *ETL, err error)
- func (c *TokenAutoUpdateClient) GetEtlMeta(project string, etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error)
- func (c *TokenAutoUpdateClient) GetEventStore(project, name string) (eventStore *LogStore, err error)
- func (c *TokenAutoUpdateClient) GetExport(project, name string) (export *Export, err error)
- func (c *TokenAutoUpdateClient) GetHistograms(project, logstore string, topic string, from int64, to int64, queryExp string) (h *GetHistogramsResponse, err error)
- func (c *TokenAutoUpdateClient) GetHistogramsToCompleted(project, logstore string, topic string, from int64, to int64, queryExp string) (h *GetHistogramsResponse, err error)
- func (c *TokenAutoUpdateClient) GetIndex(project, logstore string) (index *Index, err error)
- func (c *TokenAutoUpdateClient) GetIndexString(project, logstore string) (index string, err error)
- func (c *TokenAutoUpdateClient) GetIngestion(project string, name string) (ingestion *Ingestion, err error)
- func (c *TokenAutoUpdateClient) GetLogLines(project, logstore string, topic string, from int64, to int64, queryExp string, ...) (r *GetLogLinesResponse, err error)
- func (c *TokenAutoUpdateClient) GetLogLinesV2(project, logstore string, req *GetLogRequest) (r *GetLogLinesResponse, err error)
- func (c *TokenAutoUpdateClient) GetLogStore(project string, logstore string) (logstoreRst *LogStore, err error)
- func (c *TokenAutoUpdateClient) GetLogs(project, logstore string, topic string, from int64, to int64, queryExp string, ...) (r *GetLogsResponse, err error)
- func (c *TokenAutoUpdateClient) GetLogsBytes(project, logstore string, shardID int, cursor, endCursor string, ...) (out []byte, nextCursor string, err error)
- func (c *TokenAutoUpdateClient) GetLogsToCompleted(project, logstore string, topic string, from int64, to int64, queryExp string, ...) (r *GetLogsResponse, err error)
- func (c *TokenAutoUpdateClient) GetLogsToCompletedV2(project, logstore string, req *GetLogRequest) (r *GetLogsResponse, err error)
- func (c *TokenAutoUpdateClient) GetLogsV2(project, logstore string, req *GetLogRequest) (r *GetLogsResponse, err error)
- func (c *TokenAutoUpdateClient) GetLogsV3(project, logstore string, req *GetLogRequest) (r *GetLogsV3Response, err error)
- func (c *TokenAutoUpdateClient) GetMachineGroup(project string, machineGroup string) (m *MachineGroup, err error)
- func (c *TokenAutoUpdateClient) GetMetricStore(project, name string) (metricStore *LogStore, err error)
- func (c *TokenAutoUpdateClient) GetProject(name string) (prj *LogProject, err error)
- func (c *TokenAutoUpdateClient) GetProjectPolicy(project string) (policy string, err error)
- func (c *TokenAutoUpdateClient) GetResource(name string) (resource *Resource, err error)
- func (c *TokenAutoUpdateClient) GetResourceRecord(resourceName, recordId string) (record *ResourceRecord, err error)
- func (c *TokenAutoUpdateClient) GetResourceRecordString(resourceName, name string) (record string, err error)
- func (c *TokenAutoUpdateClient) GetResourceString(name string) (resource string, err error)
- func (c *TokenAutoUpdateClient) GetSavedSearch(project string, savedSearchName string) (savedSearch *SavedSearch, err error)
- func (c *TokenAutoUpdateClient) GetScheduledSQL(project string, name string) (s *ScheduledSQL, err error)
- func (c *TokenAutoUpdateClient) GetScheduledSQLJobInstance(projectName, jobName, instanceId string, result bool) (instance *ScheduledSQLJobInstance, err error)
- func (c *TokenAutoUpdateClient) HeartBeat(project, logstore string, cgName, consumer string, heartBeatShardIDs []int) (shardIDs []int, err error)
- func (c *TokenAutoUpdateClient) ListAlert(project string, alertName string, dashboard string, offset, size int) (alerts []*Alert, total int, count int, err error)
- func (c *TokenAutoUpdateClient) ListConfig(project string, offset, size int) (cfgNames []string, total int, err error)
- func (c *TokenAutoUpdateClient) ListConsumerGroup(project, logstore string) (cgList []*ConsumerGroup, err error)
- func (c *TokenAutoUpdateClient) ListDashboard(project string, dashboardName string, offset, size int) (dashboardList []string, count, total int, err error)
- func (c *TokenAutoUpdateClient) ListDashboardV2(project string, dashboardName string, offset, size int) (dashboardList []string, dashboardItems []ResponseDashboardItem, ...)
- func (c *TokenAutoUpdateClient) ListETL(project string, offset int, size int) (ETLResponse *ListETLResponse, err error)
- func (c *TokenAutoUpdateClient) ListEtlMeta(project string, etlMetaName string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (c *TokenAutoUpdateClient) ListEtlMetaName(project string, offset, size int) (total int, count int, etlMetaNameList []string, err error)
- func (c *TokenAutoUpdateClient) ListEtlMetaWithTag(project string, etlMetaName, etlMetaTag string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (c *TokenAutoUpdateClient) ListEventStore(project string, offset, size int) (eventStores []string, err error)
- func (c *TokenAutoUpdateClient) ListExport(project, logstore, name, displayName string, offset, size int) (exports []*Export, total, count int, err error)
- func (c *TokenAutoUpdateClient) ListIngestion(project, logstore, name, displayName string, offset, size int) (ingestions []*Ingestion, total, count int, err error)
- func (c *TokenAutoUpdateClient) ListLogStore(project string) (logstoreList []string, err error)
- func (c *TokenAutoUpdateClient) ListMachineGroup(project string, offset, size int) (m []string, total int, err error)
- func (c *TokenAutoUpdateClient) ListMachines(project, machineGroupName string) (ms []*Machine, total int, err error)
- func (c *TokenAutoUpdateClient) ListProject() (projectNames []string, err error)
- func (c *TokenAutoUpdateClient) ListProjectV2(offset, size int) (projects []LogProject, count, total int, err error)
- func (c *TokenAutoUpdateClient) ListResource(resourceType string, resourceName string, offset, size int) (resourceList []*Resource, count, total int, err error)
- func (c *TokenAutoUpdateClient) ListResourceRecord(resourceName string, offset, size int) (recordList []*ResourceRecord, count, total int, err error)
- func (c *TokenAutoUpdateClient) ListSavedSearch(project string, savedSearchName string, offset, size int) (savedSearches []string, total int, count int, err error)
- func (c *TokenAutoUpdateClient) ListSavedSearchV2(project string, savedSearchName string, offset, size int) (savedSearches []string, savedsearchItems []ResponseSavedSearchItem, total int, ...)
- func (c *TokenAutoUpdateClient) ListScheduledSQL(project, name, displayName string, offset, size int) (scheduledsqls []*ScheduledSQL, total, count int, err error)
- func (c *TokenAutoUpdateClient) ListScheduledSQLJobInstances(projectName, jobName string, status *InstanceStatus) (instances []*ScheduledSQLJobInstance, total, count int64, err error)
- func (c *TokenAutoUpdateClient) ListShards(project, logstore string) (shardIDs []*Shard, err error)
- func (c *TokenAutoUpdateClient) ListTagResources(project string, resourceType string, resourceIDs []string, ...) (respTags []*ResourceTagResponse, respNextToken string, err error)
- func (c *TokenAutoUpdateClient) MergeShards(project, logstore string, shardID int) (shards []*Shard, err error)
- func (c *TokenAutoUpdateClient) ModifyScheduledSQLJobInstanceState(projectName, jobName, instanceId string, state ScheduledSQLState) (err error)
- func (c *TokenAutoUpdateClient) PostLogStoreLogs(project, logstore string, lg *LogGroup, hashKey *string) (err error)
- func (c *TokenAutoUpdateClient) PublishAlertEvent(project string, alertResult []byte) error
- func (c *TokenAutoUpdateClient) PullLogs(project, logstore string, shardID int, cursor, endCursor string, ...) (gl *LogGroupList, nextCursor string, err error)
- func (c *TokenAutoUpdateClient) PutLogs(project, logstore string, lg *LogGroup) (err error)
- func (c *TokenAutoUpdateClient) PutLogsWithCompressType(project, logstore string, lg *LogGroup, compressType int) (err error)
- func (c *TokenAutoUpdateClient) PutRawLogWithCompressType(project, logstore string, rawLogData []byte, compressType int) (err error)
- func (c *TokenAutoUpdateClient) RemoveConfigFromMachineGroup(project string, confName, groupName string) (err error)
- func (c *TokenAutoUpdateClient) ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string)
- func (c *TokenAutoUpdateClient) RestartETL(project string, etljob ETL) (err error)
- func (c *TokenAutoUpdateClient) RestartExport(project string, export *Export) (err error)
- func (c *TokenAutoUpdateClient) SetAuthVersion(version AuthVersionType)
- func (c *TokenAutoUpdateClient) SetHTTPClient(client *http.Client)
- func (c *TokenAutoUpdateClient) SetRegion(region string)
- func (c *TokenAutoUpdateClient) SetUserAgent(userAgent string)
- func (c *TokenAutoUpdateClient) SplitNumShard(project, logstore string, shardID, shardNum int) (shards []*Shard, err error)
- func (c *TokenAutoUpdateClient) SplitShard(project, logstore string, shardID int, splitKey string) (shards []*Shard, err error)
- func (c *TokenAutoUpdateClient) StartETL(project string, name string) (err error)
- func (c *TokenAutoUpdateClient) StopETL(project string, name string) (err error)
- func (c *TokenAutoUpdateClient) TagResources(project string, tags *ResourceTags) (err error)
- func (c *TokenAutoUpdateClient) UnTagResources(project string, tags *ResourceUnTags) (err error)
- func (c *TokenAutoUpdateClient) UpdateAlert(project string, alert *Alert) (err error)
- func (c *TokenAutoUpdateClient) UpdateAlertString(project string, alertName, alert string) (err error)
- func (c *TokenAutoUpdateClient) UpdateChart(project, dashboardName string, chart Chart) (err error)
- func (c *TokenAutoUpdateClient) UpdateCheckpoint(project, logstore string, cgName string, consumer string, shardID int, ...) (err error)
- func (c *TokenAutoUpdateClient) UpdateConfig(project string, config *LogConfig) (err error)
- func (c *TokenAutoUpdateClient) UpdateConfigString(project string, configName, configDetail string) (err error)
- func (c *TokenAutoUpdateClient) UpdateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
- func (c *TokenAutoUpdateClient) UpdateDashboard(project string, dashboard Dashboard) (err error)
- func (c *TokenAutoUpdateClient) UpdateDashboardString(project string, dashboardName, dashboardStr string) (err error)
- func (c *TokenAutoUpdateClient) UpdateETL(project string, etljob ETL) (err error)
- func (c *TokenAutoUpdateClient) UpdateEtlMeta(project string, etlMeta *EtlMeta) (err error)
- func (c *TokenAutoUpdateClient) UpdateEventStore(project string, eventStore *LogStore) (err error)
- func (c *TokenAutoUpdateClient) UpdateExport(project string, export *Export) (err error)
- func (c *TokenAutoUpdateClient) UpdateIndex(project, logstore string, index Index) (err error)
- func (c *TokenAutoUpdateClient) UpdateIndexString(project, logstore string, index string) (err error)
- func (c *TokenAutoUpdateClient) UpdateIngestion(project string, ingestion *Ingestion) (err error)
- func (c *TokenAutoUpdateClient) UpdateLogStore(project string, logstore string, ttl, shardCnt int) (err error)
- func (c *TokenAutoUpdateClient) UpdateLogStoreV2(project string, logstore *LogStore) (err error)
- func (c *TokenAutoUpdateClient) UpdateMachineGroup(project string, m *MachineGroup) (err error)
- func (c *TokenAutoUpdateClient) UpdateMetricStore(project string, metricStore *LogStore) (err error)
- func (c *TokenAutoUpdateClient) UpdateProject(name, description string) (prj *LogProject, err error)
- func (c *TokenAutoUpdateClient) UpdateProjectPolicy(project, policy string) (err error)
- func (c *TokenAutoUpdateClient) UpdateResource(resource *Resource) (err error)
- func (c *TokenAutoUpdateClient) UpdateResourceRecord(resourceName string, record *ResourceRecord) (err error)
- func (c *TokenAutoUpdateClient) UpdateResourceRecordString(resourceName, recordStr string) (err error)
- func (c *TokenAutoUpdateClient) UpdateResourceString(resourceName, resourceStr string) (err error)
- func (c *TokenAutoUpdateClient) UpdateSavedSearch(project string, savedSearch *SavedSearch) (err error)
- func (c *TokenAutoUpdateClient) UpdateScheduledSQL(project string, scheduledsql *ScheduledSQL) (err error)
- type TriggerConfig
- type UpdateTokenFunction
- type WebhookIntegration
Constants ¶
const ( Compress_LZ4 = iota // 0 Compress_None // 1 Compress_Max // max compress type(just for filter invalid compress type) )
compress type
const ( NotificationTypeSMS = "SMS" NotificationTypeWebhook = "Webhook" NotificationTypeDingTalk = "DingTalk" NotificationTypeEmail = "Email" NotificationTypeMessageCenter = "MessageCenter" )
const ( JoinTypeCross = "cross_join" JoinTypeInner = "inner_join" JoinTypeLeft = "left_join" JoinTypeRight = "right_join" JoinTypeFull = "full_join" JoinTypeLeftExclude = "left_exclude" JoinTypeRightExclude = "right_exclude" JoinTypeConcat = "concat" JoinTypeNo = "no_join" )
const ( GroupTypeNoGroup = "no_group" GroupTypeLabelsAuto = "labels_auto" GroupTypeCustom = "custom" )
const ( ScheduleTypeFixedRate = "FixedRate" ScheduleTypeHourly = "Hourly" ScheduleTypeDaily = "Daily" ScheduleTypeWeekly = "Weekly" ScheduleTypeCron = "Cron" ScheduleTypeDayRun = "DryRun" ScheduleTypeResident = "Resident" )
const ( StoreTypeLog = "log" StoreTypeMetric = "metric" StoreTypeMeta = "meta" )
const ( ResourceNameAlertPolicy = "sls.alert.alert_policy" ResourceNameActionPolicy = "sls.alert.action_policy" ResourceNameUser = "sls.common.user" ResourceNameUserGroup = "sls.common.user_group" ResourceNameContentTemplate = "sls.alert.content_template" ResourceNameGlobalConfig = "sls.alert.global_config" ResourceNameWebhookIntegration = "sls.alert.action_webhook" )
const ( EventStoreTelemetryType = "Event" EventStoreIndex = `` /* 3395-byte string literal not displayed */ )
const ( DataSourceOSS DataSourceType = "AliyunOSS" DataSourceBSS DataSourceType = "AliyunBSS" DataSourceMaxCompute DataSourceType = "AliyunMaxCompute" DataSourceJDBC DataSourceType = "JDBC" DataSourceKafka DataSourceType = "Kafka" DataSourceCMS DataSourceType = "AliyunCloudMonitor" DataSourceGeneral DataSourceType = "General" OSSDataFormatTypeLine OSSDataFormatType = "Line" OSSDataFormatTypeMultiline OSSDataFormatType = "Multiline" OSSDataFormatTypeJSON OSSDataFormatType = "JSON" OSSDataFormatTypeParquet OSSDataFormatType = "Parquet" OSSDataFormatTypeDelimitedText OSSDataFormatType = "DelimitedText" KafkaValueTypeText KafkaValueType = "Text" KafkaValueTypeJSON KafkaValueType = "JSON" KafkaPositionGroupOffsets KafkaPosition = "GROUP_OFFSETS" KafkaPositionEarliest KafkaPosition = "EARLIEST" KafkaPositionLatest KafkaPosition = "LATEST" KafkaPositionTimeStamp KafkaPosition = "TIMESTAMP" DataSinkLOG DataSinkType = "AliyunLOG" DataSinkOSS DataSinkType = "AliyunOSS" DataSinkADB DataSinkType = "AliyunADB" DataSinkTSDB DataSinkType = "AliyunTSDB" DataSinkODPS DataSinkType = "AliyunODPS" DataSinkGENERAL DataSinkType = "General" OSSContentDetailTypeParquet OSSContentType = "parquet" OSSContentDetailTypeORC OSSContentType = "orc" OSSContentDetailTypeCSV OSSContentType = "csv" OSSContentDetailTypeJSON OSSContentType = "json" OSSCompressionTypeNone OSSCompressionType = "none" OSSCompressionTypeZstd OSSCompressionType = "zstd" OSSCompressionTypeGzip OSSCompressionType = "gzip" OSSCompressionTypeSnappy OSSCompressionType = "snappy" ExportVersion2 ExportVersion = "v2.0" // new versions of OSSExport, ODPSExport Version property must use this field, otherwise the service may be unavailable or incomplete )
const ( // MetricAggRulesSQL sql type MetricAggRulesSQL = "sql" // MetricAggRulesPromQL promql type MetricAggRulesPromQL = "promql" )
const ( // OffsetNewest stands for the log head offset, i.e. the offset that will be // assigned to the next message that will be produced to the shard. OffsetNewest = "end" // OffsetOldest stands for the oldest offset available on the logstore for a // shard. OffsetOldest = "begin" // ProgressHeader stands for the progress header in GetLogs response ProgressHeader = "X-Log-Progress" // GetLogsCountHeader stands for the count header in GetLogs response GetLogsCountHeader = "X-Log-Count" // RequestIDHeader stands for the requestID in all response RequestIDHeader = "x-log-requestid" GetLogsQueryInfo = "X-Log-Query-Info" BodyRawSize = "X-Log-Bodyrawsize" HasSQLHeader = "x-log-has-sql" ETLVersion = 2 ETLType = "ETL" ETLSinksType = "AliyunLOG" )
const ( //EtlMetaURI is etl meta uri EtlMetaURI = "etlmetas" //EtlMetaNameURI is etl meta name uri EtlMetaNameURI = "etlmetanames" //EtlMetaAllTagMatch is for search meta without tag filtering EtlMetaAllTagMatch = "__all_etl_meta_tag_match__" )
const ( InputTypeSyslog = "syslog" InputTypeStreamlog = "streamlog" InputTypePlugin = "plugin" InputTypeFile = "file" )
const InputTypes
const ( LogFileTypeApsaraLog = "apsara_log" LogFileTypeRegexLog = "common_reg_log" LogFileTypeJSONLog = "json_log" LogFileTypeDelimiterLog = "delimiter_log" )
const LogFileTypes
const ( MergeTypeTopic = "topic" MergeTypeLogstore = "logstore" )
const MergeType
const ( TopicFormatNone = "none" // no topic TopicFormatMachineGroup = "group_topic" // machine group's topic )
const ( PluginInputTypeDockerStdout = "service_docker_stdout" PPluginInputTypeCanal = "service_canal" )
const PluginInputType
const ( MachineIDTypeIP = "ip" MachineIDTypeUserDefined = "userdefined" )
const MachineIDTypes
const ( HTTPHeaderAuthorization = "Authorization" HTTPHeaderContentMD5 = "Content-MD5" HTTPHeaderContentType = "Content-Type" HTTPHeaderContentLength = "Content-Length" HTTPHeaderDate = "Date" HTTPHeaderHost = "Host" HTTPHeaderUserAgent = "User-Agent" HTTPHeaderAcsSecurityToken = "x-acs-security-token" HTTPHeaderAPIVersion = "x-log-apiversion" HTTPHeaderLogDate = "x-log-date" HTTPHeaderLogContentSha256 = "x-log-content-sha256" HTTPHeaderSignatureMethod = "x-log-signaturemethod" HTTPHeaderBodyRawSize = "x-log-bodyrawsize" )
const BAD_REQUEST = "BadRequest"
const CONFIG_ALREADY_EXIST = "ConfigAlreadyExist"
const CONFIG_NOT_EXIST = "ConfigNotExist"
const (
CountConditionKey = "__count__"
)
const DefaultLogUserAgent = "golang-sdk-v0.1.0"
const GROUP_ALREADY_EXIST = "GroupAlreadyExist"
const GROUP_NOT_EXIST = "GroupNotExist"
const INTERNAL_SERVER_ERROR = "InternalServerError"
const INVALID_API_VERSION = "InvalidAPIVersion"
const INVALID_BODY_RAW_SIZE = "InvalidBodyRawSize"
const INVALID_COMPRESS_TYPE = "InvalidCompressType"
const INVALID_CONTENT_TYPE = "InvalidContentType"
const INVALID_CURSOR = "InvalidCursor"
const INVALID_DATE_FORMAT = "InvalidDateFormat"
const INVALID_ENCODING = "InvalidEncoding"
const INVALID_KEY = "InvalidKey"
const INVALID_LINE = "InvalidLine"
const INVALID_LOGSTORE_QUERY = "InvalidLogStoreQuery"
const INVALID_OFFSET = "InvalidOffset"
const INVALID_PARAMETER = "InvalidParameter"
const INVALID_QUERY_STRING = "InvalidQueryString"
const INVALID_REVERSE = "InvalidReverse"
const INVALID_SIGNATURE_METHOD = "InvalidSignatureMethod"
const INVALID_TIMESTAMP = "InvalidTimestamp"
const INVALID_TIME_RANGE = "InvalidTimeRange"
const (
ISO8601 = "20060102T150405Z"
)
const LOGSTORE_ALREADY_EXIST = "LogStoreAlreadyExist"
const LOGSTORE_INFO_INVALID = "LogstoreInfoInvalid"
const LOGSTORE_NOT_EXIST = "LogStoreNotExist"
const LOGSTORE_WITHOUT_SHARD = "LogStoreWithoutShard"
const (
LoggingURI = "logging"
)
const MISSING_API_VERSION = "MissingAPIVersion"
const MISSING_BODY_RAW_SIZE = "MissingBodyRawSize"
const MISSING_CONTENT_LENGTH = "MissingContentLength"
const MISSING_CONTENT_TYPE = "MissingContentType"
const MISSING_DATE = "MissingDate"
const MISSING_HOST = "MissingHost"
const MISSING_SIGNATURE_METHOD = "MissingSignatureMethod"
const MISS_ACCESS_KEY_ID = "MissAccessKeyId"
const (
OSSShipperType = "oss"
)
const (
OutputTypeLogService = "LogService"
)
const OutputType
const PARAMETER_INVALID = "ParameterInvalid"
const POST_BODY_INVALID = "PostBodyInvalid"
const POST_BODY_TOO_LARGE = "PostBodyTooLarge"
const POST_BODY_UNCOMPRESS_ERROR = "PostBodyUncompressError"
const PROJECT_FORBIDDEN = "ProjectForbidden"
const PROJECT_NOT_EXIST = "ProjectNotExist"
const PROJECT_QUOTA_EXCEED = "ProjectQuotaExceed"
const READ_QUOTA_EXCEED = "ReadQuotaExceed"
const REQUEST_TIME_TOO_SKEWED = "RequestTimeTooSkewed"
const ResourceTypeUserDefine = "userdefine"
const SERVER_BUSY = "ServerBusy"
const SHARD_NOT_EXIST = "ShardNotExist"
const SHARD_READ_QUOTA_EXCEED = "ShardReadQuotaExceed"
const SHARD_WRITE_QUOTA_EXCEED = "ShardWriteQuotaExceed"
const SHIPPER_NOT_EXIST = "ShipperNotExist"
const SIGNATURE_NOT_MATCH = "SignatureNotMatch"
const UN_AUTHORIZED = "Unauthorized"
const WRITE_QUOTA_EXCEED = "WriteQuotaExceed"
Variables ¶
var ( ErrInvalidLengthLog = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLog = fmt.Errorf("proto: integer overflow") )
var GlobalDebugLevel = 0
var GlobalForceUsingHTTP = false
GlobalForceUsingHTTP if GlobalForceUsingHTTP is true, then all request will use HTTP(ignore LogProject's UsingHTTP flag)
var InvalidCompressError = errors.New("Invalid Compress Type")
var InvalidTypeError = errors.New("invalid config type")
var Logger = initDefaultSLSLogger()
var MaxCompletedRetryCount = 20
var MaxCompletedRetryLatency = 5 * time.Minute
var NoConfigFieldError = errors.New("no this config field")
var RetryOnServerErrorEnabled = true
RetryOnServerErrorEnabled if RetryOnServerErrorEnabled is false, then all error requests will not be retried
Functions ¶
func AddNecessaryApsaraLogInputConfigField ¶
func AddNecessaryApsaraLogInputConfigField(inputConfigDetail map[string]interface{})
func AddNecessaryDelimiterLogInputConfigField ¶
func AddNecessaryDelimiterLogInputConfigField(inputConfigDetail map[string]interface{})
func AddNecessaryInputConfigField ¶
func AddNecessaryInputConfigField(inputConfigDetail map[string]interface{})
AddNecessaryInputConfigField ...
func AddNecessaryJSONLogInputConfigField ¶
func AddNecessaryJSONLogInputConfigField(inputConfigDetail map[string]interface{})
func AddNecessaryLocalFileInputConfigField ¶
func AddNecessaryLocalFileInputConfigField(inputConfigDetail map[string]interface{})
func AddNecessaryRegexLogInputConfigField ¶
func AddNecessaryRegexLogInputConfigField(inputConfigDetail map[string]interface{})
func GenResourceId ¶
GenResourceId generate the resource id to tag (not used for project)
func GenerateInnerLogger ¶
func GetFileConfigInputDetailType ¶
func GetFileConfigInputDetailType(detail InputDetailInterface) (string, bool)
func InitApsaraLogConfigInputDetail ¶
func InitApsaraLogConfigInputDetail(detail *ApsaraLogConfigInputDetail)
InitApsaraLogConfigInputDetail ...
func InitCommonConfigInputDetail ¶
func InitCommonConfigInputDetail(detail *CommonConfigInputDetail)
InitCommonConfigInputDetail ...
func InitDelimiterConfigInputDetail ¶
func InitDelimiterConfigInputDetail(detail *DelimiterConfigInputDetail)
InitDelimiterConfigInputDetail ...
func InitJSONConfigInputDetail ¶
func InitJSONConfigInputDetail(detail *JSONConfigInputDetail)
InitJSONConfigInputDetail ...
func InitLocalFileConfigInputDetail ¶
func InitLocalFileConfigInputDetail(detail *LocalFileConfigInputDetail)
InitLocalFileConfigInputDetail ...
func InitPluginLogConfigInputDetail ¶
func InitPluginLogConfigInputDetail(detail *PluginLogConfigInputDetail)
InitPluginLogConfigInputDetail ...
func InitRegexConfigInputDetail ¶
func InitRegexConfigInputDetail(detail *RegexConfigInputDetail)
InitRegexConfigInputDetail ...
func InitStreamLogConfigInputDetail ¶
func InitStreamLogConfigInputDetail(detail *StreamLogConfigInputDetail)
InitStreamLogConfigInputDetail ...
func IsDebugLevelMatched ¶
func IsTokenError ¶
func IsValidInputType ¶
IsValidInputType check if specific inputType is valid
func JsonMarshal ¶
func JsonMarshal(v interface{}) string
func Retry ¶
Retry execute the input operation immediately at first, and do an exponential backoff retry when failed. The default max elapsed time is 15 minutes. The default retry intervals are shown below, in seconds.
1 0.5 [0.25, 0.75] 2 0.75 [0.375, 1.125] 3 1.125 [0.562, 1.687] 4 1.687 [0.8435, 2.53] 5 2.53 [1.265, 3.795] 6 3.795 [1.897, 5.692] 7 5.692 [2.846, 8.538] 8 8.538 [4.269, 12.807] 9 12.807 [6.403, 19.210]
... The signature of backoff.Operation is "func() error".
func RetryWithAttempt ¶
func RetryWithAttempt(ctx context.Context, maxAttempt int, o ConditionOperation) error
RetryWithAttempt ...
func RetryWithBackOff ¶
RetryWithBackOff ...
func RetryWithCondition ¶
RetryWithCondition ...
func UpdateInputConfigField ¶
func UpdateInputConfigField(detail InputDetailInterface, key string, val interface{}) error
UpdateInputConfigField ...
Types ¶
type Alert ¶
type Alert struct { Name string `json:"name"` DisplayName string `json:"displayName"` Description string `json:"description"` State string `json:"state"` Status string `json:"status"` Configuration *AlertConfiguration `json:"configuration"` Schedule *Schedule `json:"schedule"` CreateTime int64 `json:"createTime,omitempty"` LastModifiedTime int64 `json:"lastModifiedTime,omitempty"` }
func (*Alert) MarshalJSON ¶
type AlertConfiguration ¶
type AlertConfiguration struct { Condition string `json:"condition"` MuteUntil int64 `json:"muteUntil,omitempty"` NotificationList []*Notification `json:"notificationList"` NotifyThreshold int32 `json:"notifyThreshold"` Throttling string `json:"throttling"` Version string `json:"version"` Type string `json:"type"` TemplateConfiguration *TemplateConfiguration `json:"templateConfiguration"` Dashboard string `json:"dashboard"` Threshold int `json:"threshold"` NoDataFire bool `json:"noDataFire"` NoDataSeverity Severity `json:"noDataSeverity"` SendResolved bool `json:"sendResolved"` QueryList []*AlertQuery `json:"queryList"` Annotations []*Tag `json:"annotations"` Labels []*Tag `json:"labels"` SeverityConfigurations []*SeverityConfiguration `json:"severityConfigurations"` JoinConfigurations []*JoinConfiguration `json:"joinConfigurations"` GroupConfiguration GroupConfiguration `json:"groupConfiguration"` PolicyConfiguration PolicyConfiguration `json:"policyConfiguration"` AutoAnnotation bool `json:"autoAnnotation"` SinkEventStore *SinkEventStoreConfiguration `json:"sinkEventStore"` SinkCms *SinkCmsConfiguration `json:"sinkCms"` SinkAlerthub *SinkAlerthubConfiguration `json:"sinkAlerthub"` Tags []string `json:"tags,omitempty"` }
type AlertQuery ¶
type AlertQuery struct { ChartTitle string `json:"chartTitle"` LogStore string `json:"logStore"` Query string `json:"query"` TimeSpanType string `json:"timeSpanType"` Start string `json:"start"` End string `json:"end"` StoreType string `json:"storeType"` Project string `json:"project"` Store string `json:"store"` Region string `json:"region"` RoleArn string `json:"roleArn"` DashboardId string `json:"dashboardId"` PowerSqlMode PowerSqlMode `json:"powerSqlMode"` }
type AliyunBssSource ¶
type AliyunBssSource struct { DataSource RoleArn string `json:"roleARN"` HistoryMonth int64 `json:"historyMonth"` }
ingestion JDBC source
type AliyunCloudMonitorSource ¶
type AliyunCloudMonitorSource struct { DataSource AccessKeyID string `json:"accessKeyID"` AccessKeySecret string `json:"accessKeySecret"` StartTime int64 `json:"startTime"` Namespaces []string `json:"namespaces"` OutputType string `json:"outputType"` DelayTime int64 `json:"delayTime"` }
ingestion cloud monitor source
type AliyunGeneralSink ¶
type AliyunGeneralSink struct { Type DataSinkType `json:"type"` Fields map[string]interface{} `json:"fields"` }
func (*AliyunGeneralSink) DataSinkType ¶
func (_ *AliyunGeneralSink) DataSinkType() DataSinkType
type AliyunMaxComputeSource ¶
type AliyunMaxComputeSource struct { DataSource AccessKeyID string `json:"accessKeyID"` AccessKeySecret string `json:"accessKeySecret"` Endpoint string `json:"endpoint"` TunnelEndpoint string `json:"tunnelEndpoint,omitempty"` Project string `json:"project"` Table string `json:"table"` PartitionSpec string `json:"partitionSpec"` TimeField string `json:"timeField"` TimeFormat string `json:"timeFormat"` TimeZone string `json:"timeZone"` }
ingestion maxcompute source >>>
type AliyunODPSSink ¶
type AliyunODPSSink struct { Type DataSinkType `json:"type"` OdpsRolearn string `json:"odpsRolearn"` OdpsEndpoint string `json:"odpsEndpoint"` OdpsTunnelEndpoint string `json:"odpsTunnelEndpoint"` OdpsProject string `json:"odpsProject"` OdpsTable string `json:"odpsTable"` TimeZone string `json:"timeZone"` PartitionTimeFormat string `json:"partitionTimeFormat"` Fields []string `json:"fields"` PartitionColumn []string `json:"partitionColumn"` OdpsAccessKeyId string `json:"odpsAccessKeyId"` OdpsAccessSecret string `json:"odpsAccessAecret"` }
func (*AliyunODPSSink) DataSinkType ¶
func (_ *AliyunODPSSink) DataSinkType() DataSinkType
type AliyunOSSSink ¶
type AliyunOSSSink struct { Type DataSinkType `json:"type"` RoleArn string `json:"roleArn"` Bucket string `json:"bucket"` Prefix string `json:"prefix"` Suffix string `json:"suffix"` PathFormat string `json:"pathFormat"` PathFormatType string `json:"pathFormatType"` BufferSize int64 `json:"bufferSize"` BufferInterval int64 `json:"bufferInterval"` TimeZone string `json:"timeZone"` ContentType OSSContentType `json:"contentType"` CompressionType OSSCompressionType `json:"compressionType"` //CsvContentDetail, JsonContentDetail, ParquetContentDetail, OrcContentDetail // the old version ContentDetail is st ring(struct serialized string), and now we highly recommend you use the struct ContentDetail directly ContentDetail interface{} `json:"contentDetail"` }
func (*AliyunOSSSink) DataSinkType ¶
func (_ *AliyunOSSSink) DataSinkType() DataSinkType
type AliyunOSSSource ¶
type AliyunOSSSource struct { DataSource Bucket string `json:"bucket"` Endpoint string `json:"endpoint"` RoleArn string `json:"roleARN"` Prefix string `json:"prefix,omitempty"` Pattern string `json:"pattern,omitempty"` CompressionCodec string `json:"compressionCodec,omitempty"` Encoding string `json:"encoding,omitempty"` Format interface{} `json:"format,omitempty"` RestoreObjectEnable bool `json:"restoreObjectEnable"` LastModifyTimeAsLogTime bool `json:"lastModifyTimeAsLogTime"` }
type ApsaraLogConfigInputDetail ¶
type ApsaraLogConfigInputDetail struct { LocalFileConfigInputDetail LogBeginRegex string `json:"logBeginRegex"` }
ApsaraLogConfigInputDetail apsara log config
func ConvertToApsaraLogConfigInputDetail ¶
func ConvertToApsaraLogConfigInputDetail(detail InputDetailInterface) (*ApsaraLogConfigInputDetail, bool)
type AuthVersionType ¶
type AuthVersionType string
AuthVersionType the version of auth
const ( // AuthV1 v1 AuthV1 AuthVersionType = "v1" // AuthV4 v4 AuthV4 AuthVersionType = "v4" )
type BadResponseError ¶
BadResponseError : special sls error, not valid json format
func NewBadResponseError ¶
func NewBadResponseError(body string, header map[string][]string, httpCode int) *BadResponseError
NewBadResponseError ...
func (BadResponseError) Error ¶
func (e BadResponseError) Error() string
func (BadResponseError) String ¶
func (e BadResponseError) String() string
type Chart ¶
type Chart struct { Title string `json:"title"` Type string `json:"type"` Search ChartSearch `json:"search"` Display ChartDisplay `json:"display"` }
type ChartDisplay ¶
type ChartSearch ¶
type Client ¶
type Client struct { Endpoint string // IP or hostname of SLS endpoint AccessKeyID string AccessKeySecret string SecurityToken string UserAgent string // default defaultLogUserAgent RequestTimeOut time.Duration RetryTimeOut time.Duration HTTPClient *http.Client Region string AuthVersion AuthVersionType // v1 or v4 signature,default is v1 // contains filtered or unexported fields }
Client ...
func (*Client) ApplyConfigToMachineGroup ¶
ApplyConfigToMachineGroup applies config to machine group.
func (*Client) CheckConfigExist ¶
CheckConfigExist check config exist or not
func (*Client) CheckLogstoreExist ¶
CheckLogstoreExist check logstore exist or not
func (*Client) CheckMachineGroupExist ¶
CheckMachineGroupExist check machine group exist or not
func (*Client) CheckProjectExist ¶
CheckProjectExist check project exist or not
func (*Client) CreateAlertString ¶
func (*Client) CreateChart ¶
func (*Client) CreateConfig ¶
CreateConfig creates a new config in SLS.
func (*Client) CreateConfigString ¶
CreateConfigString creates a new config in SLS.
func (*Client) CreateConsumerGroup ¶
func (c *Client) CreateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
CreateConsumerGroup ...
func (*Client) CreateDashboard ¶
func (*Client) CreateDashboardString ¶
func (*Client) CreateEtlMeta ¶
func (*Client) CreateEventStore ¶
func (*Client) CreateIndex ¶
CreateIndex ...
func (*Client) CreateIndexString ¶
CreateIndexString ...
func (*Client) CreateIngestion ¶
func (*Client) CreateLogStore ¶
func (c *Client) CreateLogStore(project string, logstore string, ttl, shardCnt int, autoSplit bool, maxSplitShard int) error
CreateLogStore creates a new logstore in SLS, where name is logstore name, and ttl is time-to-live(in day) of logs, and shardCnt is the number of shards, and autoSplit is auto split, and maxSplitShard is the max number of shard.
func (*Client) CreateLogStoreV2 ¶
CreateLogStoreV2 creates a new logstore in SLS
func (*Client) CreateLogging ¶
func (*Client) CreateMachineGroup ¶
func (c *Client) CreateMachineGroup(project string, m *MachineGroup) error
CreateMachineGroup creates a new machine group in SLS.
func (*Client) CreateMetricAggRules ¶
func (c *Client) CreateMetricAggRules(project string, aggRules *MetricAggRules) error
func (*Client) CreateMetricStore ¶
CreateMetricStore .
func (*Client) CreateProject ¶
func (c *Client) CreateProject(name, description string) (*LogProject, error)
CreateProject create a new loghub project.
func (*Client) CreateResource ¶
func (*Client) CreateResourceRecord ¶
func (c *Client) CreateResourceRecord(resourceName string, record *ResourceRecord) error
func (*Client) CreateResourceRecordString ¶
func (*Client) CreateResourceString ¶
func (*Client) CreateSavedSearch ¶
func (c *Client) CreateSavedSearch(project string, savedSearch *SavedSearch) error
func (*Client) CreateScheduledSQL ¶
func (c *Client) CreateScheduledSQL(project string, scheduledsql *ScheduledSQL) error
func (*Client) CreateSubStore ¶
CreateSubStore ...
func (*Client) DeleteChart ¶
func (*Client) DeleteConfig ¶
DeleteConfig deletes a config according by config name.
func (*Client) DeleteConsumerGroup ¶
DeleteConsumerGroup ...
func (*Client) DeleteDashboard ¶
func (*Client) DeleteEtlMeta ¶
func (*Client) DeleteEventStore ¶
func (*Client) DeleteIndex ¶
DeleteIndex ...
func (*Client) DeleteIngestion ¶
func (*Client) DeleteLogStore ¶
DeleteLogStore deletes a logstore according by logstore name.
func (*Client) DeleteLogging ¶
func (*Client) DeleteMachineGroup ¶
DeleteMachineGroup deletes machine group according machine group name.
func (*Client) DeleteMetricAggRules ¶
func (*Client) DeleteMetricStore ¶
DeleteMetricStore .
func (*Client) DeleteProjectPolicy ¶
func (*Client) DeleteResource ¶
func (*Client) DeleteResourceRecord ¶
func (*Client) DeleteSavedSearch ¶
func (*Client) DeleteScheduledSQL ¶
func (*Client) DeleteSubStore ¶
DeleteSubStore ...
func (*Client) GetAlertString ¶
func (*Client) GetAppliedConfigs ¶
func (c *Client) GetAppliedConfigs(project string, groupName string) (confNames []string, err error)
GetAppliedConfigs returns applied config names list according machine group name groupName.
func (*Client) GetAppliedMachineGroups ¶
func (c *Client) GetAppliedMachineGroups(project string, confName string) (groupNames []string, err error)
GetAppliedMachineGroups returns applied machine group names list according config name.
func (*Client) GetCheckpoint ¶
func (c *Client) GetCheckpoint(project, logstore string, cgName string) (checkPointList []*ConsumerGroupCheckPoint, err error)
GetCheckpoint ...
func (*Client) GetConfigString ¶
GetConfigString returns config according by config name.
func (*Client) GetCursor ¶
func (c *Client) GetCursor(project, logstore string, shardID int, from string) (cursor string, err error)
GetCursor gets log cursor of one shard specified by shardId. The from can be in three form: a) unix timestamp in seccond, b) "begin", c) "end". For more detail please read: https://help.aliyun.com/document_detail/29024.html
func (*Client) GetCursorTime ¶
func (c *Client) GetCursorTime(project, logstore string, shardID int, cursor string) (cursorTime time.Time, err error)
GetCursorTime ...
func (*Client) GetDashboard ¶
func (*Client) GetDashboardString ¶
func (*Client) GetEtlMeta ¶
func (*Client) GetEventStore ¶
func (*Client) GetHistograms ¶
func (c *Client) GetHistograms(project, logstore string, topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
GetHistograms query logs with [from, to) time range
func (*Client) GetHistogramsToCompleted ¶
func (c *Client) GetHistogramsToCompleted(project, logstore string, topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
GetHistogramsToCompleted query logs with [from, to) time range to completed
func (*Client) GetIndexString ¶
GetIndexString ...
func (*Client) GetIngestion ¶
func (*Client) GetLogLines ¶
func (c *Client) GetLogLines(project, logstore string, topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogLinesResponse, error)
GetLogLines ...
func (*Client) GetLogLinesV2 ¶
func (c *Client) GetLogLinesV2(project, logstore string, req *GetLogRequest) (*GetLogLinesResponse, error)
GetLogLinesV2 ...
func (*Client) GetLogStore ¶
GetLogStore returns logstore according by logstore name.
func (*Client) GetLogs ¶
func (c *Client) GetLogs(project, logstore string, topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogsResponse, error)
GetLogs query logs with [from, to) time range
func (*Client) GetLogsBytes ¶
func (c *Client) GetLogsBytes(project, logstore string, shardID int, cursor, endCursor string, logGroupMaxCount int) (out []byte, nextCursor string, err error)
GetLogsBytes gets logs binary data from shard specified by shardId according cursor and endCursor. The logGroupMaxCount is the max number of logGroup could be returned. The nextCursor is the next curosr can be used to read logs at next time.
func (*Client) GetLogsToCompleted ¶
func (c *Client) GetLogsToCompleted(project, logstore string, topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogsResponse, error)
GetLogsToCompleted query logs with [from, to) time range to completed
func (*Client) GetLogsToCompletedV2 ¶
func (c *Client) GetLogsToCompletedV2(project, logstore string, req *GetLogRequest) (*GetLogsResponse, error)
GetLogsToCompletedV2 ...
func (*Client) GetLogsV2 ¶
func (c *Client) GetLogsV2(project, logstore string, req *GetLogRequest) (*GetLogsResponse, error)
GetLogsV2 ...
func (*Client) GetLogsV3 ¶
func (c *Client) GetLogsV3(project, logstore string, req *GetLogRequest) (*GetLogsV3Response, error)
GetLogsV3 ...
func (*Client) GetMachineGroup ¶
func (c *Client) GetMachineGroup(project string, machineGroup string) (m *MachineGroup, err error)
GetMachineGroup retruns machine group according by machine group name.
func (*Client) GetMetricAggRules ¶
func (c *Client) GetMetricAggRules(project string, ruleID string) (*MetricAggRules, error)
func (*Client) GetMetricStore ¶
GetMetricStore .
func (*Client) GetPrevCursorTime ¶
func (c *Client) GetPrevCursorTime(project, logstore string, shardID int, cursor string) (cursorTime time.Time, err error)
GetPrevCursorTime ...
func (*Client) GetProject ¶
func (c *Client) GetProject(name string) (*LogProject, error)
GetProject ...
func (*Client) GetProjectPolicy ¶
func (*Client) GetResource ¶
func (*Client) GetResourceRecord ¶
func (c *Client) GetResourceRecord(resourceName, recordId string) (record *ResourceRecord, err error)
func (*Client) GetResourceRecordString ¶
func (*Client) GetResourceString ¶
func (*Client) GetSavedSearch ¶
func (c *Client) GetSavedSearch(project string, savedSearchName string) (*SavedSearch, error)
func (*Client) GetScheduledSQL ¶
func (c *Client) GetScheduledSQL(project string, name string) (*ScheduledSQL, error)
func (*Client) GetScheduledSQLJobInstance ¶
func (c *Client) GetScheduledSQLJobInstance(projectName, jobName, instanceId string, result bool) (*ScheduledSQLJobInstance, error)
func (*Client) GetSubStore ¶
GetSubStore ...
func (*Client) GetSubStoreTTL ¶
GetSubStoreTTL ...
func (*Client) HeartBeat ¶
func (c *Client) HeartBeat(project, logstore string, cgName, consumer string, heartBeatShardIDs []int) (shardIDs []int, err error)
HeartBeat ...
func (*Client) ListConfig ¶
func (c *Client) ListConfig(project string, offset, size int) (cfgNames []string, total int, err error)
ListConfig returns config names list and the total number of configs. The offset starts from 0 and the size is the max number of configs could be returned.
func (*Client) ListConsumerGroup ¶
func (c *Client) ListConsumerGroup(project, logstore string) (cgList []*ConsumerGroup, err error)
ListConsumerGroup ...
func (*Client) ListDashboard ¶
func (*Client) ListDashboardV2 ¶
func (*Client) ListEtlMeta ¶
func (*Client) ListEtlMetaName ¶
func (*Client) ListEtlMetaWithTag ¶
func (*Client) ListEventStore ¶
func (*Client) ListExport ¶
func (*Client) ListIngestion ¶
func (*Client) ListLogStore ¶
ListLogStore returns all logstore names of project p.
func (*Client) ListLogStoreV2 ¶
func (c *Client) ListLogStoreV2(project string, offset, size int, telemetryType string) ([]string, error)
ListLogStoreV2 list logstores with params :
offset: start offset size: max return size telemetryType : telemetry type filter
func (*Client) ListMachineGroup ¶
func (c *Client) ListMachineGroup(project string, offset, size int) (m []string, total int, err error)
ListMachineGroup returns machine group name list and the total number of machine groups. The offset starts from 0 and the size is the max number of machine groups could be returned.
func (*Client) ListMachines ¶
func (*Client) ListMetricAggRules ¶
func (*Client) ListProject ¶
ListProject list all projects in specific region the region is related with the client's endpoint
func (*Client) ListProjectV2 ¶
func (c *Client) ListProjectV2(offset, size int) (projects []LogProject, count, total int, err error)
ListProjectV2 list all projects in specific region the region is related with the client's endpoint ref https://www.alibabacloud.com/help/doc-detail/74955.htm
func (*Client) ListResource ¶
func (*Client) ListResourceRecord ¶
func (*Client) ListSavedSearch ¶
func (*Client) ListSavedSearchV2 ¶
func (*Client) ListScheduledSQL ¶
func (*Client) ListScheduledSQLJobInstances ¶
func (c *Client) ListScheduledSQLJobInstances(projectName, jobName string, status *InstanceStatus) (instances []*ScheduledSQLJobInstance, total, count int64, err error)
func (*Client) ListShards ¶
ListShards returns shard id list of this logstore.
func (*Client) ListSubStore ¶
ListSubStore ...
func (*Client) ListTagResources ¶
func (c *Client) ListTagResources(project string, resourceType string, resourceIDs []string, tags []ResourceFilterTag, nextToken string) (respTags []*ResourceTagResponse, respNextToken string, err error)
ListTagResources list rag resources
func (*Client) MergeShards ¶
MergeShards https://help.aliyun.com/document_detail/29022.html
func (*Client) ModifyScheduledSQLJobInstanceState ¶
func (c *Client) ModifyScheduledSQLJobInstanceState(projectName, jobName, instanceId string, state ScheduledSQLState) error
func (*Client) PostLogStoreLogs ¶
func (c *Client) PostLogStoreLogs(project, logstore string, lg *LogGroup, hashKey *string) (err error)
PostLogStoreLogs put logs into Shard logstore by hashKey. The callers should transform user logs into LogGroup.
func (*Client) PublishAlertEvent ¶
func (*Client) PullLogs ¶
func (c *Client) PullLogs(project, logstore string, shardID int, cursor, endCursor string, logGroupMaxCount int) (gl *LogGroupList, nextCursor string, err error)
PullLogs gets logs from shard specified by shardId according cursor and endCursor. The logGroupMaxCount is the max number of logGroup could be returned. The nextCursor is the next cursor can be used to read logs at next time. @note if you want to pull logs continuous, set endCursor = ""
func (*Client) PutLogs ¶
PutLogs put logs into logstore. The callers should transform user logs into LogGroup.
func (*Client) PutLogsWithCompressType ¶
func (c *Client) PutLogsWithCompressType(project, logstore string, lg *LogGroup, compressType int) (err error)
PutLogsWithCompressType put logs into logstore with specific compress type. The callers should transform user logs into LogGroup.
func (*Client) PutRawLogWithCompressType ¶
func (c *Client) PutRawLogWithCompressType(project, logstore string, rawLogData []byte, compressType int) (err error)
PutRawLogWithCompressType put raw log data to log service, no marshal
func (*Client) RemoveConfigFromMachineGroup ¶
func (c *Client) RemoveConfigFromMachineGroup(project string, confName, groupName string) (err error)
RemoveConfigFromMachineGroup removes config from machine group.
func (*Client) ResetAccessKeyToken ¶
ResetAccessKeyToken reset client's access key token
func (*Client) SetAuthVersion ¶
func (c *Client) SetAuthVersion(version AuthVersionType)
SetAuthVersion set signature version that the client used
func (*Client) SetHTTPClient ¶
SetHTTPClient set a custom http client, all request will send to sls by this client
func (*Client) SetUserAgent ¶
SetUserAgent set a custom userAgent
func (*Client) SplitNumShard ¶
func (c *Client) SplitNumShard(project, logstore string, shardID, shardsNum int) (shards []*Shard, err error)
SplitNumShard https://help.aliyun.com/document_detail/29021.html
func (*Client) SplitShard ¶
func (c *Client) SplitShard(project, logstore string, shardID int, splitKey string) (shards []*Shard, err error)
SplitShard https://help.aliyun.com/document_detail/29021.html
func (*Client) TagResources ¶
func (c *Client) TagResources(project string, tags *ResourceTags) error
TagResources tag specific resource
func (*Client) UnTagResources ¶
func (c *Client) UnTagResources(project string, tags *ResourceUnTags) error
UnTagResources untag specific resource
func (*Client) UpdateAlertString ¶
func (*Client) UpdateChart ¶
func (*Client) UpdateCheckpoint ¶
func (c *Client) UpdateCheckpoint(project, logstore string, cgName string, consumer string, shardID int, checkpoint string, forceSuccess bool) (err error)
UpdateCheckpoint ...
func (*Client) UpdateConfig ¶
UpdateConfig updates a config.
func (*Client) UpdateConfigString ¶
UpdateConfigString updates a config.
func (*Client) UpdateConsumerGroup ¶
func (c *Client) UpdateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
UpdateConsumerGroup ...
func (*Client) UpdateDashboard ¶
func (*Client) UpdateDashboardString ¶
func (*Client) UpdateEtlMeta ¶
func (*Client) UpdateEventStore ¶
func (*Client) UpdateIndex ¶
UpdateIndex ...
func (*Client) UpdateIndexString ¶
UpdateIndexString ...
func (*Client) UpdateIngestion ¶
func (*Client) UpdateLogStore ¶
UpdateLogStore updates a logstore according by logstore name, obviously we can't modify the logstore name itself.
func (*Client) UpdateLogStoreV2 ¶
UpdateLogStoreV2 updates a logstore according by logstore name, obviously we can't modify the logstore name itself.
func (*Client) UpdateLogging ¶
func (*Client) UpdateMachineGroup ¶
func (c *Client) UpdateMachineGroup(project string, m *MachineGroup) (err error)
UpdateMachineGroup updates a machine group.
func (*Client) UpdateMetricAggRules ¶
func (c *Client) UpdateMetricAggRules(project string, aggRules *MetricAggRules) error
func (*Client) UpdateMetricStore ¶
UpdateMetricStore .
func (*Client) UpdateProject ¶
func (c *Client) UpdateProject(name, description string) (*LogProject, error)
UpdateProject create a new loghub project.
func (*Client) UpdateProjectPolicy ¶
func (*Client) UpdateResource ¶
func (*Client) UpdateResourceRecord ¶
func (c *Client) UpdateResourceRecord(resourceName string, record *ResourceRecord) error
func (*Client) UpdateResourceRecordString ¶
func (*Client) UpdateResourceString ¶
func (*Client) UpdateSavedSearch ¶
func (c *Client) UpdateSavedSearch(project string, savedSearch *SavedSearch) error
func (*Client) UpdateScheduledSQL ¶
func (c *Client) UpdateScheduledSQL(project string, scheduledsql *ScheduledSQL) error
func (*Client) UpdateSubStore ¶
UpdateSubStore ...
type ClientInterface ¶
type ClientInterface interface { // SetUserAgent set userAgent for sls client SetUserAgent(userAgent string) // SetHTTPClient set a custom http client, all request will send to sls by this client SetHTTPClient(client *http.Client) // #################### Client Operations ##################### // ResetAccessKeyToken reset client's access key token ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string) // SetRegion Set region for signature v4 SetRegion(region string) // SetAuthVersion Set signature version SetAuthVersion(version AuthVersionType) // Close the client Close() error // #################### Project Operations ##################### // CreateProject create a new loghub project. CreateProject(name, description string) (*LogProject, error) GetProject(name string) (*LogProject, error) // UpdateProject create a new loghub project. UpdateProject(name, description string) (*LogProject, error) // ListProject list all projects in specific region // the region is related with the client's endpoint ListProject() (projectNames []string, err error) // ListProjectV2 list all projects in specific region // the region is related with the client's endpoint // ref https://www.alibabacloud.com/help/doc-detail/74955.htm ListProjectV2(offset, size int) (projects []LogProject, count, total int, err error) // CheckProjectExist check project exist or not CheckProjectExist(name string) (bool, error) // DeleteProject ... DeleteProject(name string) error // #################### Logstore Operations ##################### // ListLogStore returns all logstore names of project p. ListLogStore(project string) ([]string, error) // GetLogStore returns logstore according by logstore name. GetLogStore(project string, logstore string) (*LogStore, error) // CreateLogStore creates a new logstore in SLS // where name is logstore name, // and ttl is time-to-live(in day) of logs, // and shardCnt is the number of shards, // and autoSplit is auto split, // and maxSplitShard is the max number of shard. CreateLogStore(project string, logstore string, ttl, shardCnt int, autoSplit bool, maxSplitShard int) error // CreateLogStoreV2 creates a new logstore in SLS CreateLogStoreV2(project string, logstore *LogStore) error // DeleteLogStore deletes a logstore according by logstore name. DeleteLogStore(project string, logstore string) (err error) // UpdateLogStore updates a logstore according by logstore name, // obviously we can't modify the logstore name itself. UpdateLogStore(project string, logstore string, ttl, shardCnt int) (err error) // UpdateLogStoreV2 updates a logstore according by logstore name, // obviously we can't modify the logstore name itself. UpdateLogStoreV2(project string, logstore *LogStore) error // CheckLogstoreExist check logstore exist or not CheckLogstoreExist(project string, logstore string) (bool, error) // #################### MetricStore Operations ##################### // CreateMetricStore creates a new metric store in SLS. CreateMetricStore(project string, metricStore *LogStore) error // UpdateMetricStore updates a metric store. UpdateMetricStore(project string, metricStore *LogStore) error // DeleteMetricStore deletes a metric store. DeleteMetricStore(project, name string) error // GetMetricStore return a metric store. GetMetricStore(project, name string) (*LogStore, error) // #################### EventStore Operations ##################### // CreateEventStore creates a new event store in SLS. CreateEventStore(project string, eventStore *LogStore) error // UpdateEventStore updates a event store. UpdateEventStore(project string, eventStore *LogStore) error // DeleteEventStore deletes a event store. DeleteEventStore(project, name string) error // GetEventStore return a event store. GetEventStore(project, name string) (*LogStore, error) // ListEventStore returns all eventStore names of project p. ListEventStore(project string, offset, size int) ([]string, error) // #################### Logtail Operations ##################### // ListMachineGroup returns machine group name list and the total number of machine groups. // The offset starts from 0 and the size is the max number of machine groups could be returned. ListMachineGroup(project string, offset, size int) (m []string, total int, err error) // ListMachines list all machines in machineGroupName ListMachines(project, machineGroupName string) (ms []*Machine, total int, err error) // CheckMachineGroupExist check machine group exist or not CheckMachineGroupExist(project string, machineGroup string) (bool, error) // GetMachineGroup retruns machine group according by machine group name. GetMachineGroup(project string, machineGroup string) (m *MachineGroup, err error) // CreateMachineGroup creates a new machine group in SLS. CreateMachineGroup(project string, m *MachineGroup) error // UpdateMachineGroup updates a machine group. UpdateMachineGroup(project string, m *MachineGroup) (err error) // DeleteMachineGroup deletes machine group according machine group name. DeleteMachineGroup(project string, machineGroup string) (err error) // ListConfig returns config names list and the total number of configs. // The offset starts from 0 and the size is the max number of configs could be returned. ListConfig(project string, offset, size int) (cfgNames []string, total int, err error) // CheckConfigExist check config exist or not CheckConfigExist(project string, config string) (ok bool, err error) // GetConfig returns config according by config name. GetConfig(project string, config string) (logConfig *LogConfig, err error) // GetConfigString returns config according by config name. GetConfigString(name string, config string) (c string, err error) // UpdateConfig updates a config. UpdateConfig(project string, config *LogConfig) (err error) // UpdateConfigString updates a config. UpdateConfigString(project string, configName, configDetail string) (err error) // CreateConfig creates a new config in SLS. CreateConfig(project string, config *LogConfig) (err error) // CreateConfigString creates a new config in SLS. CreateConfigString(project string, config string) (err error) // DeleteConfig deletes a config according by config name. DeleteConfig(project string, config string) (err error) // GetAppliedMachineGroups returns applied machine group names list according config name. GetAppliedMachineGroups(project string, confName string) (groupNames []string, err error) // GetAppliedConfigs returns applied config names list according machine group name groupName. GetAppliedConfigs(project string, groupName string) (confNames []string, err error) // ApplyConfigToMachineGroup applies config to machine group. ApplyConfigToMachineGroup(project string, confName, groupName string) (err error) // RemoveConfigFromMachineGroup removes config from machine group. RemoveConfigFromMachineGroup(project string, confName, groupName string) (err error) // #################### ETL Operations ##################### CreateETL(project string, etljob ETL) error UpdateETL(project string, etljob ETL) error GetETL(project string, etlName string) (ETLJob *ETL, err error) ListETL(project string, offset int, size int) (*ListETLResponse, error) DeleteETL(project string, etlName string) error StartETL(project, name string) error StopETL(project, name string) error RestartETL(project string, etljob ETL) error CreateEtlMeta(project string, etlMeta *EtlMeta) (err error) UpdateEtlMeta(project string, etlMeta *EtlMeta) (err error) DeleteEtlMeta(project string, etlMetaName, etlMetaKey string) (err error) GetEtlMeta(project string, etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error) ListEtlMeta(project string, etlMetaName string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error) ListEtlMetaWithTag(project string, etlMetaName, etlMetaTag string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error) ListEtlMetaName(project string, offset, size int) (total int, count int, etlMetaNameList []string, err error) // #################### Shard Operations ##################### // ListShards returns shard id list of this logstore. ListShards(project, logstore string) (shards []*Shard, err error) // SplitShard https://help.aliyun.com/document_detail/29021.html, SplitShard(project, logstore string, shardID int, splitKey string) (shards []*Shard, err error) // SplitNumShard https://help.aliyun.com/document_detail/29021.html, SplitNumShard(project, logstore string, shardID, shardsNum int) (shards []*Shard, err error) // MergeShards https://help.aliyun.com/document_detail/29022.html MergeShards(project, logstore string, shardID int) (shards []*Shard, err error) // #################### Log Operations ##################### // PutLogs put logs into logstore. // The callers should transform user logs into LogGroup. PutLogs(project, logstore string, lg *LogGroup) (err error) // PostLogStoreLogs put logs into Shard logstore by hashKey. // The callers should transform user logs into LogGroup. PostLogStoreLogs(project, logstore string, lg *LogGroup, hashKey *string) (err error) // PutLogsWithCompressType put logs into logstore with specific compress type. // The callers should transform user logs into LogGroup. PutLogsWithCompressType(project, logstore string, lg *LogGroup, compressType int) (err error) // PutRawLogWithCompressType put raw log data to log service, no marshal PutRawLogWithCompressType(project, logstore string, rawLogData []byte, compressType int) (err error) // GetCursor gets log cursor of one shard specified by shardId. // The from can be in three form: a) unix timestamp in seccond, b) "begin", c) "end". // For more detail please read: https://help.aliyun.com/document_detail/29024.html GetCursor(project, logstore string, shardID int, from string) (cursor string, err error) // GetCursorTime gets the server time based on the cursor. // For more detail please read: https://help.aliyun.com/document_detail/113274.html GetCursorTime(project, logstore string, shardID int, cursor string) (cursorTime time.Time, err error) // GetLogsBytes gets logs binary data from shard specified by shardId according cursor and endCursor. // The logGroupMaxCount is the max number of logGroup could be returned. // The nextCursor is the next curosr can be used to read logs at next time. GetLogsBytes(project, logstore string, shardID int, cursor, endCursor string, logGroupMaxCount int) (out []byte, nextCursor string, err error) // PullLogs gets logs from shard specified by shardId according cursor and endCursor. // The logGroupMaxCount is the max number of logGroup could be returned. // The nextCursor is the next cursor can be used to read logs at next time. // @note if you want to pull logs continuous, set endCursor = "" PullLogs(project, logstore string, shardID int, cursor, endCursor string, logGroupMaxCount int) (gl *LogGroupList, nextCursor string, err error) // GetHistograms query logs with [from, to) time range GetHistograms(project, logstore string, topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error) // GetLogs query logs with [from, to) time range GetLogs(project, logstore string, topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogsResponse, error) GetLogLines(project, logstore string, topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogLinesResponse, error) GetLogsV2(project, logstore string, req *GetLogRequest) (*GetLogsResponse, error) GetLogLinesV2(project, logstore string, req *GetLogRequest) (*GetLogLinesResponse, error) GetLogsV3(project, logstore string, req *GetLogRequest) (*GetLogsV3Response, error) // GetHistogramsToCompleted query logs with [from, to) time range to completed GetHistogramsToCompleted(project, logstore string, topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error) // GetLogsToCompleted query logs with [from, to) time range to completed GetLogsToCompleted(project, logstore string, topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogsResponse, error) // GetLogsToCompletedV2 query logs with [from, to) time range to completed GetLogsToCompletedV2(project, logstore string, req *GetLogRequest) (*GetLogsResponse, error) // #################### Index Operations ##################### // CreateIndex ... CreateIndex(project, logstore string, index Index) error // CreateIndexString ... CreateIndexString(project, logstore string, indexStr string) error // UpdateIndex ... UpdateIndex(project, logstore string, index Index) error // UpdateIndexString ... UpdateIndexString(project, logstore string, indexStr string) error // DeleteIndex ... DeleteIndex(project, logstore string) error // GetIndex ... GetIndex(project, logstore string) (*Index, error) // GetIndexString ... GetIndexString(project, logstore string) (string, error) // #################### Chart&Dashboard Operations ##################### ListDashboard(project string, dashboardName string, offset, size int) (dashboardList []string, count, total int, err error) ListDashboardV2(project string, dashboardName string, offset, size int) (dashboardList []string, dashboardItems []ResponseDashboardItem, count, total int, err error) GetDashboard(project, name string) (dashboard *Dashboard, err error) GetDashboardString(project, name string) (dashboard string, err error) DeleteDashboard(project, name string) error UpdateDashboard(project string, dashboard Dashboard) error UpdateDashboardString(project string, dashboardName, dashboardStr string) error CreateDashboard(project string, dashboard Dashboard) error CreateDashboardString(project string, dashboardStr string) error GetChart(project, dashboardName, chartName string) (chart *Chart, err error) DeleteChart(project, dashboardName, chartName string) error UpdateChart(project, dashboardName string, chart Chart) error CreateChart(project, dashboardName string, chart Chart) error // #################### SavedSearch&Alert Operations ##################### CreateSavedSearch(project string, savedSearch *SavedSearch) error UpdateSavedSearch(project string, savedSearch *SavedSearch) error DeleteSavedSearch(project string, savedSearchName string) error GetSavedSearch(project string, savedSearchName string) (*SavedSearch, error) ListSavedSearch(project string, savedSearchName string, offset, size int) (savedSearches []string, total int, count int, err error) ListSavedSearchV2(project string, savedSearchName string, offset, size int) (savedSearches []string, savedsearchItems []ResponseSavedSearchItem, total int, count int, err error) CreateAlert(project string, alert *Alert) error UpdateAlert(project string, alert *Alert) error DeleteAlert(project string, alertName string) error GetAlert(project string, alertName string) (*Alert, error) DisableAlert(project string, alertName string) error EnableAlert(project string, alertName string) error ListAlert(project, alertName, dashboard string, offset, size int) (alerts []*Alert, total int, count int, err error) CreateAlertString(project string, alert string) error UpdateAlertString(project string, alertName, alert string) error GetAlertString(project string, alertName string) (string, error) // #################### Consumer Operations ##################### CreateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error) UpdateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error) DeleteConsumerGroup(project, logstore string, cgName string) (err error) ListConsumerGroup(project, logstore string) (cgList []*ConsumerGroup, err error) HeartBeat(project, logstore string, cgName, consumer string, heartBeatShardIDs []int) (shardIDs []int, err error) UpdateCheckpoint(project, logstore string, cgName string, consumer string, shardID int, checkpoint string, forceSuccess bool) (err error) GetCheckpoint(project, logstore string, cgName string) (checkPointList []*ConsumerGroupCheckPoint, err error) // ####################### Resource Tags API ###################### // TagResources tag specific resource TagResources(project string, tags *ResourceTags) error // UnTagResources untag specific resource UnTagResources(project string, tags *ResourceUnTags) error // ListTagResources list rag resources ListTagResources(project string, resourceType string, resourceIDs []string, tags []ResourceFilterTag, nextToken string) (respTags []*ResourceTagResponse, respNextToken string, err error) CreateScheduledSQL(project string, scheduledsql *ScheduledSQL) error DeleteScheduledSQL(project string, name string) error UpdateScheduledSQL(project string, scheduledsql *ScheduledSQL) error GetScheduledSQL(project string, name string) (*ScheduledSQL, error) ListScheduledSQL(project, name, displayName string, offset, size int) ([]*ScheduledSQL, int, int, error) GetScheduledSQLJobInstance(projectName, jobName, instanceId string, result bool) (instance *ScheduledSQLJobInstance, err error) ModifyScheduledSQLJobInstanceState(projectName, jobName, instanceId string, state ScheduledSQLState) error ListScheduledSQLJobInstances(projectName, jobName string, status *InstanceStatus) (instances []*ScheduledSQLJobInstance, total, count int64, err error) // #################### Resource Operations ##################### ListResource(resourceType string, resourceName string, offset, size int) (resourceList []*Resource, count, total int, err error) GetResource(name string) (resource *Resource, err error) GetResourceString(name string) (resource string, err error) DeleteResource(name string) error UpdateResource(resource *Resource) error UpdateResourceString(resourceName, resourceStr string) error CreateResource(resource *Resource) error CreateResourceString(resourceStr string) error // #################### Resource Record Operations ##################### ListResourceRecord(resourceName string, offset, size int) (recordList []*ResourceRecord, count, total int, err error) GetResourceRecord(resourceName, recordId string) (record *ResourceRecord, err error) GetResourceRecordString(resourceName, name string) (record string, err error) DeleteResourceRecord(resourceName, recordId string) error UpdateResourceRecord(resourceName string, record *ResourceRecord) error UpdateResourceRecordString(resourceName, recordStr string) error CreateResourceRecord(resourceName string, record *ResourceRecord) error CreateResourceRecordString(resourceName, recordStr string) error // #################### Ingestion ##################### CreateIngestion(project string, ingestion *Ingestion) error UpdateIngestion(project string, ingestion *Ingestion) error GetIngestion(project string, name string) (*Ingestion, error) ListIngestion(project, logstore, name, displayName string, offset, size int) (ingestions []*Ingestion, total, count int, error error) DeleteIngestion(project string, name string) error // #################### Export ##################### CreateExport(project string, export *Export) error UpdateExport(project string, export *Export) error GetExport(project, name string) (*Export, error) ListExport(project, logstore, name, displayName string, offset, size int) (exports []*Export, total, count int, error error) DeleteExport(project string, name string) error RestartExport(project string, export *Export) error // UpdateProjectPolicy updates project's policy. UpdateProjectPolicy(project string, policy string) error // DeleteProjectPolicy deletes project's policy. DeleteProjectPolicy(project string) error // GetProjectPolicy return project's policy. GetProjectPolicy(project string) (string, error) // #################### AlertPub Msg ##################### PublishAlertEvent(project string, alertResult []byte) error // contains filtered or unexported methods }
ClientInterface for all log's open api
func CreateNormalInterface ¶
func CreateNormalInterface(endpoint, accessKeyID, accessKeySecret, securityToken string) ClientInterface
CreateNormalInterface create a normal client
func CreateTokenAutoUpdateClient ¶
func CreateTokenAutoUpdateClient(endpoint string, tokenUpdateFunc UpdateTokenFunction, shutdown <-chan struct{}) (client ClientInterface, err error)
CreateTokenAutoUpdateClient crate a TokenAutoUpdateClient this client will auto fetch security token and retry when operation is `Unauthorized` @note TokenAutoUpdateClient will destroy when shutdown channel is closed
type ColumnStorageContentDetail ¶
type ColumnStorageContentDetail struct {
Columns []Column `json:"columns"`
}
type CommonConfigInputDetail ¶
type CommonConfigInputDetail struct { LocalStorage bool `json:"localStorage"` FilterKeys []string `json:"filterKey,omitempty"` FilterRegex []string `json:"filterRegex,omitempty"` ShardHashKey []string `json:"shardHashKey,omitempty"` EnableTag bool `json:"enableTag"` EnableRawLog bool `json:"enableRawLog"` MaxSendRate int `json:"maxSendRate"` SendRateExpire int `json:"sendRateExpire"` SensitiveKeys []SensitiveKey `json:"sensitive_keys,omitempty"` MergeType string `json:"mergeType,omitempty"` DelayAlarmBytes int `json:"delayAlarmBytes,omitempty"` AdjustTimeZone bool `json:"adjustTimezone"` LogTimeZone string `json:"logTimezone,omitempty"` Priority int `json:"priority,omitempty"` }
CommonConfigInputDetail is all input detail's basic config
type ConditionConfiguration ¶
type ConditionOperation ¶
ConditionOperation : retry depends on the retured bool
type ConfigPluginCanal ¶
type ConfigPluginCanal struct { Host string Port int User string Password string Flavor string ServerID int IncludeTables []string ExcludeTables []string StartBinName string StartBinLogPos int HeartBeatPeriod int ReadTimeout int EnableDDL bool EnableXID bool EnableGTID bool EnableInsert bool EnableUpdate bool EnableDelete bool TextToString bool StartFromBegining bool Charset string }
func CreateConfigPluginCanal ¶
func CreateConfigPluginCanal() *ConfigPluginCanal
type ConfigPluginDockerStdout ¶
type ConfigPluginDockerStdout struct { IncludeLabel map[string]string ExcludeLabel map[string]string IncludeEnv map[string]string ExcludeEnv map[string]string FlushIntervalMs int TimeoutMs int BeginLineRegex string BeginLineTimeoutMs int BeginLineCheckLength int MaxLogSize int Stdout bool Stderr bool }
func CreateConfigPluginDockerStdout ¶
func CreateConfigPluginDockerStdout() *ConfigPluginDockerStdout
type ConsumerGroup ¶
type ConsumerGroup struct { ConsumerGroupName string `json:"consumerGroup"` Timeout int `json:"timeout"` // timeout seconds InOrder bool `json:"order"` }
ConsumerGroup type define
func (*ConsumerGroup) String ¶
func (cg *ConsumerGroup) String() string
type ConsumerGroupCheckPoint ¶
type ConsumerGroupCheckPoint struct { ShardID int `json:"shard"` CheckPoint string `json:"checkpoint"` UpdateTime int64 `json:"updateTime"` Consumer string `json:"consumer"` }
ConsumerGroupCheckPoint type define
type CsvContentDetail ¶
type DataFormat ¶
type DataFormat string
const ( LOG_TO_LOG DataFormat = "log2log" LOG_TO_METRIC DataFormat = "log2metric" METRIC_TO_metric DataFormat = "metric2metric" )
type DataSink ¶
type DataSink interface {
DataSinkType() DataSinkType
}
type DataSinkType ¶
type DataSinkType string
type DataSource ¶
type DataSource struct {
DataSourceType DataSourceType `json:"type"`
}
type DataSourceType ¶
type DataSourceType string
type DelimitedTextFormat ¶
type DelimitedTextFormat struct { StructureDataFormat FieldNames []string `json:"fieldNames"` FieldDelimiter string `json:"fieldDelimiter"` QuoteChar string `json:"quoteChar"` EscapeChar string `json:"escapeChar"` SkipLeadingRows int64 `json:"skipLeadingRows"` MaxLines int64 `json:"maxLines"` FirstRowAsHeader bool `json:"firstRowAsHeader"` }
type DelimiterConfigInputDetail ¶
type DelimiterConfigInputDetail struct { LocalFileConfigInputDetail Separator string `json:"separator"` Quote string `json:"quote"` Key []string `json:"key"` TimeKey string `json:"timeKey"` AutoExtend bool `json:"autoExtend"` AcceptNoEnoughKeys bool `json:"acceptNoEnoughKeys"` }
DelimiterConfigInputDetail delimiter log config
func ConvertToDelimiterConfigInputDetail ¶
func ConvertToDelimiterConfigInputDetail(detail InputDetailInterface) (*DelimiterConfigInputDetail, bool)
type ETL ¶
type ETL struct { Configuration ETLConfiguration `json:"configuration"` Description string `json:"description,omitempty"` DisplayName string `json:"displayName"` Name string `json:"name"` Schedule ETLSchedule `json:"schedule"` Type string `json:"type"` Status string `json:"status"` CreateTime int32 `json:"createTime,omitempty"` LastModifiedTime int32 `json:"lastModifiedTime,omitempty"` }
type ETLConfiguration ¶
type ETLConfiguration struct { AccessKeyId string `json:"accessKeyId"` AccessKeySecret string `json:"accessKeySecret"` FromTime int64 `json:"fromTime,omitempty"` Logstore string `json:"logstore"` Parameters map[string]string `json:"parameters,omitempty"` RoleArn string `json:"roleArn,omitempty"` Script string `json:"script"` ToTime int32 `json:"toTime,omitempty"` Version int8 `json:"version"` ETLSinks []ETLSink `json:"sinks"` }
type ETLJob ¶
type ETLJob struct { JobName string `json:"etlJobName"` SourceConfig *SourceConfig `json:"sourceConfig"` TriggerConfig *TriggerConfig `json:"triggerConfig"` FunctionConfig *FunctionConfig `json:"functionConfig"` // TODO: change this to map[string]interface{} once log service fixes the format FunctionParameter interface{} `json:"functionParameter"` LogConfig *JobLogConfig `json:"logConfig"` Enable bool `json:"enable"` CreateTime int64 `json:"createTime"` UpdateTime int64 `json:"updateTime"` }
This module is only used in SLS Trigger for Aliyun FunctionCompute.
func (*ETLJob) UnmarshalJSON ¶
This can be removed once log service returns function parameter in json type. "functionParameter":{"a":1} instead of "functionParameter":"{\"a\":1}"
type ETLSchedule ¶
type ETLSchedule struct {
Type string `json:"type"`
}
type ETLSink ¶
type ETLSink struct { AccessKeyId string `json:"accessKeyId"` AccessKeySecret string `json:"accessKeySecret"` Endpoint string `json:"endpoint"` Logstore string `json:"logstore"` Name string `json:"name"` Project string `json:"project"` RoleArn string `json:"roleArn,omitempty"` Type string `json:"type,omitempty"` }
type EncryptConf ¶
type EncryptConf struct { Enable bool `json:"enable"` EncryptType string `json:"encrypt_type"` UserCmkInfo *EncryptUserCmkConf `json:"user_cmk_info,omitempty"` }
encrypt struct
type EncryptUserCmkConf ¶
type EncryptUserCmkConf struct { CmkKeyId string `json:"cmk_key_id"` Arn string `json:"arn"` RegionId string `json:"region_id"` }
EncryptUserCmkConf struct
type Error ¶
type Error struct { HTTPCode int32 `json:"httpCode"` Code string `json:"errorCode"` Message string `json:"errorMessage"` RequestID string `json:"requestID"` }
Error defines sls error
type Export ¶
type Export struct { ScheduledJob ExportConfiguration *ExportConfiguration `json:"configuration"` }
type ExportConfiguration ¶
type ExportConfiguration struct { FromTime int64 `json:"fromTime"` ToTime int64 `json:"toTime"` LogStore string `json:"logstore"` Parameters map[string]string `json:"parameters"` RoleArn string `json:"roleArn"` Version ExportVersion `json:"version"` DataSink DataSink `json:"sink"` }
func (*ExportConfiguration) UnmarshalJSON ¶
func (e *ExportConfiguration) UnmarshalJSON(data []byte) error
type ExportVersion ¶
type ExportVersion string
type FunctionConfig ¶
type FunctionConfig struct { FunctionProvider string `json:"functionProvider"` Endpoint string `json:"endpoint"` AccountID string `json:"accountId"` RegionName string `json:"regionName"` ServiceName string `json:"serviceName"` FunctionName string `json:"functionName"` RoleARN string `json:"roleArn"` }
type GetContextLogsResponse ¶
type GetContextLogsResponse struct { Progress string `json:"progress"` TotalLines int64 `json:"total_lines"` BackLines int64 `json:"back_lines"` ForwardLines int64 `json:"forward_lines"` Logs []map[string]string `json:"logs"` }
func (*GetContextLogsResponse) IsComplete ¶
func (resp *GetContextLogsResponse) IsComplete() bool
type GetHistogramsResponse ¶
type GetHistogramsResponse struct { Progress string `json:"progress"` Count int64 `json:"count"` Histograms []SingleHistogram `json:"histograms"` }
func (*GetHistogramsResponse) IsComplete ¶
func (resp *GetHistogramsResponse) IsComplete() bool
type GetLogLinesResponse ¶
type GetLogLinesResponse struct { GetLogsResponse Lines []json.RawMessage }
GetLogLinesResponse defines response from GetLogLines call note: GetLogLinesResponse.Logs is nil when use GetLogLinesResponse
type GetLogRequest ¶
type GetLogRequest struct { From int64 `json:"from"` // unix time, eg time.Now().Unix() - 900 To int64 `json:"to"` // unix time, eg time.Now().Unix() Topic string `json:"topic"` // @note topic is not used anymore, use __topic__ : xxx in query instead Lines int64 `json:"lines"` // max 100; offset, lines and reverse is ignored when use SQL in query Offset int64 `json:"offset"` Reverse bool `json:"reverse"` Query string `json:"query"` PowerSQL bool `json:"powerSql"` }
GetLogRequest for GetLogsV2
func (*GetLogRequest) ToURLParams ¶
func (glr *GetLogRequest) ToURLParams() url.Values
type GetLogsResponse ¶
type GetLogsResponse struct { Progress string `json:"progress"` Count int64 `json:"count"` Logs []map[string]string `json:"logs"` Contents string `json:"contents"` HasSQL bool `json:"hasSQL"` Header http.Header `json:"header"` }
GetLogsResponse defines response from GetLogs call
func (*GetLogsResponse) GetKeys ¶
func (resp *GetLogsResponse) GetKeys() (error, []string)
func (*GetLogsResponse) IsComplete ¶
func (resp *GetLogsResponse) IsComplete() bool
type GetLogsV3Response ¶
type GetLogsV3Response struct { Meta GetLogsV3ResponseMeta `json:"meta"` Logs []map[string]string `json:"data"` }
GetLogsV3Response defines response from GetLogs call
type GetLogsV3ResponseMeta ¶
type GetLogsV3ResponseMeta struct { Progress string `json:"progress"` AggQuery string `json:"aggQuery"` WhereQuery string `json:"whereQuery"` HasSQL bool `json:"hasSQL"` ProcessedRows int64 `json:"processedRows"` ElapsedMillisecond int64 `json:"elapsedMillisecond"` CpuSec float64 `json:"cpuSec"` CpuCores float64 `json:"cpuCores"` Limited int64 `json:"limited"` Count int64 `json:"count"` }
type GlobalConfig ¶
type GlobalConfig struct { ConfigId string `json:"config_id"` ConfigName string `json:"config_name"` ConfigDetail struct { AlertCenterLog struct { Region string `json:"region"` } `json:"alert_center_log"` } `json:"config_detail"` }
GlobalConfig is the global configuration for alerts.
type GroupConfiguration ¶
type Index ¶
type Index struct { Keys map[string]IndexKey `json:"keys,omitempty"` Line *IndexLine `json:"line,omitempty"` Ttl uint32 `json:"ttl,omitempty"` MaxTextLen uint32 `json:"max_text_len,omitempty"` LogReduce bool `json:"log_reduce"` LogReduceWhiteListDict []string `json:"log_reduce_white_list,omitempty"` LogReduceBlackListDict []string `json:"log_reduce_black_list,omitempty"` }
Index is an index config for a log store.
func CreateDefaultIndex ¶
func CreateDefaultIndex() *Index
CreateDefaultIndex return a full text index config
type IndexKey ¶
type IndexKey struct { Token []string `json:"token"` // tokens that split the log line. CaseSensitive bool `json:"caseSensitive"` Type string `json:"type"` // text, long, double DocValue bool `json:"doc_value,omitempty"` Alias string `json:"alias,omitempty"` Chn bool `json:"chn"` // parse chinese or not JsonKeys map[string]*JsonKey `json:"json_keys,omitempty"` }
IndexKey ...
type Ingestion ¶
type Ingestion struct { ScheduledJob IngestionConfiguration *IngestionConfiguration `json:"configuration"` }
type IngestionConfiguration ¶
type IngestionGeneralSource ¶
type IngestionGeneralSource struct { DataSource Fields map[string]interface{} }
ingestion general source
type InputDetail ¶
type InputDetail struct { LogType string `json:"logType"` LogPath string `json:"logPath"` FilePattern string `json:"filePattern"` LocalStorage bool `json:"localStorage"` TimeKey string `json:"timeKey"` TimeFormat string `json:"timeFormat"` LogBeginRegex string `json:"logBeginRegex"` Regex string `json:"regex"` Keys []string `json:"key"` FilterKeys []string `json:"filterKey"` FilterRegex []string `json:"filterRegex"` TopicFormat string `json:"topicFormat"` Separator string `json:"separator"` AutoExtend bool `json:"autoExtend"` }
InputDetail defines log_config input @note : deprecated and no maintenance
func ConvertToInputDetail ¶
func ConvertToInputDetail(detail InputDetailInterface) (*InputDetail, bool)
type InputDetailInterface ¶
type InputDetailInterface interface { }
InputDetailInterface all input detail's interface
type InstanceStatus ¶
type InstanceStatus struct { FromTime int64 ToTime int64 Offset int64 Size int64 State ScheduledSQLState }
type JSONConfigInputDetail ¶
type JSONConfigInputDetail struct { LocalFileConfigInputDetail TimeKey string `json:"timeKey"` }
JSONConfigInputDetail pure json log config
func ConvertToJSONConfigInputDetail ¶
func ConvertToJSONConfigInputDetail(detail InputDetailInterface) (*JSONConfigInputDetail, bool)
type JSONFormat ¶
type JSONFormat struct { StructureDataFormat SkipInvalidRows bool `json:"skipInvalidRows"` }
type JobLogConfig ¶
type JoinConfiguration ¶
type JsonContentDetail ¶
type JsonContentDetail struct {
EnableTag bool `json:"enableTag"`
}
type KafkaPosition ¶
type KafkaPosition string
type KafkaSource ¶
type KafkaSource struct { DataSource Topics string `json:"topics"` BootStrapServers string `json:"bootstrapServers"` ValueType KafkaValueType `json:"valueType"` FromPosition KafkaPosition `json:"fromPosition"` FromTimeStamp int64 `json:"fromTimestamp"` ToTimeStamp int64 `json:"toTimestamp"` TimeField string `json:"timeField"` TimePattern string `json:"timePattern"` TimeFormat string `json:"timeFormat"` TimeZone string `json:"timeZone"` AdditionalProps map[string]string `json:"additionalProps"` }
type LineFormat ¶
type LineFormat struct { OSSDataFormat TimePattern string `json:"timePattern"` }
type ListETLResponse ¶
type LocalFileConfigInputDetail ¶
type LocalFileConfigInputDetail struct { CommonConfigInputDetail LogType string `json:"logType"` LogPath string `json:"logPath"` FilePattern string `json:"filePattern"` TimeFormat string `json:"timeFormat"` TopicFormat string `json:"topicFormat,omitempty"` Preserve bool `json:"preserve"` PreserveDepth int `json:"preserveDepth"` FileEncoding string `json:"fileEncoding,omitempty"` DiscardUnmatch bool `json:"discardUnmatch"` MaxDepth int `json:"maxDepth"` TailExisted bool `json:"tailExisted"` DiscardNonUtf8 bool `json:"discardNonUtf8"` DelaySkipBytes int `json:"delaySkipBytes"` IsDockerFile bool `json:"dockerFile"` DockerIncludeLabel map[string]string `json:"dockerIncludeLabel,omitempty"` DockerExcludeLabel map[string]string `json:"dockerExcludeLabel,omitempty"` DockerIncludeEnv map[string]string `json:"dockerIncludeEnv,omitempty"` DockerExcludeEnv map[string]string `json:"dockerExcludeEnv,omitempty"` PluginDetail map[string]interface{} `json:"plugin,omitempty"` Advanced map[string]interface{} `json:"advanced,omitempty"` }
LocalFileConfigInputDetail all file input detail's basic config
type Log ¶
type Log struct { Time *uint32 `protobuf:"varint,1,req,name=Time" json:"Time,omitempty"` Contents []*LogContent `protobuf:"bytes,2,rep,name=Contents" json:"Contents,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Log) Descriptor ¶
func (*Log) GetContents ¶
func (m *Log) GetContents() []*LogContent
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
type LogConfig ¶
type LogConfig struct { Name string `json:"configName"` LogSample string `json:"logSample"` InputType string `json:"inputType"` // syslog plugin file InputDetail InputDetailInterface `json:"inputDetail"` OutputType string `json:"outputType"` OutputDetail OutputDetail `json:"outputDetail"` CreateTime uint32 `json:"createTime,omitempty"` LastModifyTime uint32 `json:"lastModifyTime,omitempty"` }
LogConfig defines log config
type LogConfigPluginInput ¶
type LogConfigPluginInput struct { Inputs []*PluginInputItem `json:"inputs"` Processors []*PluginInputItem `json:"processors,omitempty"` Aggregators []*PluginInputItem `json:"aggregators,omitempty"` Flushers []*PluginInputItem `json:"flushers,omitempty"` }
type LogContent ¶
type LogContent struct { Key *string `protobuf:"bytes,1,req,name=Key" json:"Key,omitempty"` Value *string `protobuf:"bytes,2,req,name=Value" json:"Value,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*LogContent) Descriptor ¶
func (*LogContent) Descriptor() ([]byte, []int)
func (*LogContent) GetKey ¶
func (m *LogContent) GetKey() string
func (*LogContent) GetValue ¶
func (m *LogContent) GetValue() string
func (*LogContent) Marshal ¶
func (m *LogContent) Marshal() (dAtA []byte, err error)
func (*LogContent) ProtoMessage ¶
func (*LogContent) ProtoMessage()
func (*LogContent) Reset ¶
func (m *LogContent) Reset()
func (*LogContent) Size ¶
func (m *LogContent) Size() (n int)
func (*LogContent) String ¶
func (m *LogContent) String() string
func (*LogContent) Unmarshal ¶
func (m *LogContent) Unmarshal(dAtA []byte) error
type LogGroup ¶
type LogGroup struct { Logs []*Log `protobuf:"bytes,1,rep,name=Logs" json:"Logs,omitempty"` Category *string `protobuf:"bytes,2,opt,name=Category" json:"Category,omitempty"` Topic *string `protobuf:"bytes,3,opt,name=Topic" json:"Topic,omitempty"` Source *string `protobuf:"bytes,4,opt,name=Source" json:"Source,omitempty"` MachineUUID *string `protobuf:"bytes,5,opt,name=MachineUUID" json:"MachineUUID,omitempty"` LogTags []*LogTag `protobuf:"bytes,6,rep,name=LogTags" json:"LogTags,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*LogGroup) Descriptor ¶
func (*LogGroup) GetCategory ¶
func (*LogGroup) GetLogTags ¶
func (*LogGroup) GetMachineUUID ¶
func (*LogGroup) ProtoMessage ¶
func (*LogGroup) ProtoMessage()
type LogGroupList ¶
type LogGroupList struct { LogGroups []*LogGroup `protobuf:"bytes,1,rep,name=LogGroups" json:"LogGroups,omitempty"` XXX_unrecognized []byte `json:"-"` }
func LogsBytesDecode ¶
func LogsBytesDecode(data []byte) (gl *LogGroupList, err error)
LogsBytesDecode decodes logs binary data returned by GetLogsBytes API
func (*LogGroupList) Descriptor ¶
func (*LogGroupList) Descriptor() ([]byte, []int)
func (*LogGroupList) GetLogGroups ¶
func (m *LogGroupList) GetLogGroups() []*LogGroup
func (*LogGroupList) Marshal ¶
func (m *LogGroupList) Marshal() (dAtA []byte, err error)
func (*LogGroupList) ProtoMessage ¶
func (*LogGroupList) ProtoMessage()
func (*LogGroupList) Reset ¶
func (m *LogGroupList) Reset()
func (*LogGroupList) Size ¶
func (m *LogGroupList) Size() (n int)
func (*LogGroupList) String ¶
func (m *LogGroupList) String() string
func (*LogGroupList) Unmarshal ¶
func (m *LogGroupList) Unmarshal(dAtA []byte) error
type LogProject ¶
type LogProject struct { Name string `json:"projectName"` // Project name Description string `json:"description"` // Project description Status string `json:"status"` // Normal Owner string `json:"owner"` // empty Region string `json:"region"` // region id, eg cn-shanghai CreateTime string `json:"createTime"` // unix time seconds, eg 1524539357 LastModifyTime string `json:"lastModifyTime"` // unix time seconds, eg 1524539357 Endpoint string // IP or hostname of SLS endpoint AccessKeyID string AccessKeySecret string SecurityToken string UsingHTTP bool // default https UserAgent string // default defaultLogUserAgent AuthVersion AuthVersionType // contains filtered or unexported fields }
LogProject defines log project
func NewLogProject ¶
func NewLogProject(name, endpoint, accessKeyID, accessKeySecret string) (p *LogProject, err error)
NewLogProject creates a new SLS project.
func (*LogProject) ApplyConfigToMachineGroup ¶
func (p *LogProject) ApplyConfigToMachineGroup(confName, groupName string) (err error)
ApplyConfigToMachineGroup applies config to machine group.
func (*LogProject) CheckConfigExist ¶
func (p *LogProject) CheckConfigExist(name string) (bool, error)
CheckConfigExist check config exist or not
func (*LogProject) CheckLogstoreExist ¶
func (p *LogProject) CheckLogstoreExist(name string) (bool, error)
CheckLogstoreExist check logstore exist or not
func (*LogProject) CheckMachineGroupExist ¶
func (p *LogProject) CheckMachineGroupExist(name string) (bool, error)
CheckMachineGroupExist check machine group exist or not
func (*LogProject) CreateConfig ¶
func (p *LogProject) CreateConfig(c *LogConfig) (err error)
CreateConfig creates a new config in SLS.
func (*LogProject) CreateConfigString ¶
func (p *LogProject) CreateConfigString(c string) (err error)
CreateConfigString creates a new config in SLS.
func (*LogProject) CreateETLJob ¶
func (p *LogProject) CreateETLJob(j *ETLJob) error
CreateETLJob creates a new ETL job in SLS.
func (*LogProject) CreateEtlMeta ¶
func (p *LogProject) CreateEtlMeta(etlMeta *EtlMeta) (err error)
func (*LogProject) CreateLogStore ¶
func (p *LogProject) CreateLogStore(name string, ttl, shardCnt int, autoSplit bool, maxSplitShard int) error
CreateLogStore creates a new logstore in SLS, where name is logstore name, and ttl is time-to-live(in day) of logs, and shardCnt is the number of shards, and autoSplit is auto split, and maxSplitShard is the max number of shard.
func (*LogProject) CreateLogStoreV2 ¶
func (p *LogProject) CreateLogStoreV2(logstore *LogStore) error
CreateLogStoreV2 creates a new logstore in SLS
func (*LogProject) CreateLogging ¶
func (p *LogProject) CreateLogging(detail *Logging) (err error)
func (*LogProject) CreateMachineGroup ¶
func (p *LogProject) CreateMachineGroup(m *MachineGroup) error
CreateMachineGroup creates a new machine group in SLS.
func (*LogProject) DeleteConfig ¶
func (p *LogProject) DeleteConfig(name string) (err error)
DeleteConfig deletes a config according by config name.
func (*LogProject) DeleteETLJob ¶
func (p *LogProject) DeleteETLJob(name string) error
DeleteETLJob deletes a job according to job name.
func (*LogProject) DeleteEtlMeta ¶
func (p *LogProject) DeleteEtlMeta(etlMetaName, etlMetaKey string) (err error)
func (*LogProject) DeleteLogStore ¶
func (p *LogProject) DeleteLogStore(name string) (err error)
DeleteLogStore deletes a logstore according by logstore name.
func (*LogProject) DeleteLogging ¶
func (p *LogProject) DeleteLogging() (err error)
func (*LogProject) DeleteMachineGroup ¶
func (p *LogProject) DeleteMachineGroup(name string) (err error)
DeleteMachineGroup deletes machine group according machine group name.
func (*LogProject) GetAppliedConfigs ¶
func (p *LogProject) GetAppliedConfigs(groupName string) (confNames []string, err error)
GetAppliedConfigs returns applied config names list according machine group name groupName.
func (*LogProject) GetAppliedMachineGroups ¶
func (p *LogProject) GetAppliedMachineGroups(confName string) (groupNames []string, err error)
GetAppliedMachineGroups returns applied machine group names list according config name.
func (*LogProject) GetConfig ¶
func (p *LogProject) GetConfig(name string) (c *LogConfig, err error)
GetConfig returns config according by config name.
func (*LogProject) GetConfigString ¶
func (p *LogProject) GetConfigString(name string) (c string, err error)
GetConfigString returns config according by config name.
func (*LogProject) GetETLJob ¶
func (p *LogProject) GetETLJob(name string) (*ETLJob, error)
GetETLJob returns ETL job according to job name.
func (*LogProject) GetEtlMeta ¶
func (p *LogProject) GetEtlMeta(etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error)
func (*LogProject) GetLogStore ¶
func (p *LogProject) GetLogStore(name string) (*LogStore, error)
GetLogStore returns logstore according by logstore name.
func (*LogProject) GetLogging ¶
func (p *LogProject) GetLogging() (c *Logging, err error)
func (*LogProject) GetMachineGroup ¶
func (p *LogProject) GetMachineGroup(name string) (m *MachineGroup, err error)
GetMachineGroup retruns machine group according by machine group name.
func (*LogProject) ListConfig ¶
func (p *LogProject) ListConfig(offset, size int) (cfgNames []string, total int, err error)
ListConfig returns config names list and the total number of configs. The offset starts from 0 and the size is the max number of configs could be returned.
func (*LogProject) ListETLJobs ¶
func (p *LogProject) ListETLJobs() ([]string, error)
ListETLJobs returns all job names of project.
func (*LogProject) ListEtlMeta ¶
func (*LogProject) ListEtlMetaName ¶
func (*LogProject) ListEtlMetaWithTag ¶
func (*LogProject) ListLogStore ¶
func (p *LogProject) ListLogStore() ([]string, error)
ListLogStore returns all logstore names of project p.
func (*LogProject) ListLogStoreV2 ¶
func (p *LogProject) ListLogStoreV2(offset, size int, telemetryType string) ([]string, error)
ListLogStoreV2 ...
func (*LogProject) ListMachineGroup ¶
func (p *LogProject) ListMachineGroup(offset, size int) (m []string, total int, err error)
ListMachineGroup returns machine group name list and the total number of machine groups. The offset starts from 0 and the size is the max number of machine groups could be returned.
func (*LogProject) RawRequest ¶
func (p *LogProject) RawRequest(method, uri string, headers map[string]string, body []byte) (*http.Response, error)
RawRequest send raw http request to LogService and return the raw http response @note you should call http.Response.Body.Close() to close body stream
func (*LogProject) RemoveConfigFromMachineGroup ¶
func (p *LogProject) RemoveConfigFromMachineGroup(confName, groupName string) (err error)
RemoveConfigFromMachineGroup removes config from machine group.
func (*LogProject) UpdateConfig ¶
func (p *LogProject) UpdateConfig(c *LogConfig) (err error)
UpdateConfig updates a config.
func (*LogProject) UpdateConfigString ¶
func (p *LogProject) UpdateConfigString(configName, c string) (err error)
UpdateConfigString updates a config.
func (*LogProject) UpdateETLJob ¶
func (p *LogProject) UpdateETLJob(name string, job *ETLJob) error
UpdateETLJob updates an ETL job according to job name, Not all fields of ETLJob can be updated
func (*LogProject) UpdateEtlMeta ¶
func (p *LogProject) UpdateEtlMeta(etlMeta *EtlMeta) (err error)
func (*LogProject) UpdateLogStore ¶
func (p *LogProject) UpdateLogStore(name string, ttl, shardCnt int) (err error)
UpdateLogStore updates a logstore according by logstore name, obviously we can't modify the logstore name itself.
func (*LogProject) UpdateLogStoreV2 ¶
func (p *LogProject) UpdateLogStoreV2(logstore *LogStore) (err error)
UpdateLogStoreV2 updates a logstore according by logstore name obviously we can't modify the logstore name itself.
func (*LogProject) UpdateLogging ¶
func (p *LogProject) UpdateLogging(detail *Logging) (err error)
func (*LogProject) UpdateMachineGroup ¶
func (p *LogProject) UpdateMachineGroup(m *MachineGroup) (err error)
UpdateMachineGroup updates a machine group.
func (*LogProject) WithRequestTimeout ¶
func (p *LogProject) WithRequestTimeout(timeout time.Duration) *LogProject
WithRequestTimeout with custom timeout for a request
func (*LogProject) WithRetryTimeout ¶
func (p *LogProject) WithRetryTimeout(timeout time.Duration) *LogProject
WithRetryTimeout with custom timeout for a operation each operation may send one or more HTTP requests in case of retry required.
func (*LogProject) WithToken ¶
func (p *LogProject) WithToken(token string) (*LogProject, error)
WithToken add token parameter
type LogStore ¶
type LogStore struct { Name string `json:"logstoreName"` TTL int `json:"ttl"` ShardCount int `json:"shardCount"` WebTracking bool `json:"enable_tracking"` AutoSplit bool `json:"autoSplit"` MaxSplitShard int `json:"maxSplitShard"` AppendMeta bool `json:"appendMeta"` TelemetryType string `json:"telemetryType"` HotTTL int32 `json:"hot_ttl,omitempty"` Mode string `json:"mode,omitempty"` // "query" or "standard"(default), can't be modified after creation CreateTime uint32 `json:"createTime,omitempty"` LastModifyTime uint32 `json:"lastModifyTime,omitempty"` EncryptConf *EncryptConf `json:"encrypt_conf,omitempty"` ProductType string `json:"productType,omitempty"` // contains filtered or unexported fields }
LogStore defines LogStore struct
func NewLogStore ¶
func NewLogStore(logStoreName string, project *LogProject) (*LogStore, error)
NewLogStore ...
func (*LogStore) CheckIndexExist ¶
CheckIndexExist check index exist or not
func (*LogStore) CreateIndexString ¶
CreateIndexString ...
func (*LogStore) CreateShipper ¶
CreateShipper ...
func (*LogStore) DeleteShipper ¶
DeleteShipper ...
func (*LogStore) GetContextLogs ¶
func (s *LogStore) GetContextLogs(backLines int32, forwardLines int32, packID string, packMeta string) (*GetContextLogsResponse, error)
GetContextLogs ...
func (*LogStore) GetCursor ¶
GetCursor gets log cursor of one shard specified by shardId. The from can be in three form: a) unix timestamp in seccond, b) "begin", c) "end". For more detail please read: https://help.aliyun.com/document_detail/29024.html
func (*LogStore) GetHistograms ¶
func (s *LogStore) GetHistograms(topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
GetHistograms query logs with [from, to) time range
func (*LogStore) GetHistogramsToCompleted ¶
func (s *LogStore) GetHistogramsToCompleted(topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
GetHistogramsToCompleted query logs with [from, to) time range to completed
func (*LogStore) GetIndexString ¶
GetIndexString ...
func (*LogStore) GetLogLines ¶
func (s *LogStore) GetLogLines(topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogLinesResponse, error)
GetLogLines query logs with [from, to) time range
func (*LogStore) GetLogLinesV2 ¶
func (s *LogStore) GetLogLinesV2(req *GetLogRequest) (*GetLogLinesResponse, error)
GetLogLinesV2 query logs with [from, to) time range
func (*LogStore) GetLogs ¶
func (s *LogStore) GetLogs(topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogsResponse, error)
GetLogs query logs with [from, to) time range
func (*LogStore) GetLogsBytes ¶
func (s *LogStore) GetLogsBytes(shardID int, cursor, endCursor string, logGroupMaxCount int) (out []byte, nextCursor string, err error)
GetLogsBytes gets logs binary data from shard specified by shardId according cursor and endCursor. The logGroupMaxCount is the max number of logGroup could be returned. The nextCursor is the next curosr can be used to read logs at next time.
func (*LogStore) GetLogsToCompleted ¶
func (s *LogStore) GetLogsToCompleted(topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogsResponse, error)
GetLogsToCompleted query logs with [from, to) time range to completed
func (*LogStore) GetLogsToCompletedV2 ¶
func (s *LogStore) GetLogsToCompletedV2(req *GetLogRequest) (*GetLogsResponse, error)
GetLogsToCompletedV2 query logs with [from, to) time range to completed
func (*LogStore) GetLogsV2 ¶
func (s *LogStore) GetLogsV2(req *GetLogRequest) (*GetLogsResponse, error)
GetLogsV2 query logs with [from, to) time range
func (*LogStore) GetLogsV3 ¶
func (s *LogStore) GetLogsV3(req *GetLogRequest) (*GetLogsV3Response, error)
GetLogsV3 query logs with [from, to) time range
func (*LogStore) GetShipper ¶
GetShipper ...
func (*LogStore) ListShards ¶
ListShards returns shard id list of this logstore.
func (*LogStore) PostLogStoreLogs ¶
PostLogStoreLogs put logs into Shard logstore by hashKey. The callers should transform user logs into LogGroup.
func (*LogStore) PullLogs ¶
func (s *LogStore) PullLogs(shardID int, cursor, endCursor string, logGroupMaxCount int) (gl *LogGroupList, nextCursor string, err error)
PullLogs gets logs from shard specified by shardId according cursor and endCursor. The logGroupMaxCount is the max number of logGroup could be returned. The nextCursor is the next cursor can be used to read logs at next time. @note if you want to pull logs continuous, set endCursor = ""
func (*LogStore) PutLogs ¶
PutLogs put logs into logstore. The callers should transform user logs into LogGroup.
func (*LogStore) SetPutLogCompressType ¶
SetPutLogCompressType set put log's compress type, default lz4
func (*LogStore) UpdateIndexString ¶
UpdateIndexString ...
func (*LogStore) UpdateShipper ¶
UpdateShipper ...
type LogTag ¶
type LogTag struct { Key *string `protobuf:"bytes,1,req,name=Key" json:"Key,omitempty"` Value *string `protobuf:"bytes,2,req,name=Value" json:"Value,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*LogTag) Descriptor ¶
func (*LogTag) ProtoMessage ¶
func (*LogTag) ProtoMessage()
type Logging ¶
type Logging struct { Project string `json:"loggingProject"` LoggingDetails []*LoggingDetail `json:"loggingDetails"` }
type LoggingDetail ¶
type MachinGroupAttribute ¶
type MachinGroupAttribute struct { ExternalName string `json:"externalName"` TopicName string `json:"groupTopic"` }
MachinGroupAttribute defines machine group attribute
type Machine ¶
type Machine struct { IP string UniqueID string `json:"machine-uniqueid"` UserdefinedID string `json:"userdefined-id"` LastHeartBeatTime int `json:"lastHeartbeatTime"` }
Machine defines machine struct
type MachineGroup ¶
type MachineGroup struct { Name string `json:"groupName"` Type string `json:"groupType"` MachineIDType string `json:"machineIdentifyType"` MachineIDList []string `json:"machineList"` Attribute MachinGroupAttribute `json:"groupAttribute"` CreateTime uint32 `json:"createTime,omitempty"` LastModifyTime uint32 `json:"lastModifyTime,omitempty"` }
MachineGroup defines machine group
type MachineList ¶
MachineList defines machine list
type MetricAggRuleItem ¶
type MetricAggRules ¶
type MetricAggRules struct { ID string Name string Desc string SrcStore string SrcAccessKeyID string // ETL_STS_DEFAULT SrcAccessKeySecret string // acs:ram::${aliuid}:role/aliyunlogetlrole DestEndpoint string // same region, inner endpoint; different region, public endpoint DestProject string DestStore string DestAccessKeyID string // ETL_STS_DEFAULT DestAccessKeySecret string // acs:ram::${aliuid}:role/aliyunlogetlrole AggRules []MetricAggRuleItem }
type MultiLineFormat ¶
type Notification ¶
type Notification struct { Type string `json:"type"` Content string `json:"content"` EmailList []string `json:"emailList,omitempty"` Method string `json:"method,omitempty"` MobileList []string `json:"mobileList,omitempty"` ServiceUri string `json:"serviceUri,omitempty"` Headers map[string]string `json:"headers,omitempty"` }
type OSSCompressionType ¶
type OSSCompressionType string
type OSSContentType ¶
type OSSContentType string
type OSSDataFormat ¶
type OSSDataFormat struct { Type OSSDataFormatType `json:"type"` TimeFormat string `json:"timeFormat"` TimeZone string `json:"timeZone"` }
type OSSShipperConfig ¶
type OSSShipperConfig struct { OssBucket string `json:"ossBucket"` OssPrefix string `json:"ossPrefix"` RoleArn string `json:"roleArn"` BufferInterval int `json:"bufferInterval"` BufferSize int `json:"bufferSize"` CompressType string `json:"compressType"` PathFormat string `json:"pathFormat"` Format string `json:"format"` Storage ShipperStorage `json:"storage"` }
type OrcContentDetail ¶
type OrcContentDetail ColumnStorageContentDetail
type OssStorageJsonDetail ¶
type OssStorageJsonDetail struct {
EnableTag bool `json:"enableTag"`
}
type OssStoreageCsvDetail ¶
type OssStoreageParquet ¶
type OssStoreageParquet struct {
Columns []ParquetConfig `json:"columns"`
}
type OutputDetail ¶
type OutputDetail struct { ProjectName string `json:"projectName"` LogStoreName string `json:"logstoreName"` CompressType string `json:"compressType"` }
OutputDetail defines output
type ParquetConfig ¶
type ParquetContentDetail ¶
type ParquetContentDetail ColumnStorageContentDetail
type ParquetFormat ¶
type ParquetFormat struct {
StructureDataFormat
}
type PluginInputItem ¶
type PluginInputItem struct { Type string `json:"type"` Detail PluginInterface `json:"detail"` }
func CreatePluginInputItem ¶
func CreatePluginInputItem(t string, detail PluginInterface) *PluginInputItem
type PluginInterface ¶
type PluginInterface interface { }
type PluginLogConfigInputDetail ¶
type PluginLogConfigInputDetail struct { CommonConfigInputDetail PluginDetail LogConfigPluginInput `json:"plugin"` }
PluginLogConfigInputDetail plugin log config, eg: docker stdout, binlog, mysql, http...
func ConvertToPluginLogConfigInputDetail ¶
func ConvertToPluginLogConfigInputDetail(detail InputDetailInterface) (*PluginLogConfigInputDetail, bool)
type PolicyConfiguration ¶
type PowerSqlMode ¶
type PowerSqlMode string
power sql
const ( PowerSqlModeAuto PowerSqlMode = "auto" PowerSqlModeEnable PowerSqlMode = "enable" PowerSqlModeDisable PowerSqlMode = "disable" )
type RegexConfigInputDetail ¶
type RegexConfigInputDetail struct { LocalFileConfigInputDetail Key []string `json:"key"` LogBeginRegex string `json:"logBeginRegex"` Regex string `json:"regex"` CustomizedFields string `json:"customizedFields,omitempty"` }
RegexConfigInputDetail regex log config
func ConvertToRegexConfigInputDetail ¶
func ConvertToRegexConfigInputDetail(detail InputDetailInterface) (*RegexConfigInputDetail, bool)
type ResourceActionPolicy ¶
type ResourceActionPolicy struct { ActionPolicyId string `json:"action_policy_id"` ActionPolicyName string `json:"action_policy_name"` IsDefault bool `json:"is_default"` PrimaryPolicyScript string `json:"primary_policy_script"` SecondaryPolicyScript string `json:"secondary_policy_script"` EscalationStartEnabled bool `json:"escalation_start_enabled"` EscalationStartTimeout string `json:"escalation_start_timeout"` EscalationInprogressEnabled bool `json:"escalation_inprogress_enabled"` EscalationInprogressTimeout string `json:"escalation_inprogress_timeout"` EscalationEnabled bool `json:"escalation_enabled"` EscalationTimeout string `json:"escalation_timeout"` Labels map[string]string `json:"labels"` }
ResourceActionPolicy defines how to send alert notifications.
type ResourceAlertPolicy ¶
type ResourceAlertPolicy struct { PolicyId string `json:"policy_id"` PolicyName string `json:"policy_name"` Parent string `json:"parent_id"` IsDefault bool `json:"is_default"` GroupPolicy string `json:"group_script"` InhibitPolicy string `json:"inhibit_script"` SilencePolicy string `json:"silence_script"` }
ResourceAlertPolicy defines how alerts should be grouped, inhibited and silenced.
type ResourceContentTemplate ¶
type ResourceContentTemplate struct { TemplateId string `json:"template_id"` TemplateName string `json:"template_name"` IsDefault bool `json:"is_default"` Templates ResourceTemplates `json:"templates"` }
type ResourceFilterTag ¶
ResourceFilterTag define
type ResourcePool ¶
type ResourcePool string
const ( DEFAULT ResourcePool = "default" ENHANCED ResourcePool = "enhanced" )
type ResourceRecord ¶
type ResourceSchema ¶
type ResourceSchema struct {
Schema []*ResourceSchemaItem `json:"schema"`
}
func (*ResourceSchema) FromJsonString ¶
func (rs *ResourceSchema) FromJsonString(schema string) error
func (*ResourceSchema) ToString ¶
func (rs *ResourceSchema) ToString() string
type ResourceSchemaItem ¶
type ResourceTag ¶
ResourceTag define
type ResourceTagResponse ¶
type ResourceTagResponse struct { ResourceType string `json:"resourceType"` ResourceID string `json:"resourceId"` TagKey string `json:"tagKey"` TagValue string `json:"tagValue"` }
ResourceTagResponse used for ListTagResources
type ResourceTags ¶
type ResourceTags struct { ResourceType string `json:"resourceType"` ResourceID []string `json:"resourceId"` Tags []ResourceTag `json:"tags"` }
ResourceTags tag for tag sls resource, only support project
func NewProjectTags ¶
func NewProjectTags(project string, tags []ResourceTag) *ResourceTags
NewProjectTags create a project tags
func NewResourceTags ¶
func NewResourceTags(resourceType string, resourceId string, tags []ResourceTag) *ResourceTags
NewResourceTags create tags for resource of certain type
type ResourceTemplate ¶
type ResourceTemplate struct { Content string `json:"content"` Locale string `json:"locale"` Title string `json:"title"` Subject string `json:"subject"` SendType string `json:"send_type"` Limit int `json:"limit"` }
ContentTemplate
type ResourceTemplates ¶
type ResourceTemplates struct { Sms ResourceTemplate `json:"sms"` Voice ResourceTemplate `json:"voice"` Email ResourceTemplate `json:"email"` Dingtalk ResourceTemplate `json:"dingtalk"` Webhook ResourceTemplate `json:"webhook"` MessageCenter ResourceTemplate `json:"message_center"` Wechat ResourceTemplate `json:"wechat"` Lark ResourceTemplate `json:"lark"` Slack ResourceTemplate `json:"slack"` }
type ResourceUnTags ¶
type ResourceUnTags struct { ResourceType string `json:"resourceType"` ResourceID []string `json:"resourceId"` Tags []string `json:"tags"` }
ResourceUnTags tag for untag sls resouce
func NewProjectUnTags ¶
func NewProjectUnTags(project string, tags []string) *ResourceUnTags
NewProjectUnTags delete a project tags
func NewResourceUnTags ¶
func NewResourceUnTags(resourceType string, resourceId string, tags []string) *ResourceUnTags
NewResourceUnTags delete tags for resource of certain type
type ResourceUser ¶
type ResourceUser struct { UserId string `json:"user_id"` UserName string `json:"user_name"` Enabled bool `json:"enabled"` CountryCode string `json:"country_code"` Phone string `json:"phone"` Email []string `json:"email"` SmsEnabled bool `json:"sms_enabled"` VoiceEnabled bool `json:"voice_enabled"` }
Notified users.
type ResourceUserGroup ¶
type ResourceUserGroup struct { Id string `json:"user_group_id"` Name string `json:"user_group_name"` Enabled bool `json:"enabled"` Members []string `json:"members"` }
ResourceUserGroup is a collection of users.
type ResourceWebhookHeader ¶
WebhookIntegration is a wrap of webhook notification config.
type ResponseDashboardItem ¶
type ResponseSavedSearchItem ¶
type SavedSearch ¶
type SavedSearch struct { SavedSearchName string `json:"savedsearchName"` SearchQuery string `json:"searchQuery"` Logstore string `json:"logstore"` Topic string `json:"topic"` DisplayName string `json:"displayName"` }
SavedSearch ...
type Schedule ¶
type Schedule struct { Type string `json:"type"` Interval string `json:"interval"` CronExpression string `json:"cronExpression"` Delay int32 `json:"delay"` DayOfWeek int32 `json:"dayOfWeek"` Hour int32 `json:"hour"` RunImmediately bool `json:"runImmediately"` TimeZone string `json:"timeZone,omitempty"` }
type ScheduledJob ¶
type ScheduledSQL ¶
type ScheduledSQL struct { Name string `json:"name"` DisplayName string `json:"displayName"` Description string `json:"description"` Status Status `json:"status"` ScheduleId string `json:"scheduleId"` Configuration *ScheduledSQLConfiguration `json:"configuration"` Schedule *Schedule `json:"schedule"` CreateTime int64 `json:"createTime,omitempty"` LastModifiedTime int64 `json:"lastModifiedTime,omitempty"` Type JobType `json:"type"` }
type ScheduledSQLConfiguration ¶
type ScheduledSQLConfiguration struct { SourceLogStore string `json:"sourceLogstore"` DestProject string `json:"destProject"` DestEndpoint string `json:"destEndpoint"` DestLogStore string `json:"destLogstore"` Script string `json:"script"` SqlType SqlType `json:"sqlType"` ResourcePool ResourcePool `json:"resourcePool"` RoleArn string `json:"roleArn"` DestRoleArn string `json:"destRoleArn"` FromTimeExpr string `json:"fromTimeExpr"` ToTimeExpr string `json:"toTimeExpr"` MaxRunTimeInSeconds int32 `json:"maxRunTimeInSeconds"` MaxRetries int32 `json:"maxRetries"` FromTime int64 `json:"fromTime"` ToTime int64 `json:"toTime"` DataFormat DataFormat `json:"dataFormat"` Parameters *ScheduledSQLParameters `json:"parameters,omitempty"` }
func NewScheduledSQLConfiguration ¶
func NewScheduledSQLConfiguration() *ScheduledSQLConfiguration
type ScheduledSQLJobInstance ¶
type ScheduledSQLJobInstance struct { InstanceId string `json:"instanceId"` JobName string `json:"jobName,omitempty"` DisplayName string `json:"displayName,omitempty"` Description string `json:"description,omitempty"` JobScheduleId string `json:"jobScheduleId,omitempty"` CreateTimeInMillis int64 `json:"createTimeInMillis"` ScheduleTimeInMillis int64 `json:"scheduleTimeInMillis"` UpdateTimeInMillis int64 `json:"updateTimeInMillis"` State ScheduledSQLState `json:"state"` ErrorCode string `json:"errorCode"` ErrorMessage string `json:"errorMessage"` Summary string `json:"summary,omitempty"` }
type ScheduledSQLParameters ¶
type ScheduledSQLParameters struct { TimeKey string `json:"timeKey,omitempty"` LabelKeys string `json:"labelKeys,omitempty"` MetricKeys string `json:"metricKeys,omitempty"` MetricName string `json:"metricName,omitempty"` HashLabels string `json:"hashLabels,omitempty"` AddLabels string `json:"addLabels,omitempty"` }
type ScheduledSQLState ¶
type ScheduledSQLState string
const ( ScheduledSQL_RUNNING ScheduledSQLState = "RUNNING" ScheduledSQL_FAILED ScheduledSQLState = "FAILED" ScheduledSQL_SUCCEEDED ScheduledSQLState = "SUCCEEDED" )
type SensitiveKey ¶
type SeverityConfiguration ¶
type SeverityConfiguration struct { Severity Severity `json:"severity"` EvalCondition ConditionConfiguration `json:"evalCondition"` }
SeverityConfiguration severity config by group
type Shard ¶
type Shard struct { ShardID int `json:"shardID"` Status string `json:"status"` InclusiveBeginKey string `json:"inclusiveBeginKey"` ExclusiveBeginKey string `json:"exclusiveEndKey"` CreateTime int `json:"createTime"` }
Shard defines shard struct
type Shipper ¶
type Shipper struct { ShipperName string `json:"shipperName"` TargetType string `json:"targetType"` RawTargetConfiguration json.RawMessage `json:"targetConfiguration"` TargetConfiguration interface{} `json:"-"` }
func (*Shipper) MarshalJSON ¶
func (*Shipper) UnmarshalJSON ¶
type ShipperStorage ¶
type ShipperStorage struct { Format string `json:"format"` Detail interface{} `json:"detail"` }
type SignerV1 ¶
type SignerV1 struct {
// contains filtered or unexported fields
}
SignerV1 version v1
func NewSignerV1 ¶
type SignerV4 ¶
type SignerV4 struct {
// contains filtered or unexported fields
}
SignerV4 sign version v4, a non-empty region is required
func NewSignerV4 ¶
type SingleHistogram ¶
type SingleHistogram struct { Progress string `json:"progress"` Count int64 `json:"count"` From int64 `json:"from"` To int64 `json:"to"` }
GetHistogramsResponse defines response from GetHistograms call
type SinkAlerthubConfiguration ¶
type SinkAlerthubConfiguration struct {
Enabled bool `json:"enabled"`
}
type SinkCmsConfiguration ¶
type SinkCmsConfiguration struct {
Enabled bool `json:"enabled"`
}
type SlsLogPackage ¶
type SlsLogPackage struct { Data []byte `protobuf:"bytes,1,req,name=data" json:"data,omitempty"` UncompressSize *int32 `protobuf:"varint,2,opt,name=uncompress_size,json=uncompressSize" json:"uncompress_size,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*SlsLogPackage) Descriptor ¶
func (*SlsLogPackage) Descriptor() ([]byte, []int)
func (*SlsLogPackage) GetData ¶
func (m *SlsLogPackage) GetData() []byte
func (*SlsLogPackage) GetUncompressSize ¶
func (m *SlsLogPackage) GetUncompressSize() int32
func (*SlsLogPackage) Marshal ¶
func (m *SlsLogPackage) Marshal() (dAtA []byte, err error)
func (*SlsLogPackage) ProtoMessage ¶
func (*SlsLogPackage) ProtoMessage()
func (*SlsLogPackage) Reset ¶
func (m *SlsLogPackage) Reset()
func (*SlsLogPackage) Size ¶
func (m *SlsLogPackage) Size() (n int)
func (*SlsLogPackage) String ¶
func (m *SlsLogPackage) String() string
func (*SlsLogPackage) Unmarshal ¶
func (m *SlsLogPackage) Unmarshal(dAtA []byte) error
type SlsLogPackageList ¶
type SlsLogPackageList struct { Packages []*SlsLogPackage `protobuf:"bytes,1,rep,name=packages" json:"packages,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*SlsLogPackageList) Descriptor ¶
func (*SlsLogPackageList) Descriptor() ([]byte, []int)
func (*SlsLogPackageList) GetPackages ¶
func (m *SlsLogPackageList) GetPackages() []*SlsLogPackage
func (*SlsLogPackageList) Marshal ¶
func (m *SlsLogPackageList) Marshal() (dAtA []byte, err error)
func (*SlsLogPackageList) MarshalTo ¶
func (m *SlsLogPackageList) MarshalTo(dAtA []byte) (int, error)
func (*SlsLogPackageList) ProtoMessage ¶
func (*SlsLogPackageList) ProtoMessage()
func (*SlsLogPackageList) Reset ¶
func (m *SlsLogPackageList) Reset()
func (*SlsLogPackageList) Size ¶
func (m *SlsLogPackageList) Size() (n int)
func (*SlsLogPackageList) String ¶
func (m *SlsLogPackageList) String() string
func (*SlsLogPackageList) Unmarshal ¶
func (m *SlsLogPackageList) Unmarshal(dAtA []byte) error
type SourceConfig ¶
type SourceConfig struct {
LogstoreName string `json:"logstoreName"`
}
type StreamLogConfigInputDetail ¶
type StreamLogConfigInputDetail struct { CommonConfigInputDetail Tag string `json:"tag"` }
StreamLogConfigInputDetail syslog config
func ConvertToStreamLogConfigInputDetail ¶
func ConvertToStreamLogConfigInputDetail(detail InputDetailInterface) (*StreamLogConfigInputDetail, bool)
type StructureDataFormat ¶
type StructureDataFormat struct { OSSDataFormat TimeField string `json:"timeField"` }
type SubStore ¶
type SubStore struct { Name string `json:"name,omitempty"` TTL int `json:"ttl"` SortedKeyCount int `json:"sortedKeyCount"` TimeIndex int `json:"timeIndex"` Keys []SubStoreKey `json:"keys"` }
SubStore define
func NewSubStore ¶
func NewSubStore(name string, ttl int, sortedKeyCount int, timeIndex int, keys []SubStoreKey) *SubStore
NewSubStore create a new sorted sub store
type SubStoreKey ¶
SubStoreKey key define
type TemplateConfiguration ¶
type TokenAutoUpdateClient ¶
type TokenAutoUpdateClient struct {
// contains filtered or unexported fields
}
func (*TokenAutoUpdateClient) ApplyConfigToMachineGroup ¶
func (c *TokenAutoUpdateClient) ApplyConfigToMachineGroup(project string, confName, groupName string) (err error)
func (*TokenAutoUpdateClient) CheckConfigExist ¶
func (c *TokenAutoUpdateClient) CheckConfigExist(project string, config string) (ok bool, err error)
func (*TokenAutoUpdateClient) CheckLogstoreExist ¶
func (c *TokenAutoUpdateClient) CheckLogstoreExist(project string, logstore string) (ok bool, err error)
func (*TokenAutoUpdateClient) CheckMachineGroupExist ¶
func (c *TokenAutoUpdateClient) CheckMachineGroupExist(project string, machineGroup string) (ok bool, err error)
func (*TokenAutoUpdateClient) CheckProjectExist ¶
func (c *TokenAutoUpdateClient) CheckProjectExist(name string) (ok bool, err error)
func (*TokenAutoUpdateClient) Close ¶
func (c *TokenAutoUpdateClient) Close() error
func (*TokenAutoUpdateClient) CreateAlert ¶
func (c *TokenAutoUpdateClient) CreateAlert(project string, alert *Alert) (err error)
func (*TokenAutoUpdateClient) CreateAlertString ¶
func (c *TokenAutoUpdateClient) CreateAlertString(project string, alert string) (err error)
func (*TokenAutoUpdateClient) CreateChart ¶
func (c *TokenAutoUpdateClient) CreateChart(project, dashboardName string, chart Chart) (err error)
func (*TokenAutoUpdateClient) CreateConfig ¶
func (c *TokenAutoUpdateClient) CreateConfig(project string, config *LogConfig) (err error)
func (*TokenAutoUpdateClient) CreateConfigString ¶
func (c *TokenAutoUpdateClient) CreateConfigString(project string, config string) (err error)
func (*TokenAutoUpdateClient) CreateConsumerGroup ¶
func (c *TokenAutoUpdateClient) CreateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
func (*TokenAutoUpdateClient) CreateDashboard ¶
func (c *TokenAutoUpdateClient) CreateDashboard(project string, dashboard Dashboard) (err error)
func (*TokenAutoUpdateClient) CreateDashboardString ¶
func (c *TokenAutoUpdateClient) CreateDashboardString(project string, dashboardStr string) (err error)
func (*TokenAutoUpdateClient) CreateETL ¶
func (c *TokenAutoUpdateClient) CreateETL(project string, etljob ETL) (err error)
func (*TokenAutoUpdateClient) CreateEtlMeta ¶
func (c *TokenAutoUpdateClient) CreateEtlMeta(project string, etlMeta *EtlMeta) (err error)
func (*TokenAutoUpdateClient) CreateEventStore ¶
func (c *TokenAutoUpdateClient) CreateEventStore(project string, eventStore *LogStore) (err error)
func (*TokenAutoUpdateClient) CreateExport ¶
func (c *TokenAutoUpdateClient) CreateExport(project string, export *Export) (err error)
func (*TokenAutoUpdateClient) CreateIndex ¶
func (c *TokenAutoUpdateClient) CreateIndex(project, logstore string, index Index) (err error)
func (*TokenAutoUpdateClient) CreateIndexString ¶
func (c *TokenAutoUpdateClient) CreateIndexString(project, logstore string, index string) (err error)
func (*TokenAutoUpdateClient) CreateIngestion ¶
func (c *TokenAutoUpdateClient) CreateIngestion(project string, ingestion *Ingestion) (err error)
####################### Ingestion API ######################
func (*TokenAutoUpdateClient) CreateLogStore ¶
func (*TokenAutoUpdateClient) CreateLogStoreV2 ¶
func (c *TokenAutoUpdateClient) CreateLogStoreV2(project string, logstore *LogStore) (err error)
func (*TokenAutoUpdateClient) CreateMachineGroup ¶
func (c *TokenAutoUpdateClient) CreateMachineGroup(project string, m *MachineGroup) (err error)
func (*TokenAutoUpdateClient) CreateMetricStore ¶
func (c *TokenAutoUpdateClient) CreateMetricStore(project string, metricStore *LogStore) (err error)
func (*TokenAutoUpdateClient) CreateProject ¶
func (c *TokenAutoUpdateClient) CreateProject(name, description string) (prj *LogProject, err error)
func (*TokenAutoUpdateClient) CreateResource ¶
func (c *TokenAutoUpdateClient) CreateResource(resource *Resource) (err error)
func (*TokenAutoUpdateClient) CreateResourceRecord ¶
func (c *TokenAutoUpdateClient) CreateResourceRecord(resourceName string, record *ResourceRecord) (err error)
func (*TokenAutoUpdateClient) CreateResourceRecordString ¶
func (c *TokenAutoUpdateClient) CreateResourceRecordString(resourceName, recordStr string) (err error)
func (*TokenAutoUpdateClient) CreateResourceString ¶
func (c *TokenAutoUpdateClient) CreateResourceString(resourceStr string) (err error)
func (*TokenAutoUpdateClient) CreateSavedSearch ¶
func (c *TokenAutoUpdateClient) CreateSavedSearch(project string, savedSearch *SavedSearch) (err error)
func (*TokenAutoUpdateClient) CreateScheduledSQL ¶
func (c *TokenAutoUpdateClient) CreateScheduledSQL(project string, scheduledsql *ScheduledSQL) (err error)
####################### Scheduled SQL API ######################
func (*TokenAutoUpdateClient) DeleteAlert ¶
func (c *TokenAutoUpdateClient) DeleteAlert(project string, alertName string) (err error)
func (*TokenAutoUpdateClient) DeleteChart ¶
func (c *TokenAutoUpdateClient) DeleteChart(project, dashboardName, chartName string) (err error)
func (*TokenAutoUpdateClient) DeleteConfig ¶
func (c *TokenAutoUpdateClient) DeleteConfig(project string, config string) (err error)
func (*TokenAutoUpdateClient) DeleteConsumerGroup ¶
func (c *TokenAutoUpdateClient) DeleteConsumerGroup(project, logstore string, cgName string) (err error)
func (*TokenAutoUpdateClient) DeleteDashboard ¶
func (c *TokenAutoUpdateClient) DeleteDashboard(project, name string) (err error)
func (*TokenAutoUpdateClient) DeleteETL ¶
func (c *TokenAutoUpdateClient) DeleteETL(project string, etlName string) (err error)
func (*TokenAutoUpdateClient) DeleteEtlMeta ¶
func (c *TokenAutoUpdateClient) DeleteEtlMeta(project string, etlMetaName, etlMetaKey string) (err error)
func (*TokenAutoUpdateClient) DeleteEventStore ¶
func (c *TokenAutoUpdateClient) DeleteEventStore(project, name string) (err error)
func (*TokenAutoUpdateClient) DeleteExport ¶
func (c *TokenAutoUpdateClient) DeleteExport(project string, name string) (err error)
func (*TokenAutoUpdateClient) DeleteIndex ¶
func (c *TokenAutoUpdateClient) DeleteIndex(project, logstore string) (err error)
func (*TokenAutoUpdateClient) DeleteIngestion ¶
func (c *TokenAutoUpdateClient) DeleteIngestion(project string, name string) (err error)
func (*TokenAutoUpdateClient) DeleteLogStore ¶
func (c *TokenAutoUpdateClient) DeleteLogStore(project string, logstore string) (err error)
func (*TokenAutoUpdateClient) DeleteMachineGroup ¶
func (c *TokenAutoUpdateClient) DeleteMachineGroup(project string, machineGroup string) (err error)
func (*TokenAutoUpdateClient) DeleteMetricStore ¶
func (c *TokenAutoUpdateClient) DeleteMetricStore(project, name string) (err error)
func (*TokenAutoUpdateClient) DeleteProject ¶
func (c *TokenAutoUpdateClient) DeleteProject(name string) (err error)
func (*TokenAutoUpdateClient) DeleteProjectPolicy ¶
func (c *TokenAutoUpdateClient) DeleteProjectPolicy(project string) (err error)
func (*TokenAutoUpdateClient) DeleteResource ¶
func (c *TokenAutoUpdateClient) DeleteResource(name string) (err error)
func (*TokenAutoUpdateClient) DeleteResourceRecord ¶
func (c *TokenAutoUpdateClient) DeleteResourceRecord(resourceName, recordId string) (err error)
func (*TokenAutoUpdateClient) DeleteSavedSearch ¶
func (c *TokenAutoUpdateClient) DeleteSavedSearch(project string, savedSearchName string) (err error)
func (*TokenAutoUpdateClient) DeleteScheduledSQL ¶
func (c *TokenAutoUpdateClient) DeleteScheduledSQL(project string, name string) (err error)
func (*TokenAutoUpdateClient) DisableAlert ¶
func (c *TokenAutoUpdateClient) DisableAlert(project string, alertName string) (err error)
func (*TokenAutoUpdateClient) EnableAlert ¶
func (c *TokenAutoUpdateClient) EnableAlert(project string, alertName string) (err error)
func (*TokenAutoUpdateClient) GetAlert ¶
func (c *TokenAutoUpdateClient) GetAlert(project string, alertName string) (alert *Alert, err error)
func (*TokenAutoUpdateClient) GetAlertString ¶
func (c *TokenAutoUpdateClient) GetAlertString(project string, alertName string) (alert string, err error)
func (*TokenAutoUpdateClient) GetAppliedConfigs ¶
func (c *TokenAutoUpdateClient) GetAppliedConfigs(project string, groupName string) (confNames []string, err error)
func (*TokenAutoUpdateClient) GetAppliedMachineGroups ¶
func (c *TokenAutoUpdateClient) GetAppliedMachineGroups(project string, confName string) (groupNames []string, err error)
func (*TokenAutoUpdateClient) GetChart ¶
func (c *TokenAutoUpdateClient) GetChart(project, dashboardName, chartName string) (chart *Chart, err error)
func (*TokenAutoUpdateClient) GetCheckpoint ¶
func (c *TokenAutoUpdateClient) GetCheckpoint(project, logstore string, cgName string) (checkPointList []*ConsumerGroupCheckPoint, err error)
func (*TokenAutoUpdateClient) GetConfig ¶
func (c *TokenAutoUpdateClient) GetConfig(project string, config string) (logConfig *LogConfig, err error)
func (*TokenAutoUpdateClient) GetConfigString ¶
func (c *TokenAutoUpdateClient) GetConfigString(project string, config string) (logConfig string, err error)
func (*TokenAutoUpdateClient) GetCursorTime ¶
func (*TokenAutoUpdateClient) GetDashboard ¶
func (c *TokenAutoUpdateClient) GetDashboard(project, name string) (dashboard *Dashboard, err error)
func (*TokenAutoUpdateClient) GetDashboardString ¶
func (c *TokenAutoUpdateClient) GetDashboardString(project, name string) (dashboard string, err error)
func (*TokenAutoUpdateClient) GetETL ¶
func (c *TokenAutoUpdateClient) GetETL(project string, etlName string) (ETLJob *ETL, err error)
func (*TokenAutoUpdateClient) GetEtlMeta ¶
func (c *TokenAutoUpdateClient) GetEtlMeta(project string, etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error)
func (*TokenAutoUpdateClient) GetEventStore ¶
func (c *TokenAutoUpdateClient) GetEventStore(project, name string) (eventStore *LogStore, err error)
func (*TokenAutoUpdateClient) GetExport ¶
func (c *TokenAutoUpdateClient) GetExport(project, name string) (export *Export, err error)
func (*TokenAutoUpdateClient) GetHistograms ¶
func (c *TokenAutoUpdateClient) GetHistograms(project, logstore string, topic string, from int64, to int64, queryExp string) (h *GetHistogramsResponse, err error)
func (*TokenAutoUpdateClient) GetHistogramsToCompleted ¶
func (c *TokenAutoUpdateClient) GetHistogramsToCompleted(project, logstore string, topic string, from int64, to int64, queryExp string) (h *GetHistogramsResponse, err error)
func (*TokenAutoUpdateClient) GetIndex ¶
func (c *TokenAutoUpdateClient) GetIndex(project, logstore string) (index *Index, err error)
func (*TokenAutoUpdateClient) GetIndexString ¶
func (c *TokenAutoUpdateClient) GetIndexString(project, logstore string) (index string, err error)
func (*TokenAutoUpdateClient) GetIngestion ¶
func (c *TokenAutoUpdateClient) GetIngestion(project string, name string) (ingestion *Ingestion, err error)
func (*TokenAutoUpdateClient) GetLogLines ¶
func (*TokenAutoUpdateClient) GetLogLinesV2 ¶
func (c *TokenAutoUpdateClient) GetLogLinesV2(project, logstore string, req *GetLogRequest) (r *GetLogLinesResponse, err error)
func (*TokenAutoUpdateClient) GetLogStore ¶
func (c *TokenAutoUpdateClient) GetLogStore(project string, logstore string) (logstoreRst *LogStore, err error)
func (*TokenAutoUpdateClient) GetLogsBytes ¶
func (*TokenAutoUpdateClient) GetLogsToCompleted ¶
func (*TokenAutoUpdateClient) GetLogsToCompletedV2 ¶
func (c *TokenAutoUpdateClient) GetLogsToCompletedV2(project, logstore string, req *GetLogRequest) (r *GetLogsResponse, err error)
func (*TokenAutoUpdateClient) GetLogsV2 ¶
func (c *TokenAutoUpdateClient) GetLogsV2(project, logstore string, req *GetLogRequest) (r *GetLogsResponse, err error)
func (*TokenAutoUpdateClient) GetLogsV3 ¶
func (c *TokenAutoUpdateClient) GetLogsV3(project, logstore string, req *GetLogRequest) (r *GetLogsV3Response, err error)
func (*TokenAutoUpdateClient) GetMachineGroup ¶
func (c *TokenAutoUpdateClient) GetMachineGroup(project string, machineGroup string) (m *MachineGroup, err error)
func (*TokenAutoUpdateClient) GetMetricStore ¶
func (c *TokenAutoUpdateClient) GetMetricStore(project, name string) (metricStore *LogStore, err error)
func (*TokenAutoUpdateClient) GetProject ¶
func (c *TokenAutoUpdateClient) GetProject(name string) (prj *LogProject, err error)
func (*TokenAutoUpdateClient) GetProjectPolicy ¶
func (c *TokenAutoUpdateClient) GetProjectPolicy(project string) (policy string, err error)
func (*TokenAutoUpdateClient) GetResource ¶
func (c *TokenAutoUpdateClient) GetResource(name string) (resource *Resource, err error)
func (*TokenAutoUpdateClient) GetResourceRecord ¶
func (c *TokenAutoUpdateClient) GetResourceRecord(resourceName, recordId string) (record *ResourceRecord, err error)
func (*TokenAutoUpdateClient) GetResourceRecordString ¶
func (c *TokenAutoUpdateClient) GetResourceRecordString(resourceName, name string) (record string, err error)
func (*TokenAutoUpdateClient) GetResourceString ¶
func (c *TokenAutoUpdateClient) GetResourceString(name string) (resource string, err error)
func (*TokenAutoUpdateClient) GetSavedSearch ¶
func (c *TokenAutoUpdateClient) GetSavedSearch(project string, savedSearchName string) (savedSearch *SavedSearch, err error)
func (*TokenAutoUpdateClient) GetScheduledSQL ¶
func (c *TokenAutoUpdateClient) GetScheduledSQL(project string, name string) (s *ScheduledSQL, err error)
func (*TokenAutoUpdateClient) GetScheduledSQLJobInstance ¶
func (c *TokenAutoUpdateClient) GetScheduledSQLJobInstance(projectName, jobName, instanceId string, result bool) (instance *ScheduledSQLJobInstance, err error)
func (*TokenAutoUpdateClient) ListConfig ¶
func (*TokenAutoUpdateClient) ListConsumerGroup ¶
func (c *TokenAutoUpdateClient) ListConsumerGroup(project, logstore string) (cgList []*ConsumerGroup, err error)
func (*TokenAutoUpdateClient) ListDashboard ¶
func (*TokenAutoUpdateClient) ListDashboardV2 ¶
func (c *TokenAutoUpdateClient) ListDashboardV2(project string, dashboardName string, offset, size int) (dashboardList []string, dashboardItems []ResponseDashboardItem, count, total int, err error)
func (*TokenAutoUpdateClient) ListETL ¶
func (c *TokenAutoUpdateClient) ListETL(project string, offset int, size int) (ETLResponse *ListETLResponse, err error)
func (*TokenAutoUpdateClient) ListEtlMeta ¶
func (*TokenAutoUpdateClient) ListEtlMetaName ¶
func (*TokenAutoUpdateClient) ListEtlMetaWithTag ¶
func (*TokenAutoUpdateClient) ListEventStore ¶
func (c *TokenAutoUpdateClient) ListEventStore(project string, offset, size int) (eventStores []string, err error)
func (*TokenAutoUpdateClient) ListExport ¶
func (*TokenAutoUpdateClient) ListIngestion ¶
func (*TokenAutoUpdateClient) ListLogStore ¶
func (c *TokenAutoUpdateClient) ListLogStore(project string) (logstoreList []string, err error)
func (*TokenAutoUpdateClient) ListMachineGroup ¶
func (*TokenAutoUpdateClient) ListMachines ¶
func (c *TokenAutoUpdateClient) ListMachines(project, machineGroupName string) (ms []*Machine, total int, err error)
func (*TokenAutoUpdateClient) ListProject ¶
func (c *TokenAutoUpdateClient) ListProject() (projectNames []string, err error)
func (*TokenAutoUpdateClient) ListProjectV2 ¶
func (c *TokenAutoUpdateClient) ListProjectV2(offset, size int) (projects []LogProject, count, total int, err error)
func (*TokenAutoUpdateClient) ListResource ¶
func (c *TokenAutoUpdateClient) ListResource(resourceType string, resourceName string, offset, size int) (resourceList []*Resource, count, total int, err error)
####################### Resource API ######################
func (*TokenAutoUpdateClient) ListResourceRecord ¶
func (c *TokenAutoUpdateClient) ListResourceRecord(resourceName string, offset, size int) (recordList []*ResourceRecord, count, total int, err error)
####################### Resource Record API ######################
func (*TokenAutoUpdateClient) ListSavedSearch ¶
func (*TokenAutoUpdateClient) ListSavedSearchV2 ¶
func (c *TokenAutoUpdateClient) ListSavedSearchV2(project string, savedSearchName string, offset, size int) (savedSearches []string, savedsearchItems []ResponseSavedSearchItem, total int, count int, err error)
func (*TokenAutoUpdateClient) ListScheduledSQL ¶
func (c *TokenAutoUpdateClient) ListScheduledSQL(project, name, displayName string, offset, size int) (scheduledsqls []*ScheduledSQL, total, count int, err error)
func (*TokenAutoUpdateClient) ListScheduledSQLJobInstances ¶
func (c *TokenAutoUpdateClient) ListScheduledSQLJobInstances(projectName, jobName string, status *InstanceStatus) (instances []*ScheduledSQLJobInstance, total, count int64, err error)
func (*TokenAutoUpdateClient) ListShards ¶
func (c *TokenAutoUpdateClient) ListShards(project, logstore string) (shardIDs []*Shard, err error)
func (*TokenAutoUpdateClient) ListTagResources ¶
func (c *TokenAutoUpdateClient) ListTagResources(project string, resourceType string, resourceIDs []string, tags []ResourceFilterTag, nextToken string) (respTags []*ResourceTagResponse, respNextToken string, err error)
ListTagResources list rag resources
func (*TokenAutoUpdateClient) MergeShards ¶
func (c *TokenAutoUpdateClient) MergeShards(project, logstore string, shardID int) (shards []*Shard, err error)
func (*TokenAutoUpdateClient) ModifyScheduledSQLJobInstanceState ¶
func (c *TokenAutoUpdateClient) ModifyScheduledSQLJobInstanceState(projectName, jobName, instanceId string, state ScheduledSQLState) (err error)
func (*TokenAutoUpdateClient) PostLogStoreLogs ¶
func (c *TokenAutoUpdateClient) PostLogStoreLogs(project, logstore string, lg *LogGroup, hashKey *string) (err error)
func (*TokenAutoUpdateClient) PublishAlertEvent ¶
func (c *TokenAutoUpdateClient) PublishAlertEvent(project string, alertResult []byte) error
func (*TokenAutoUpdateClient) PullLogs ¶
func (c *TokenAutoUpdateClient) PullLogs(project, logstore string, shardID int, cursor, endCursor string, logGroupMaxCount int) (gl *LogGroupList, nextCursor string, err error)
func (*TokenAutoUpdateClient) PutLogs ¶
func (c *TokenAutoUpdateClient) PutLogs(project, logstore string, lg *LogGroup) (err error)
func (*TokenAutoUpdateClient) PutLogsWithCompressType ¶
func (c *TokenAutoUpdateClient) PutLogsWithCompressType(project, logstore string, lg *LogGroup, compressType int) (err error)
func (*TokenAutoUpdateClient) PutRawLogWithCompressType ¶
func (c *TokenAutoUpdateClient) PutRawLogWithCompressType(project, logstore string, rawLogData []byte, compressType int) (err error)
PutRawLogWithCompressType put raw log data to log service, no marshal
func (*TokenAutoUpdateClient) RemoveConfigFromMachineGroup ¶
func (c *TokenAutoUpdateClient) RemoveConfigFromMachineGroup(project string, confName, groupName string) (err error)
func (*TokenAutoUpdateClient) ResetAccessKeyToken ¶
func (c *TokenAutoUpdateClient) ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string)
func (*TokenAutoUpdateClient) RestartETL ¶
func (c *TokenAutoUpdateClient) RestartETL(project string, etljob ETL) (err error)
func (*TokenAutoUpdateClient) RestartExport ¶
func (c *TokenAutoUpdateClient) RestartExport(project string, export *Export) (err error)
func (*TokenAutoUpdateClient) SetAuthVersion ¶
func (c *TokenAutoUpdateClient) SetAuthVersion(version AuthVersionType)
SetAuthVersion set auth version that the client used
func (*TokenAutoUpdateClient) SetHTTPClient ¶
func (c *TokenAutoUpdateClient) SetHTTPClient(client *http.Client)
SetHTTPClient set a custom http client, all request will send to sls by this client
func (*TokenAutoUpdateClient) SetRegion ¶
func (c *TokenAutoUpdateClient) SetRegion(region string)
SetRegion set a region, must be set if using signature version v4
func (*TokenAutoUpdateClient) SetUserAgent ¶
func (c *TokenAutoUpdateClient) SetUserAgent(userAgent string)
func (*TokenAutoUpdateClient) SplitNumShard ¶
func (c *TokenAutoUpdateClient) SplitNumShard(project, logstore string, shardID, shardNum int) (shards []*Shard, err error)
func (*TokenAutoUpdateClient) SplitShard ¶
func (*TokenAutoUpdateClient) StartETL ¶
func (c *TokenAutoUpdateClient) StartETL(project string, name string) (err error)
func (*TokenAutoUpdateClient) StopETL ¶
func (c *TokenAutoUpdateClient) StopETL(project string, name string) (err error)
func (*TokenAutoUpdateClient) TagResources ¶
func (c *TokenAutoUpdateClient) TagResources(project string, tags *ResourceTags) (err error)
####################### Resource Tags API ###################### TagResources tag specific resource
func (*TokenAutoUpdateClient) UnTagResources ¶
func (c *TokenAutoUpdateClient) UnTagResources(project string, tags *ResourceUnTags) (err error)
UnTagResources untag specific resource
func (*TokenAutoUpdateClient) UpdateAlert ¶
func (c *TokenAutoUpdateClient) UpdateAlert(project string, alert *Alert) (err error)
func (*TokenAutoUpdateClient) UpdateAlertString ¶
func (c *TokenAutoUpdateClient) UpdateAlertString(project string, alertName, alert string) (err error)
func (*TokenAutoUpdateClient) UpdateChart ¶
func (c *TokenAutoUpdateClient) UpdateChart(project, dashboardName string, chart Chart) (err error)
func (*TokenAutoUpdateClient) UpdateCheckpoint ¶
func (*TokenAutoUpdateClient) UpdateConfig ¶
func (c *TokenAutoUpdateClient) UpdateConfig(project string, config *LogConfig) (err error)
func (*TokenAutoUpdateClient) UpdateConfigString ¶
func (c *TokenAutoUpdateClient) UpdateConfigString(project string, configName, configDetail string) (err error)
func (*TokenAutoUpdateClient) UpdateConsumerGroup ¶
func (c *TokenAutoUpdateClient) UpdateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
func (*TokenAutoUpdateClient) UpdateDashboard ¶
func (c *TokenAutoUpdateClient) UpdateDashboard(project string, dashboard Dashboard) (err error)
func (*TokenAutoUpdateClient) UpdateDashboardString ¶
func (c *TokenAutoUpdateClient) UpdateDashboardString(project string, dashboardName, dashboardStr string) (err error)
func (*TokenAutoUpdateClient) UpdateETL ¶
func (c *TokenAutoUpdateClient) UpdateETL(project string, etljob ETL) (err error)
func (*TokenAutoUpdateClient) UpdateEtlMeta ¶
func (c *TokenAutoUpdateClient) UpdateEtlMeta(project string, etlMeta *EtlMeta) (err error)
func (*TokenAutoUpdateClient) UpdateEventStore ¶
func (c *TokenAutoUpdateClient) UpdateEventStore(project string, eventStore *LogStore) (err error)
func (*TokenAutoUpdateClient) UpdateExport ¶
func (c *TokenAutoUpdateClient) UpdateExport(project string, export *Export) (err error)
func (*TokenAutoUpdateClient) UpdateIndex ¶
func (c *TokenAutoUpdateClient) UpdateIndex(project, logstore string, index Index) (err error)
func (*TokenAutoUpdateClient) UpdateIndexString ¶
func (c *TokenAutoUpdateClient) UpdateIndexString(project, logstore string, index string) (err error)
func (*TokenAutoUpdateClient) UpdateIngestion ¶
func (c *TokenAutoUpdateClient) UpdateIngestion(project string, ingestion *Ingestion) (err error)
func (*TokenAutoUpdateClient) UpdateLogStore ¶
func (c *TokenAutoUpdateClient) UpdateLogStore(project string, logstore string, ttl, shardCnt int) (err error)
func (*TokenAutoUpdateClient) UpdateLogStoreV2 ¶
func (c *TokenAutoUpdateClient) UpdateLogStoreV2(project string, logstore *LogStore) (err error)
func (*TokenAutoUpdateClient) UpdateMachineGroup ¶
func (c *TokenAutoUpdateClient) UpdateMachineGroup(project string, m *MachineGroup) (err error)
func (*TokenAutoUpdateClient) UpdateMetricStore ¶
func (c *TokenAutoUpdateClient) UpdateMetricStore(project string, metricStore *LogStore) (err error)
func (*TokenAutoUpdateClient) UpdateProject ¶
func (c *TokenAutoUpdateClient) UpdateProject(name, description string) (prj *LogProject, err error)
UpdateProject create a new loghub project.
func (*TokenAutoUpdateClient) UpdateProjectPolicy ¶
func (c *TokenAutoUpdateClient) UpdateProjectPolicy(project, policy string) (err error)
func (*TokenAutoUpdateClient) UpdateResource ¶
func (c *TokenAutoUpdateClient) UpdateResource(resource *Resource) (err error)
func (*TokenAutoUpdateClient) UpdateResourceRecord ¶
func (c *TokenAutoUpdateClient) UpdateResourceRecord(resourceName string, record *ResourceRecord) (err error)
func (*TokenAutoUpdateClient) UpdateResourceRecordString ¶
func (c *TokenAutoUpdateClient) UpdateResourceRecordString(resourceName, recordStr string) (err error)
func (*TokenAutoUpdateClient) UpdateResourceString ¶
func (c *TokenAutoUpdateClient) UpdateResourceString(resourceName, resourceStr string) (err error)
func (*TokenAutoUpdateClient) UpdateSavedSearch ¶
func (c *TokenAutoUpdateClient) UpdateSavedSearch(project string, savedSearch *SavedSearch) (err error)
func (*TokenAutoUpdateClient) UpdateScheduledSQL ¶
func (c *TokenAutoUpdateClient) UpdateScheduledSQL(project string, scheduledsql *ScheduledSQL) (err error)
type TriggerConfig ¶
type UpdateTokenFunction ¶
type WebhookIntegration ¶
Source Files ¶
- client.go
- client_alert.go
- client_alert_resource.go
- client_consumer.go
- client_dashboard.go
- client_etl.go
- client_event_store.go
- client_interface.go
- client_job.go
- client_metric_agg.go
- client_metric_store.go
- client_project.go
- client_project_policy.go
- client_request.go
- client_resource.go
- client_resource_record.go
- client_scheduled_sql.go
- client_store.go
- client_tag.go
- config.go
- error_code.go
- errors.go
- etl_job.go
- etl_job_project.go
- etl_meta.go
- log.pb.go
- log_config.go
- log_config_plugin.go
- log_logging.go
- log_project.go
- log_store.go
- log_store_shiper.go
- logger.go
- machine_group.go
- model.go
- oss_shipper_config.go
- request.go
- retry.go
- signature.go
- signature_v4.go
- sub_store.go
- token_auto_update_client.go