tls

package
v1.0.190 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 26 Imported by: 3

README

日志服务Go SDK

火山引擎日志服务 Go SDK 封装了日志服务的常用接口,您可以通过日志服务 Go SDK 调用服务端 API,实现日志采集、日志检索等功能。

快速开始

初始化客户端

初始化 Client 实例之后,才可以向 TLS 服务发送请求。初始化时推荐通过环境变量动态获取火山引擎密钥等身份认证信息,以免 AccessKey 硬编码引发数据安全风险。

初始化代码如下:

client := NewClient(os.Getenv("VOLCENGINE_ENDPOINT"), os.Getenv("VOLCENGINE_ACCESS_KEY_ID"),
    os.Getenv("VOLCENGINE_ACCESS_KEY_SECRET"), os.Getenv("VOLCENGINE_TOKEN"), os.Getenv("VOLCENGINE_REGION"))
示例代码

本文档以日志服务的基本日志采集和检索流程为例,介绍如何使用日志服务 Go SDK 管理日志服务基础资源。创建一个 TLSQuickStart.go 文件,并调用接口分别完成创建 Project、创建 Topic、创建索引、写入日志数据、消费日志和查询日志数据。

详细示例代码如下:

package tls

import (
    "fmt"
    "os"
    "time"

    "github.com/volcengine/volc-sdk-golang/service/tls"
)

func main() {
    // 初始化客户端,推荐通过环境变量动态获取火山引擎密钥等身份认证信息,以免 AccessKey 硬编码引发数据安全风险。详细说明请参考https://www.volcengine.com/docs/6470/1166455
    // 使用 STS 时,ak 和 sk 均使用临时密钥,且设置 VOLCENGINE_TOKEN;不使用 STS 时,VOLCENGINE_TOKEN 部分传空
    client := tls.NewClient(os.Getenv("VOLCENGINE_ENDPOINT"), os.Getenv("VOLCENGINE_ACCESS_KEY_ID"),
       os.Getenv("VOLCENGINE_ACCESS_KEY_SECRET"), os.Getenv("VOLCENGINE_TOKEN"), os.Getenv("VOLCENGINE_REGION"))

    // 创建日志项目
    // 请根据您的需要,填写ProjectName和可选的Description;请您填写和初始化client时一致的Region;
    // CreateProject API的请求参数规范请参阅https://www.volcengine.com/docs/6470/112174
    createProjectResp, err := client.CreateProject(&tls.CreateProjectRequest{
       ProjectName: "project-name",
       Description: "project-description",
       Region:      os.Getenv("VOLCENGINE_REGION"),
    })
    if err != nil {
       // 处理错误
       fmt.Println(err.Error())
    }
    projectID := createProjectResp.ProjectID

    // 创建日志主题
    // 请根据您的需要,填写ProjectId、TopicName、Ttl、Description、ShardCount等参数值
    // CreateTopic API的请求参数规范请参阅https://www.volcengine.com/docs/6470/112180
	maxSplitShard := int32(50)
    createTopicResp, err := client.CreateTopic(&tls.CreateTopicRequest{
       ProjectID:   projectID,
       TopicName:   "topic-name",
       Ttl:         30,
       Description: "topic-description",
       ShardCount:  2,
	   AutoSplit: true,
	   MaxSplitShard: &maxSplitShard,
    })
    if err != nil {
       // 处理错误
       fmt.Println(err.Error())
    }
    topicID := createTopicResp.TopicID

    // 创建索引配置
    // 请根据您的需要,填写TopicId,开启FullText全文索引或KeyValue键值索引或同时开启二者
    // CreateIndex API的请求参数规范请参阅https://www.volcengine.com/docs/6470/112187
    _, err = client.CreateIndex(&tls.CreateIndexRequest{
       TopicID: topicID,
       FullText: &tls.FullTextInfo{
          Delimiter:      ",-;",
          CaseSensitive:  false,
          IncludeChinese: false,
       },
       KeyValue: &[]tls.KeyValueInfo{
          {
             Key: "key",
             Value: tls.Value{
                ValueType:      "text",
                Delimiter:      ", ?",
                CasSensitive:   false,
                IncludeChinese: false,
                SQLFlag:        false,
             },
          },
       },
    })
    if err != nil {
       // 处理错误
       fmt.Println(err.Error())
    }

    // (不推荐)本文档以 PutLogs 接口同步请求的方式上传日志为例
    // (推荐)在实际生产环境中,为了提高数据写入效率,建议通过 Go Producer 方式写入日志数据
     
    // 如果选择使用PutLogs上传日志的方式,建议您一次性聚合多条日志后调用一次PutLogs接口,以提升吞吐率并避免触发限流
    // 请根据您的需要,填写TopicId、Source、FileName和Logs列表,建议您使用lz4压缩
    // PutLogs API的请求参数规范和限制请参阅https://www.volcengine.com/docs/6470/112191
    _, err = client.PutLogsV2(&tls.PutLogsV2Request{
       TopicID:      topicID,
       CompressType: "lz4",
       Source:       "your-log-source",
       FileName:     "your-log-filename",
       Logs: []tls.Log{
          {
             Contents: []tls.LogContent{
                {
                   Key:   "key1",
                   Value: "value1-1",
                },
                {
                   Key:   "key2",
                   Value: "value2-1",
                },
             },
          },
          {
             Contents: []tls.LogContent{
                {
                   Key:   "key1",
                   Value: "value1-2",
                },
                {
                   Key:   "key2",
                   Value: "value2-2",
                },
             },
          },
       },
    })
    if err != nil {
       // 处理错误
       fmt.Println(err.Error())
    }
    time.Sleep(30 * time.Second)

    // 查询分析日志数据
    // 请根据您的需要,填写TopicId、Query、StartTime、EndTime、Limit等参数值
    // SearchLogs API的请求参数规范和限制请参阅https://www.volcengine.com/docs/6470/112195
    resp, err := client.SearchLogsV2(&tls.SearchLogsRequest{
       TopicID:   topicID,
       Query:     "*",
	   StartTime: 1346457600000,
	   EndTime:   1630454400000,
       Limit:     20,
    })
    if err != nil {
       // 处理错误
       fmt.Println(err.Error())
    }

    // 打印SearchLogs接口返回值中的部分基本信息
    // 请根据您的需要,自行处理返回值中的其他信息
    fmt.Println(resp.Status)
    fmt.Println(resp.HitCount)
    fmt.Println(resp.Count)
    fmt.Println(resp.Analysis)
}

通过 Producer 上报日志数据

通过Producer上报日志数据

通过 Consumer 消费日志数据

通过Consumer消费日志数据

Documentation

Index

Constants

View Source
const (
	RequestIDHeader  = "x-tls-requestid"
	AgentHeader      = "User-Agent"
	ContentMd5Header = "Content-MD5"
	ServiceName      = "TLS"

	CompressLz4  = "lz4"
	CompressGz   = "gzip"
	CompressNone = "none"

	FullTextIndexKey = "__content__"

	PathCreateProject    = "/CreateProject"
	PathDescribeProject  = "/DescribeProject"
	PathDeleteProject    = "/DeleteProject"
	PathModifyProject    = "/ModifyProject"
	PathDescribeProjects = "/DescribeProjects"

	PathCreateTopic    = "/CreateTopic"
	PathDescribeTopic  = "/DescribeTopic"
	PathDeleteTopic    = "/DeleteTopic"
	PathModifyTopic    = "/ModifyTopic"
	PathDescribeTopics = "/DescribeTopics"

	PathCreateIndex   = "/CreateIndex"
	PathDescribeIndex = "/DescribeIndex"
	PathDeleteIndex   = "/DeleteIndex"
	PathModifyIndex   = "/ModifyIndex"
	PathSearchLogs    = "/SearchLogs"

	PathDescribeShards = "/DescribeShards"

	PathPutLogs            = "/PutLogs"
	PathDescribeCursor     = "/DescribeCursor"
	PathConsumeLogs        = "/ConsumeLogs"
	PathDescribeLogContext = "/DescribeLogContext"

	PathCreateRule               = "/CreateRule"
	PathDeleteRule               = "/DeleteRule"
	PathModifyRule               = "/ModifyRule"
	PathDescribeRule             = "/DescribeRule"
	PathDescribeRules            = "/DescribeRules"
	PathApplyRuleToHostGroups    = "/ApplyRuleToHostGroups"
	PathDeleteRuleFromHostGroups = "/DeleteRuleFromHostGroups"

	PathCreateHostGroup            = "/CreateHostGroup"
	PathDeleteHostGroup            = "/DeleteHostGroup"
	PathModifyHostGroup            = "/ModifyHostGroup"
	PathDescribeHostGroup          = "/DescribeHostGroup"
	PathDescribeHostGroups         = "/DescribeHostGroups"
	PathDescribeHostGroupRules     = "/DescribeHostGroupRules"
	PathModifyHostGroupsAutoUpdate = "/ModifyHostGroupsAutoUpdate"

	PathDeleteHost          = "/DeleteHost"
	PathDescribeHosts       = "/DescribeHosts"
	PathDeleteAbnormalHosts = "/DeleteAbnormalHosts"

	PathCreateAlarmNotifyGroup    = "/CreateAlarmNotifyGroup"
	PathDeleteAlarmNotifyGroup    = "/DeleteAlarmNotifyGroup"
	PathDescribeAlarmNotifyGroups = "/DescribeAlarmNotifyGroups"
	PathModifyAlarmNotifyGroup    = "/ModifyAlarmNotifyGroup"
	PathCreateAlarm               = "/CreateAlarm"
	PathDeleteAlarm               = "/DeleteAlarm"
	PathModifyAlarm               = "/ModifyAlarm"
	PathDescribeAlarms            = "/DescribeAlarms"

	PathCreateDownloadTask    = "/CreateDownloadTask"
	PathDescribeDownloadTasks = "/DescribeDownloadTasks"
	PathDescribeDownloadUrl   = "/DescribeDownloadUrl"

	PathWebTracks = "/WebTracks"

	PathDescribeHistogram   = "/DescribeHistogram"
	PathDescribeHistogramV1 = "/DescribeHistogramV1"

	PathOpenKafkaConsumer     = "/OpenKafkaConsumer"
	PathCloseKafkaConsumer    = "/CloseKafkaConsumer"
	PathDescribeKafkaConsumer = "/DescribeKafkaConsumer"

	PathCreateConsumerGroup    = "/CreateConsumerGroup"
	PathDeleteConsumerGroup    = "/DeleteConsumerGroup"
	PathDescribeConsumerGroups = "/DescribeConsumerGroups"
	PathModifyConsumerGroup    = "/ModifyConsumerGroup"

	PathConsumerHeartbeat = "/ConsumerHeartbeat"

	PathDescribeCheckPoint = "/DescribeCheckPoint"
	PathModifyCheckPoint   = "/ModifyCheckPoint"
	PathResetCheckPoint    = "/ResetCheckPoint"

	PathAddTagsToResource      = "/AddTagsToResource"
	PathRemoveTagsFromResource = "/RemoveTagsFromResource"

	PathCreateETLTask       = "/CreateETLTask"
	PathDeleteETLTask       = "/DeleteETLTask"
	PathDescribeETLTask     = "/DescribeETLTask"
	PathModifyETLTask       = "/ModifyETLTask"
	PathDescribeETLTasks    = "/DescribeETLTasks"
	PathModifyETLTaskStatus = "/ModifyETLTaskStatus"

	PathCreateImportTask    = "/CreateImportTask"
	PathDeleteImportTask    = "/DeleteImportTask"
	PathModifyImportTask    = "/ModifyImportTask"
	PathDescribeImportTask  = "/DescribeImportTask"
	PathDescribeImportTasks = "/DescribeImportTasks"

	PathCreateShipper    = "/CreateShipper"
	PathDeleteShipper    = "/DeleteShipper"
	PathModifyShipper    = "/ModifyShipper"
	PathDescribeShipper  = "/DescribeShipper"
	PathDescribeShippers = "/DescribeShippers"

	HeaderAPIVersion = "x-tls-apiversion"
	APIVersion2      = "0.2.0"
	APIVersion3      = "0.3.0"
)
View Source
const (
	// ErrProjectNotExists 日志项目(Project)不存在
	ErrProjectNotExists = "ProjectNotExists"

	// ErrTopicNotExists 指定日志主题不存在
	ErrTopicNotExists = "TopicNotExist"

	// ErrIndexNotExists 指定索引不存在
	ErrIndexNotExists = "IndexNotExists"

	// ErrInvalidParam 请求参数不合法
	ErrInvalidParam = "InvalidArgument"

	// ErrDeserializeFailed 日志反序列化失败
	ErrDeserializeFailed = "DeserializeFailed"

	// ErrInternalServerError 日志服务内部错误
	ErrInternalServerError = "InternalError"

	// ErrProjectAlreadyExists 创建日志项目重复
	ErrProjectAlreadyExists = "ProjectAlreadyExist"

	// ErrTopicAlreadyExist 创建日志主题重复
	ErrTopicAlreadyExist = "TopicAlreadyExist"

	// ErrIndexAlreadyExists 创建日志索引重复
	ErrIndexAlreadyExists = "IndexAlreadyExist"

	// ErrIndexConflict 制定索引状态错误
	ErrIndexConflict = "IndexStateConflict"

	// ErrSearchOutOfRange 日志搜索时指定时间范围越界
	ErrSearchOutOfRange = "SearchOutOfRange"

	// ErrSqlSyntaxError SQL语句语法错误
	ErrSqlSyntaxError = "SqlSyntaxError"

	// ErrSearchSyntaxError 搜索语句语法错误
	ErrSearchSyntaxError = "SearchSyntaxError"

	// ErrSqlResultError SQL检索结果错误
	ErrSqlResultError = "SqlResultError"

	// ProjectQuotaExceed 日志项目配额不足
	ProjectQuotaExceed = "ProjectQuotaExceed"

	// ProjectDeletedHasTopic 删除指定日志项目时,该日志项目仍有topic未被删除
	ProjectDeletedHasTopic = "ProjectDeletedHasTopic"

	// ErrInvalidAccessKeyId AccessKeyID不合法
	ErrInvalidAccessKeyId = "InvalidAccessKeyId"

	// ErrInvalidSecurityToken 授权令牌不合法
	ErrInvalidSecurityToken = "InvalidSecurityToken"

	// ErrAuthorizationQueryParameters 鉴权参数不合法
	ErrAuthorizationQueryParameters = "AuthorizationQueryParametersError"

	// ErrRequestHasExpired 请求超时
	ErrRequestHasExpired = "RequestExpired"

	// ErrSignatureDoesNotMatch 签名不匹配
	ErrSignatureDoesNotMatch = "SignatureDoesNotMatch"

	// ErrRequestTimeTooSkewed 客户端与服务端时间差距太大
	ErrRequestTimeTooSkewed = "RequestTimeTooSkewed"

	// ErrAuthFailed 鉴权失败
	ErrAuthFailed = "AuthFailed"

	// ErrLogMD5CheckFailed 上传日志md5校验失败
	ErrLogMD5CheckFailed = "ErrLogMD5CheckFailed"

	// ErrAccessDenied 提供的AccessKeyID与指定的资源不匹配
	ErrAccessDenied = "AccessDenied"

	// ErrNotSupport 请求方法不支持
	ErrNotSupport = "MethodNotSupport"

	// ErrExceededMaxLogCount 上传日志中Log数量过大
	ErrExceededMaxLogCount = "TooManyLogs"

	// ErrExceededMaxLogSize 上传日志中Log容量太大
	ErrExceededMaxLogSize = "LogSizeTooLarge"

	// ErrExceededMaxLogGroupListSize 上传日志的LogGroupList容量太大
	ErrExceededMaxLogGroupListSize = "LogGroupListSizeTooLarge"

	// ErrExceedQPSLimit QPS过高
	ErrExceedQPSLimit = "ExceedQPSLimit"

	// ErrIndexTypeParam 索引类型不合法
	ErrIndexTypeParam = "InvalidIndexArgument"

	// IndexKeyValueQuotaExceed 索引KeyValue配额不足
	IndexKeyValueQuotaExceed = "IndexKeyValueQuotaExceed"

	// ErrValueTypeConflictAttr 索引类型冲突
	ErrValueTypeConflictAttr = "ValueTypeConflict"

	// ErrSQLFlagConflictAttr SQL Flag冲突
	ErrSQLFlagConflictAttr = "SQLFlagConflict"

	// ErrDelimiterChineseConflict 分隔符与中文配置冲突
	ErrDelimiterChineseConflict = "DelimiterChineseConflict"

	// ErrIndexKeyDuplicate 索引关键字重复
	ErrIndexKeyDuplicate = "IndexKeyDuplicate"

	// ErrIndexKeyValueNULL 索引关键字为空
	ErrIndexKeyValueNULL = "IndexKVNULL"

	// ErrConsumerGroupAlreadyExists 消费者组已存在
	ErrConsumerGroupAlreadyExists = "ConsumerGroupAlreadyExists"

	// ErrConsumerHeartbeatExpired ConsumerGroup心跳过期
	ErrConsumerHeartbeatExpired = "ConsumerHeartbeatExpired"
)

Variables

This section is empty.

Functions

func CopyIncompressible

func CopyIncompressible(src, dst []byte) (int, error)

func GetCallerFuncName

func GetCallerFuncName(step int) string

func GetLogsFromMap

func GetLogsFromMap(logTime int64, logMap map[string]string) *pb.Log

func GetPutLogsBody

func GetPutLogsBody(compressType string, logGroupList *pb.LogGroupList) ([]byte, int, error)

func GetWebTracksBody

func GetWebTracksBody(compressType string, request *WebTracksRequest) ([]byte, int, error)

func ReplaceWhiteSpaceCharacter added in v1.0.102

func ReplaceWhiteSpaceCharacter(str string) string

func RetryWithCondition

func RetryWithCondition(ctx context.Context, o ConditionOperation) error

Types

type AddTagsToResourceRequest added in v1.0.138

type AddTagsToResourceRequest struct {
	CommonRequest
	ResourceType  string    `json:","`
	ResourcesList []string  `json:","`
	Tags          []TagInfo `json:","`
}

func (*AddTagsToResourceRequest) CheckValidation added in v1.0.138

func (v *AddTagsToResourceRequest) CheckValidation() error

type Advanced added in v1.0.127

type Advanced struct {
	CloseInactive int  `json:","`
	CloseRemoved  bool `json:","`
	CloseRenamed  bool `json:","`
	CloseEOF      bool `json:","`
	CloseTimeout  int  `json:","`
}

type AlarmPeriodSetting added in v1.0.127

type AlarmPeriodSetting struct {
	Sms            int `json:"SMS"`
	Phone          int `json:"Phone"`
	Email          int `json:"Email"`
	GeneralWebhook int `json:"GeneralWebhook"`
}

type AnalysisResult

type AnalysisResult struct {
	Schema []string                 `json:"Schema"`
	Type   map[string]string        `json:"Type"`
	Data   []map[string]interface{} `json:"Data"`
}

type ApplyRuleToHostGroupsRequest

type ApplyRuleToHostGroupsRequest struct {
	CommonRequest
	RuleID       string   `json:"RuleId"`
	HostGroupIDs []string `json:"HostGroupIds"`
}

func (*ApplyRuleToHostGroupsRequest) CheckValidation

func (v *ApplyRuleToHostGroupsRequest) CheckValidation() error

type BadResponseError

type BadResponseError struct {
	RespBody   string
	RespHeader map[string][]string
	HTTPCode   int
}

func NewBadResponseError

func NewBadResponseError(body string, header map[string][]string, httpCode int) *BadResponseError

func (BadResponseError) Error

func (e BadResponseError) Error() string

func (BadResponseError) String

func (e BadResponseError) String() string

type Client

type Client interface {
	ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string)
	SetTimeout(timeout time.Duration)
	SetAPIVersion(version string)
	SetCustomUserAgent(customUserAgent string)

	PutLogs(request *PutLogsRequest) (response *CommonResponse, err error)
	PutLogsV2(request *PutLogsV2Request) (response *CommonResponse, err error)
	DescribeCursor(request *DescribeCursorRequest) (*DescribeCursorResponse, error)
	ConsumeLogs(request *ConsumeLogsRequest) (*ConsumeLogsResponse, error)
	DescribeLogContext(request *DescribeLogContextRequest) (*DescribeLogContextResponse, error)

	CreateProject(request *CreateProjectRequest) (*CreateProjectResponse, error)
	DeleteProject(request *DeleteProjectRequest) (*CommonResponse, error)
	DescribeProject(request *DescribeProjectRequest) (*DescribeProjectResponse, error)
	DescribeProjects(request *DescribeProjectsRequest) (*DescribeProjectsResponse, error)
	ModifyProject(request *ModifyProjectRequest) (*CommonResponse, error)

	CreateTopic(request *CreateTopicRequest) (*CreateTopicResponse, error)
	DeleteTopic(request *DeleteTopicRequest) (*CommonResponse, error)
	DescribeTopic(request *DescribeTopicRequest) (*DescribeTopicResponse, error)
	DescribeTopics(request *DescribeTopicsRequest) (*DescribeTopicsResponse, error)
	ModifyTopic(request *ModifyTopicRequest) (*CommonResponse, error)

	CreateIndex(request *CreateIndexRequest) (*CreateIndexResponse, error)
	DeleteIndex(request *DeleteIndexRequest) (*CommonResponse, error)
	DescribeIndex(request *DescribeIndexRequest) (*DescribeIndexResponse, error)
	ModifyIndex(request *ModifyIndexRequest) (*CommonResponse, error)
	SearchLogs(request *SearchLogsRequest) (*SearchLogsResponse, error)
	SearchLogsV2(request *SearchLogsRequest) (*SearchLogsResponse, error)

	DescribeShards(request *DescribeShardsRequest) (*DescribeShardsResponse, error)

	CreateRule(request *CreateRuleRequest) (*CreateRuleResponse, error)
	DeleteRule(request *DeleteRuleRequest) (*CommonResponse, error)
	ModifyRule(request *ModifyRuleRequest) (*CommonResponse, error)
	DescribeRule(request *DescribeRuleRequest) (*DescribeRuleResponse, error)
	DescribeRules(request *DescribeRulesRequest) (*DescribeRulesResponse, error)
	ApplyRuleToHostGroups(request *ApplyRuleToHostGroupsRequest) (*CommonResponse, error)
	DeleteRuleFromHostGroups(request *DeleteRuleFromHostGroupsRequest) (*CommonResponse, error)

	CreateHostGroup(request *CreateHostGroupRequest) (*CreateHostGroupResponse, error)
	DeleteHostGroup(request *DeleteHostGroupRequest) (*CommonResponse, error)
	ModifyHostGroup(request *ModifyHostGroupRequest) (*CommonResponse, error)
	DescribeHostGroup(request *DescribeHostGroupRequest) (*DescribeHostGroupResponse, error)
	DescribeHostGroups(request *DescribeHostGroupsRequest) (*DescribeHostGroupsResponse, error)
	DescribeHosts(request *DescribeHostsRequest) (*DescribeHostsResponse, error)
	DeleteHost(request *DeleteHostRequest) (*CommonResponse, error)
	DescribeHostGroupRules(request *DescribeHostGroupRulesRequest) (*DescribeHostGroupRulesResponse, error)
	ModifyHostGroupsAutoUpdate(request *ModifyHostGroupsAutoUpdateRequest) (*ModifyHostGroupsAutoUpdateResponse, error)
	DeleteAbnormalHosts(request *DeleteAbnormalHostsRequest) (*CommonResponse, error)

	CreateAlarm(request *CreateAlarmRequest) (*CreateAlarmResponse, error)
	DeleteAlarm(request *DeleteAlarmRequest) (*CommonResponse, error)
	ModifyAlarm(request *ModifyAlarmRequest) (*CommonResponse, error)
	DescribeAlarms(request *DescribeAlarmsRequest) (*DescribeAlarmsResponse, error)
	CreateAlarmNotifyGroup(request *CreateAlarmNotifyGroupRequest) (*CreateAlarmNotifyGroupResponse, error)
	DeleteAlarmNotifyGroup(request *DeleteAlarmNotifyGroupRequest) (*CommonResponse, error)
	ModifyAlarmNotifyGroup(request *ModifyAlarmNotifyGroupRequest) (*CommonResponse, error)
	DescribeAlarmNotifyGroups(request *DescribeAlarmNotifyGroupsRequest) (*DescribeAlarmNotifyGroupsResponse, error)

	CreateDownloadTask(request *CreateDownloadTaskRequest) (*CreateDownloadTaskResponse, error)
	DescribeDownloadTasks(request *DescribeDownloadTasksRequest) (*DescribeDownloadTasksResponse, error)
	DescribeDownloadUrl(request *DescribeDownloadUrlRequest) (*DescribeDownloadUrlResponse, error)

	WebTracks(request *WebTracksRequest) (*WebTracksResponse, error)

	OpenKafkaConsumer(request *OpenKafkaConsumerRequest) (*OpenKafkaConsumerResponse, error)
	CloseKafkaConsumer(request *CloseKafkaConsumerRequest) (*CloseKafkaConsumerResponse, error)
	DescribeKafkaConsumer(request *DescribeKafkaConsumerRequest) (*DescribeKafkaConsumerResponse, error)

	// Deprecated: use DescribeHistogramV1 instead
	DescribeHistogram(request *DescribeHistogramRequest) (*DescribeHistogramResponse, error)
	DescribeHistogramV1(request *DescribeHistogramV1Request) (*DescribeHistogramV1Response, error)

	CreateConsumerGroup(request *CreateConsumerGroupRequest) (*CreateConsumerGroupResponse, error)
	DeleteConsumerGroup(request *DeleteConsumerGroupRequest) (*CommonResponse, error)
	DescribeConsumerGroups(request *DescribeConsumerGroupsRequest) (*DescribeConsumerGroupsResponse, error)
	ModifyConsumerGroup(request *ModifyConsumerGroupRequest) (*CommonResponse, error)

	ConsumerHeartbeat(request *ConsumerHeartbeatRequest) (*ConsumerHeartbeatResponse, error)
	DescribeCheckPoint(request *DescribeCheckPointRequest) (*DescribeCheckPointResponse, error)
	ModifyCheckPoint(request *ModifyCheckPointRequest) (*CommonResponse, error)
	ResetCheckPoint(request *ResetCheckPointRequest) (*CommonResponse, error)

	AddTagsToResource(request *AddTagsToResourceRequest) (*CommonResponse, error)
	RemoveTagsFromResource(request *RemoveTagsFromResourceRequest) (*CommonResponse, error)

	CreateETLTask(request *CreateETLTaskRequest) (*CreateETLTaskResponse, error)
	DeleteETLTask(request *DeleteETLTaskRequest) (*CommonResponse, error)
	ModifyETLTask(request *ModifyETLTaskRequest) (*CommonResponse, error)
	DescribeETLTask(request *DescribeETLTaskRequest) (*DescribeETLTaskResponse, error)
	DescribeETLTasks(request *DescribeETLTasksRequest) (*DescribeETLTasksResponse, error)
	ModifyETLTaskStatus(request *ModifyETLTaskStatusRequest) (*CommonResponse, error)

	CreateImportTask(request *CreateImportTaskRequest) (*CreateImportTaskResponse, error)
	DeleteImportTask(request *DeleteImportTaskRequest) (*DeleteImportTaskResponse, error)
	ModifyImportTask(request *ModifyImportTaskRequest) (*ModifyImportTaskResponse, error)
	DescribeImportTask(request *DescribeImportTaskRequest) (*DescribeImportTaskResponse, error)
	DescribeImportTasks(request *DescribeImportTasksRequest) (*DescribeImportTasksResponse, error)

	CreateShipper(request *CreateShipperRequest) (*CreateShipperResponse, error)
	DeleteShipper(request *DeleteShipperRequest) (*DeleteShipperResponse, error)
	ModifyShipper(request *ModifyShipperRequest) (*ModifyShipperResponse, error)
	DescribeShipper(request *DescribeShipperRequest) (*DescribeShipperResponse, error)
	DescribeShippers(request *DescribeShippersRequest) (*DescribeShippersResponse, error)
}

func NewClient

func NewClient(endpoint, accessKeyID, accessKeySecret, securityToken, region string) Client

type CloseKafkaConsumerRequest

type CloseKafkaConsumerRequest struct {
	CommonRequest
	TopicID string `json:"TopicId"`
}

func (*CloseKafkaConsumerRequest) CheckValidation

func (v *CloseKafkaConsumerRequest) CheckValidation() error

type CloseKafkaConsumerResponse

type CloseKafkaConsumerResponse struct {
	CommonResponse
}

type CommonRequest

type CommonRequest struct {
	Headers map[string]string `json:"-"`
}

type CommonResponse

type CommonResponse struct {
	RequestID string `json:"RequestId"`
}

func (*CommonResponse) FillRequestId

func (response *CommonResponse) FillRequestId(httpResponse *http.Response)

type ConditionOperation

type ConditionOperation func() error

type ConsumeLogsRequest

type ConsumeLogsRequest struct {
	CommonRequest
	TopicID       string
	ShardID       int
	Cursor        string
	EndCursor     *string `json:",omitempty"`
	LogGroupCount *int    `json:",omitempty"`
	Compression   *string `json:",omitempty"`

	ConsumerGroupName *string `json:",omitempty"`
	ConsumerName      *string `json:",omitempty"`
}

func (*ConsumeLogsRequest) CheckValidation

func (v *ConsumeLogsRequest) CheckValidation() error

type ConsumeLogsResponse

type ConsumeLogsResponse struct {
	CommonResponse
	Cursor string //X-Tls-Cursor
	Count  int    //X-Tls-Count
	Logs   *pb.LogGroupList
}

type ConsumeShard

type ConsumeShard struct {
	TopicID string `yaml:"TopicID"`
	ShardID int    `yaml:"ShardID"`
}

type ConsumerGroupResp

type ConsumerGroupResp struct {
	ProjectID         string `json:"ProjectID"`
	ConsumerGroupName string `json:"ConsumerGroupName"`
	HeartbeatTTL      int    `json:"HeartbeatTTL"`
	OrderedConsume    bool   `json:"OrderedConsume"`
}

type ConsumerHeartbeatRequest

type ConsumerHeartbeatRequest struct {
	ProjectID         string `json:"ProjectID"`
	ConsumerGroupName string `json:"ConsumerGroupName"`
	ConsumerName      string `json:"ConsumerName"`
}

type ConsumerHeartbeatResponse

type ConsumerHeartbeatResponse struct {
	CommonResponse
	Shards []*ConsumeShard `json:"Shards"`
}

type ContainerRule

type ContainerRule struct {
	Stream                     string            `json:"Stream,omitempty"`
	ContainerNameRegex         string            `json:"ContainerNameRegex,omitempty"`
	IncludeContainerLabelRegex map[string]string `json:"IncludeContainerLabelRegex,omitempty"`
	ExcludeContainerLabelRegex map[string]string `json:"ExcludeContainerLabelRegex,omitempty"`
	IncludeContainerEnvRegex   map[string]string `json:"IncludeContainerEnvRegex,omitempty"`
	ExcludeContainerEnvRegex   map[string]string `json:"ExcludeContainerEnvRegex,omitempty"`
	EnvTag                     map[string]string `json:"EnvTag,omitempty"`
	KubernetesRule             KubernetesRule    `json:"KubernetesRule,omitempty"`
}

type ContentInfo added in v1.0.184

type ContentInfo struct {
	Format   string    `json:"Format,omitempty"`
	CsvInfo  *CsvInfo  `json:"CsvInfo,omitempty"`
	JsonInfo *JsonInfo `json:"JsonInfo,omitempty"`
}

type CreateAlarmNotifyGroupRequest

type CreateAlarmNotifyGroupRequest struct {
	CommonRequest
	GroupName      string      `json:"AlarmNotifyGroupName"`
	NoticeType     NoticeTypes `json:"NotifyType"`
	Receivers      Receivers   `json:"Receivers"`
	IamProjectName *string     `json:"IamProjectName,omitempty"`
}

func (*CreateAlarmNotifyGroupRequest) CheckValidation

func (v *CreateAlarmNotifyGroupRequest) CheckValidation() error

type CreateAlarmNotifyGroupResponse

type CreateAlarmNotifyGroupResponse struct {
	CommonResponse
	NotifyGroupID string `json:"AlarmNotifyGroupId"`
}

type CreateAlarmRequest

type CreateAlarmRequest struct {
	CommonRequest
	AlarmName          string              `json:"AlarmName"`
	ProjectID          string              `json:"ProjectId"`
	Status             *bool               `json:"Status,omitempty"`
	QueryRequest       QueryRequests       `json:"QueryRequest"`
	RequestCycle       RequestCycle        `json:"RequestCycle"`
	Condition          string              `json:"Condition"`
	TriggerPeriod      int                 `json:"TriggerPeriod"`
	AlarmPeriod        int                 `json:"AlarmPeriod"`
	AlarmNotifyGroup   []string            `json:"AlarmNotifyGroup"`
	UserDefineMsg      *string             `json:"UserDefineMsg,omitempty"`
	Severity           *string             `json:"Severity,omitempty"`
	AlarmPeriodDetail  *AlarmPeriodSetting `json:"AlarmPeriodDetail,omitempty"`
	JoinConfigurations []JoinConfig        `json:"JoinConfigurations,omitempty"`
	TriggerConditions  []TriggerCondition  `json:"TriggerConditions,omitempty"`
}

func (*CreateAlarmRequest) CheckValidation

func (v *CreateAlarmRequest) CheckValidation() error

type CreateAlarmResponse

type CreateAlarmResponse struct {
	CommonResponse
	AlarmID string `json:"AlarmId"`
}

type CreateConsumerGroupRequest

type CreateConsumerGroupRequest struct {
	ProjectID         string   `json:"ProjectID"`
	TopicIDList       []string `json:"TopicIDList"`
	ConsumerGroupName string   `json:"ConsumerGroupName"`
	HeartbeatTTL      int      `json:"HeartbeatTTL"`
	OrderedConsume    bool     `json:"OrderedConsume"`
}

type CreateConsumerGroupResponse

type CreateConsumerGroupResponse struct {
	CommonResponse
}

type CreateDownloadTaskRequest

type CreateDownloadTaskRequest struct {
	CommonRequest
	TopicID     string `json:"TopicId"`
	TaskName    string
	Query       string
	StartTime   int64
	EndTime     int64
	Compression string
	DataFormat  string
	Limit       int
	Sort        string
}

func (*CreateDownloadTaskRequest) CheckValidation

func (v *CreateDownloadTaskRequest) CheckValidation() error

type CreateDownloadTaskResponse

type CreateDownloadTaskResponse struct {
	CommonResponse
	TaskId string
}

type CreateETLTaskRequest added in v1.0.180

type CreateETLTaskRequest struct {
	CommonRequest
	DSLType         string
	Description     *string `json:",omitempty"`
	Enable          bool
	FromTime        *int64 `json:",omitempty"`
	Name            string
	Script          string
	SourceTopicId   string
	TargetResources []TargetResource
	TaskType        string
	ToTime          *int64 `json:",omitempty"`
}

type CreateETLTaskResponse added in v1.0.180

type CreateETLTaskResponse struct {
	CommonResponse
	TaskID string `json:"TaskId"`
}

type CreateHostGroupRequest

type CreateHostGroupRequest struct {
	CommonRequest
	HostGroupName   string    `json:"HostGroupName"`
	HostGroupType   string    `json:"HostGroupType"`
	HostIdentifier  *string   `json:"HostIdentifier"`
	HostIPList      *[]string `json:"HostIpList"`
	AutoUpdate      *bool     `json:",omitempty"`
	UpdateStartTime *string   `json:",omitempty"`
	UpdateEndTime   *string   `json:",omitempty"`
	ServiceLogging  *bool     `json:",omitempty"`
	IamProjectName  *string   `json:",omitempty"`
}

func (*CreateHostGroupRequest) CheckValidation

func (v *CreateHostGroupRequest) CheckValidation() error

type CreateHostGroupResponse

type CreateHostGroupResponse struct {
	CommonResponse
	HostGroupID string `json:"HostGroupId"`
}

type CreateImportTaskRequest added in v1.0.184

type CreateImportTaskRequest struct {
	CommonRequest
	ProjectID        string            `json:"ProjectID"`
	TopicID          string            `json:"TopicID"`
	TaskName         string            `json:"TaskName"`
	SourceType       string            `json:"SourceType"`
	Description      string            `json:"Description,omitempty"`
	ImportSourceInfo *ImportSourceInfo `json:"ImportSourceInfo"`
	TargetInfo       *TargetInfo       `json:"TargetInfo"`
}

func (*CreateImportTaskRequest) CheckValidation added in v1.0.184

func (v *CreateImportTaskRequest) CheckValidation() error

type CreateImportTaskResponse added in v1.0.184

type CreateImportTaskResponse struct {
	CommonResponse
	TaskID string `json:"TaskId"`
}

type CreateIndexRequest

type CreateIndexRequest struct {
	CommonRequest
	TopicID           string          `json:"TopicId"`
	FullText          *FullTextInfo   `json:",omitempty"`
	KeyValue          *[]KeyValueInfo `json:",omitempty"`
	UserInnerKeyValue *[]KeyValueInfo `json:",omitempty"`
}

func (*CreateIndexRequest) CheckValidation

func (v *CreateIndexRequest) CheckValidation() error

type CreateIndexResponse

type CreateIndexResponse struct {
	CommonResponse
	TopicID string `json:"TopicId"`
}

type CreateProjectRequest

type CreateProjectRequest struct {
	CommonRequest
	ProjectName    string    `json:","`
	Description    string    `json:","`
	Region         string    `json:","`
	IamProjectName *string   `json:",omitempty"`
	Tags           []TagInfo `json:",omitempty"`
}

func (*CreateProjectRequest) CheckValidation

func (v *CreateProjectRequest) CheckValidation() error

type CreateProjectResponse

type CreateProjectResponse struct {
	CommonResponse
	ProjectID string `json:"ProjectId"`
}

type CreateRuleRequest

type CreateRuleRequest struct {
	CommonRequest
	TopicID        string          `json:"TopicId"`
	RuleName       string          `json:"RuleName"`
	Paths          *[]string       `json:"Paths"`
	LogType        *string         `json:"LogType"`
	ExtractRule    *ExtractRule    `json:"ExtractRule"`
	ExcludePaths   *[]ExcludePath  `json:"ExcludePaths"`
	UserDefineRule *UserDefineRule `json:"UserDefineRule"`
	LogSample      *string         `json:"LogSample"`
	InputType      *int            `json:"InputType"`
	ContainerRule  *ContainerRule  `json:"ContainerRule"`
}

func (*CreateRuleRequest) CheckValidation

func (v *CreateRuleRequest) CheckValidation() error

type CreateRuleResponse

type CreateRuleResponse struct {
	CommonResponse
	RuleID string `json:"RuleId"`
}

type CreateShipperRequest added in v1.0.184

type CreateShipperRequest struct {
	CommonRequest
	TopicId          string            `json:"TopicId"`
	ShipperName      string            `json:"ShipperName"`
	ShipperType      string            `json:"ShipperType"`
	ShipperStartTime int               `json:"ShipperStartTime,omitempty"`
	ShipperEndTime   int               `json:"ShipperEndTime,omitempty"`
	TosShipperInfo   *TosShipperInfo   `json:"TosShipperInfo,omitempty"`
	KafkaShipperInfo *KafkaShipperInfo `json:"KafkaShipperInfo,omitempty"`
	ContentInfo      *ContentInfo      `json:"ContentInfo"`
}

func (*CreateShipperRequest) CheckValidation added in v1.0.184

func (v *CreateShipperRequest) CheckValidation() error

type CreateShipperResponse added in v1.0.184

type CreateShipperResponse struct {
	CommonResponse
	ShipperId string `json:"ShipperId"`
}

type CreateTopicRequest

type CreateTopicRequest struct {
	CommonRequest
	ProjectID      string    `json:"ProjectId"`
	TopicName      string    `json:","`
	Ttl            uint16    `json:","`
	Description    string    `json:","`
	ShardCount     int       `json:","`
	MaxSplitShard  *int32    `json:",omitempty"`
	AutoSplit      bool      `json:","`
	EnableTracking *bool     `json:",omitempty"`
	TimeKey        *string   `json:",omitempty"`
	TimeFormat     *string   `json:",omitempty"`
	Tags           []TagInfo `json:",omitempty"`
	LogPublicIP    *bool     `json:",omitempty"`
	EnableHotTtl   *bool     `json:",omitempty"`
	HotTtl         *int32    `json:",omitempty"`
	ColdTtl        *int32    `json:",omitempty"`
	ArchiveTtl     *int32    `json:",omitempty"`
}

func (*CreateTopicRequest) CheckValidation

func (v *CreateTopicRequest) CheckValidation() error

type CreateTopicResponse

type CreateTopicResponse struct {
	CommonResponse
	TopicID string `json:"TopicID"`
}

type CsvInfo added in v1.0.184

type CsvInfo struct {
	Keys            []string `json:"Keys"`
	Delimiter       string   `json:"Delimiter"`
	EscapeChar      string   `json:"EscapeChar"`
	PrintHeader     bool     `json:"PrintHeader"`
	NonFieldContent string   `json:"NonFieldContent"`
}

type DeleteAbnormalHostsRequest added in v1.0.138

type DeleteAbnormalHostsRequest struct {
	CommonRequest
	HostGroupID string `json:"HostGroupId"`
}

func (*DeleteAbnormalHostsRequest) CheckValidation added in v1.0.138

func (v *DeleteAbnormalHostsRequest) CheckValidation() error

type DeleteAlarmNotifyGroupRequest

type DeleteAlarmNotifyGroupRequest struct {
	CommonRequest
	AlarmNotifyGroupID string `json:"AlarmNotifyGroupId"`
}

func (*DeleteAlarmNotifyGroupRequest) CheckValidation

func (v *DeleteAlarmNotifyGroupRequest) CheckValidation() error

type DeleteAlarmNotifyGroupResponse

type DeleteAlarmNotifyGroupResponse struct {
}

type DeleteAlarmRequest

type DeleteAlarmRequest struct {
	CommonRequest
	AlarmID string `json:"AlarmId"`
}

func (*DeleteAlarmRequest) CheckValidation

func (v *DeleteAlarmRequest) CheckValidation() error

type DeleteConsumerGroupRequest

type DeleteConsumerGroupRequest struct {
	ProjectID         string `json:"ProjectID"`
	ConsumerGroupName string `json:"ConsumerGroupName"`
}

type DeleteConsumerGroupResponse

type DeleteConsumerGroupResponse struct {
	CommonResponse
}

type DeleteETLTaskRequest added in v1.0.180

type DeleteETLTaskRequest struct {
	CommonRequest
	TaskID string `json:"TaskId"`
}

type DeleteHostGroupRequest

type DeleteHostGroupRequest struct {
	CommonRequest
	HostGroupID string `json:"HostGroupId"`
}

func (*DeleteHostGroupRequest) CheckValidation

func (v *DeleteHostGroupRequest) CheckValidation() error

type DeleteHostRequest

type DeleteHostRequest struct {
	CommonRequest
	HostGroupID string `json:"HostGroupId"`
	IP          string `json:"Ip"`
}

func (*DeleteHostRequest) CheckValidation

func (v *DeleteHostRequest) CheckValidation() error

type DeleteImportTaskRequest added in v1.0.184

type DeleteImportTaskRequest struct {
	CommonRequest
	TaskID string `json:"TaskId"`
}

type DeleteImportTaskResponse added in v1.0.184

type DeleteImportTaskResponse struct {
	CommonResponse
}

type DeleteIndexRequest

type DeleteIndexRequest struct {
	CommonRequest
	TopicID string
}

func (*DeleteIndexRequest) CheckValidation

func (v *DeleteIndexRequest) CheckValidation() error

type DeleteProjectRequest

type DeleteProjectRequest struct {
	CommonRequest
	ProjectID string `json:"ProjectId"`
}

func (*DeleteProjectRequest) CheckValidation

func (v *DeleteProjectRequest) CheckValidation() error

type DeleteRuleFromHostGroupsRequest

type DeleteRuleFromHostGroupsRequest struct {
	CommonRequest
	RuleID       string   `json:"RuleId"`
	HostGroupIDs []string `json:"HostGroupIds"`
}

func (*DeleteRuleFromHostGroupsRequest) CheckValidation

func (v *DeleteRuleFromHostGroupsRequest) CheckValidation() error

type DeleteRuleRequest

type DeleteRuleRequest struct {
	CommonRequest
	RuleID string `json:"RuleId"`
}

func (*DeleteRuleRequest) CheckValidation

func (v *DeleteRuleRequest) CheckValidation() error

type DeleteShipperRequest added in v1.0.184

type DeleteShipperRequest struct {
	CommonRequest
	ShipperId string `json:"ShipperId"`
}

type DeleteShipperResponse added in v1.0.184

type DeleteShipperResponse struct {
	CommonResponse
}

type DeleteTopicRequest

type DeleteTopicRequest struct {
	CommonRequest
	TopicID string
}

func (*DeleteTopicRequest) CheckValidation

func (v *DeleteTopicRequest) CheckValidation() error

type DescribeAlarmNotifyGroupsRequest

type DescribeAlarmNotifyGroupsRequest struct {
	CommonRequest
	GroupName      *string
	NotifyGroupID  *string
	UserName       *string
	PageNumber     int
	PageSize       int
	IamProjectName *string
}

func (*DescribeAlarmNotifyGroupsRequest) CheckValidation

func (v *DescribeAlarmNotifyGroupsRequest) CheckValidation() error

type DescribeAlarmNotifyGroupsResponse

type DescribeAlarmNotifyGroupsResponse struct {
	CommonResponse
	Total             int64               `json:"Total"`
	AlarmNotifyGroups []*NotifyGroupsInfo `json:"AlarmNotifyGroups"`
}

type DescribeAlarmsRequest

type DescribeAlarmsRequest struct {
	CommonRequest
	ProjectID     string
	TopicID       *string
	TopicName     *string
	AlarmName     *string
	AlarmPolicyID *string
	Status        *bool
	PageNumber    int
	PageSize      int
}

func (*DescribeAlarmsRequest) CheckValidation

func (v *DescribeAlarmsRequest) CheckValidation() error

type DescribeAlarmsResponse

type DescribeAlarmsResponse struct {
	CommonResponse
	Total         int         `json:"Total"`
	AlarmPolicies []QueryResp `json:"Alarms"`
}

type DescribeCheckPointRequest

type DescribeCheckPointRequest struct {
	ProjectID         string `json:"ProjectID"`
	TopicID           string `json:"TopicID"`
	ConsumerGroupName string `json:"ConsumerGroupName"`
	ShardID           int    `json:"ShardID"`
}

type DescribeCheckPointResponse

type DescribeCheckPointResponse struct {
	CommonResponse
	ShardID    int32  `json:"ShardID"`
	Checkpoint string `json:"Checkpoint"`
	UpdateTime int    `json:"UpdateTime"`
	Consumer   string `json:"Consumer"`
}

type DescribeConsumerGroupsRequest

type DescribeConsumerGroupsRequest struct {
	ProjectID string `json:"ProjectID"`

	PageNumber int
	PageSize   int
}

type DescribeConsumerGroupsResponse

type DescribeConsumerGroupsResponse struct {
	CommonResponse
	ConsumerGroups []*ConsumerGroupResp `json:"ConsumerGroups"`
}

type DescribeCursorRequest

type DescribeCursorRequest struct {
	CommonRequest
	TopicID string
	ShardID int
	From    string
}

func (*DescribeCursorRequest) CheckValidation

func (v *DescribeCursorRequest) CheckValidation() error

type DescribeCursorResponse

type DescribeCursorResponse struct {
	CommonResponse
	Cursor string `json:"cursor"`
}

type DescribeDownloadTasksRequest

type DescribeDownloadTasksRequest struct {
	CommonRequest
	TopicID    string  `json:"-"`
	PageNumber *int    `json:"-"`
	PageSize   *int    `json:"-"`
	TaskName   *string `json:"-"`
}

func (*DescribeDownloadTasksRequest) CheckValidation

func (v *DescribeDownloadTasksRequest) CheckValidation() error

type DescribeDownloadTasksResponse

type DescribeDownloadTasksResponse struct {
	CommonResponse
	Tasks []*DownloadTaskResp
	Total int64
}

type DescribeDownloadUrlRequest

type DescribeDownloadUrlRequest struct {
	CommonRequest
	TaskId string `json:"-"`
}

func (*DescribeDownloadUrlRequest) CheckValidation

func (v *DescribeDownloadUrlRequest) CheckValidation() error

type DescribeDownloadUrlResponse

type DescribeDownloadUrlResponse struct {
	CommonResponse
	DownloadUrl string
}

type DescribeETLTaskRequest added in v1.0.180

type DescribeETLTaskRequest struct {
	CommonRequest
	TaskID string `json:"TaskId"`
}

type DescribeETLTaskResponse added in v1.0.180

type DescribeETLTaskResponse struct {
	CommonResponse
	ETLTaskResponse
}

type DescribeETLTasksRequest added in v1.0.180

type DescribeETLTasksRequest struct {
	CommonRequest
	ProjectID       string `json:"ProjectId"`
	ProjectName     string
	IamProjectName  string
	SourceTopicID   string `json:"SourceTopicId"`
	SourceTopicName string
	TaskID          string `json:"TaskId"`
	TaskName        string
	Status          string
	PageNumber      int
	PageSize        int
}

type DescribeETLTasksResponse added in v1.0.180

type DescribeETLTasksResponse struct {
	CommonResponse
	Tasks []ETLTaskResponse
	Total int
}

type DescribeHistogramRequest

type DescribeHistogramRequest struct {
	CommonRequest
	TopicID   string `json:"TopicId"`
	Query     string `json:","`
	StartTime int64  `json:","`
	EndTime   int64  `json:","`
	Interval  *int64 `json:",omitempty"`
}

func (*DescribeHistogramRequest) CheckValidation

func (v *DescribeHistogramRequest) CheckValidation() error

type DescribeHistogramResponse

type DescribeHistogramResponse struct {
	CommonResponse
	HistogramInfos []HistogramInfo `json:"Histogram"`
	Interval       int64           `json:"Interval"`
	TotalCount     int64           `json:"TotalCount"`
	ResultStatus   string          `json:"ResultStatus"`
}

type DescribeHistogramV1Request added in v1.0.186

type DescribeHistogramV1Request struct {
	CommonRequest
	TopicID   string `json:"TopicId"`
	Query     string `json:"Query"`
	StartTime int64  `json:"StartTime"`
	EndTime   int64  `json:"EndTime"`
	Interval  int64  `json:"Interval,omitempty"`
}

func (*DescribeHistogramV1Request) CheckValidation added in v1.0.186

func (v *DescribeHistogramV1Request) CheckValidation() error

type DescribeHistogramV1Response added in v1.0.186

type DescribeHistogramV1Response struct {
	CommonResponse
	HistogramInfos []HistogramInfoV1 `json:"Histogram"`
	ResultStatus   string            `json:"ResultStatus"`
	TotalCount     int64             `json:"TotalCount"`
}

type DescribeHostGroupRequest

type DescribeHostGroupRequest struct {
	CommonRequest
	HostGroupID string
}

func (*DescribeHostGroupRequest) CheckValidation

func (v *DescribeHostGroupRequest) CheckValidation() error

type DescribeHostGroupResponse

type DescribeHostGroupResponse struct {
	CommonResponse
	HostGroupHostsRulesInfo *HostGroupHostsRulesInfo `json:"HostGroupHostsRulesInfo"`
}

type DescribeHostGroupRulesRequest

type DescribeHostGroupRulesRequest struct {
	CommonRequest
	HostGroupID string
	PageNumber  int
	PageSize    int
}

func (*DescribeHostGroupRulesRequest) CheckValidation

func (v *DescribeHostGroupRulesRequest) CheckValidation() error

type DescribeHostGroupRulesResponse

type DescribeHostGroupRulesResponse struct {
	CommonResponse
	Total     int64       `json:"Total"`
	RuleInfos []*RuleInfo `json:"RuleInfos"`
}

type DescribeHostGroupsRequest

type DescribeHostGroupsRequest struct {
	CommonRequest
	PageNumber     int
	PageSize       int
	HostGroupID    *string `json:",omitempty"`
	HostGroupName  *string `json:",omitempty"`
	HostIdentifier *string `json:",omitempty"`
	AutoUpdate     *bool   `json:",omitempty"`
	ServiceLogging *bool   `json:",omitempty"`
	IamProjectName *string `json:",omitempty"`
}

func (*DescribeHostGroupsRequest) CheckValidation

func (v *DescribeHostGroupsRequest) CheckValidation() error

type DescribeHostGroupsResponse

type DescribeHostGroupsResponse struct {
	CommonResponse
	Total                    int64                      `json:"Total"`
	HostGroupHostsRulesInfos []*HostGroupHostsRulesInfo `json:"HostGroupHostsRulesInfos"`
}

type DescribeHostsRequest

type DescribeHostsRequest struct {
	CommonRequest
	HostGroupID     string
	PageNumber      int
	PageSize        int
	IP              *string
	HeartbeatStatus *int
}

func (*DescribeHostsRequest) CheckValidation

func (v *DescribeHostsRequest) CheckValidation() error

type DescribeHostsResponse

type DescribeHostsResponse struct {
	CommonResponse
	Total     int64       `json:"Total"`
	HostInfos []*HostInfo `json:"HostInfos"`
}

type DescribeImportTaskRequest added in v1.0.184

type DescribeImportTaskRequest struct {
	CommonRequest
	TaskID string `json:"TaskId,omitempty"`
}

type DescribeImportTaskResponse added in v1.0.184

type DescribeImportTaskResponse struct {
	CommonResponse
	TaskInfo *ImportTaskInfo `json:"TaskInfo"`
}

type DescribeImportTasksRequest added in v1.0.184

type DescribeImportTasksRequest struct {
	CommonRequest
	TaskID         string `json:"TaskId,omitempty"`
	TaskName       string `json:"TaskName,omitempty"`
	ProjectID      string `json:"ProjectId,omitempty"`
	ProjectName    string `json:"ProjectName,omitempty"`
	IamProjectName string `json:"IamProjectName,omitempty"`
	TopicID        string `json:"TopicId,omitempty"`
	TopicName      string `json:"TopicName,omitempty"`
	PageNumber     int    `json:"PageNumber,omitempty"`
	PageSize       int    `json:"PageSize,omitempty"`
	SourceType     string `json:"SourceType,omitempty"`
	Status         string `json:"Status,omitempty"`
}

type DescribeImportTasksResponse added in v1.0.184

type DescribeImportTasksResponse struct {
	CommonResponse
	TaskInfo []*ImportTaskInfo `json:"TaskInfo"`
	Total    int               `json:"Total"`
}

type DescribeIndexRequest

type DescribeIndexRequest struct {
	CommonRequest
	TopicID string
}

func (*DescribeIndexRequest) CheckValidation

func (v *DescribeIndexRequest) CheckValidation() error

type DescribeIndexResponse

type DescribeIndexResponse struct {
	CommonResponse
	TopicID           string          `json:"TopicId"`
	FullText          *FullTextInfo   `json:"FullText"`
	KeyValue          *[]KeyValueInfo `json:"KeyValue"`
	UserInnerKeyValue *[]KeyValueInfo `json:"UserInnerKeyValue"`
	CreateTime        string          `json:"CreateTime"`
	ModifyTime        string          `json:"ModifyTime"`
}

type DescribeKafkaConsumerRequest

type DescribeKafkaConsumerRequest struct {
	CommonRequest
	TopicID string `json:"-"`
}

func (*DescribeKafkaConsumerRequest) CheckValidation

func (v *DescribeKafkaConsumerRequest) CheckValidation() error

type DescribeKafkaConsumerResponse

type DescribeKafkaConsumerResponse struct {
	CommonResponse
	AllowConsume bool
	ConsumeTopic string
}

type DescribeLogContextRequest

type DescribeLogContextRequest struct {
	CommonRequest
	TopicId       string `json:"TopicId"`
	ContextFlow   string `json:"ContextFlow"`
	PackageOffset int64  `json:"PackageOffset"`
	Source        string `json:"Source"`
	PrevLogs      *int64 `json:",omitempty"`
	NextLogs      *int64 `json:",omitempty"`
}

func (*DescribeLogContextRequest) CheckValidation

func (v *DescribeLogContextRequest) CheckValidation() error

type DescribeLogContextResponse

type DescribeLogContextResponse struct {
	CommonResponse
	LogContextInfos []map[string]interface{} `json:"LogContextInfos"`
	PrevOver        bool                     `json:"PrevOver"`
	NextOver        bool                     `json:"NextOver"`
}

type DescribeProjectRequest

type DescribeProjectRequest struct {
	CommonRequest
	ProjectID string `json:"ProjectId"`
}

func (*DescribeProjectRequest) CheckValidation

func (v *DescribeProjectRequest) CheckValidation() error

type DescribeProjectResponse

type DescribeProjectResponse struct {
	CommonResponse
	ProjectInfo
}

type DescribeProjectsRequest

type DescribeProjectsRequest struct {
	CommonRequest
	ProjectName    string
	ProjectID      string
	PageNumber     int
	PageSize       int
	IsFullName     bool
	IamProjectName *string
	Tags           []TagInfo
}

func (*DescribeProjectsRequest) CheckValidation

func (v *DescribeProjectsRequest) CheckValidation() error

type DescribeProjectsResponse

type DescribeProjectsResponse struct {
	CommonResponse
	Projects []ProjectInfo `json:"Projects"`
	Total    int64         `json:"Total"`
}

type DescribeRuleRequest

type DescribeRuleRequest struct {
	CommonRequest
	RuleID string `json:"RuleId"`
}

func (*DescribeRuleRequest) CheckValidation

func (v *DescribeRuleRequest) CheckValidation() error

type DescribeRuleResponse

type DescribeRuleResponse struct {
	CommonResponse
	ProjectID      string           `json:"ProjectId"`
	ProjectName    string           `json:"ProjectName"`
	TopicID        string           `json:"TopicId"`
	TopicName      string           `json:"TopicName"`
	RuleInfo       *RuleInfo        `json:"RuleInfo"`
	HostGroupInfos []*HostGroupInfo `json:"HostGroupInfos"`
}

type DescribeRulesRequest

type DescribeRulesRequest struct {
	CommonRequest
	ProjectID  string  `json:"ProjectId"`
	PageNumber int     `json:"PageNumber"`
	PageSize   int     `json:"PageSize"`
	TopicID    *string `json:"TopicId,omitempty"`
	TopicName  *string `json:"TopicName,omitempty"`
	RuleID     *string `json:"RuleId,omitempty"`
	RuleName   *string `json:"RuleName,omitempty"`
}

func (*DescribeRulesRequest) CheckValidation

func (v *DescribeRulesRequest) CheckValidation() error

type DescribeRulesResponse

type DescribeRulesResponse struct {
	CommonResponse
	Total     int64       `json:"Total"`
	RuleInfos []*RuleInfo `json:"RuleInfos"`
}

type DescribeShardsRequest

type DescribeShardsRequest struct {
	CommonRequest
	TopicID    string
	PageNumber int
	PageSize   int
}

func (*DescribeShardsRequest) CheckValidation

func (v *DescribeShardsRequest) CheckValidation() error

type DescribeShardsResponse

type DescribeShardsResponse struct {
	CommonResponse
	Shards []*struct {
		TopicID           string `json:"TopicId"`
		ShardID           int32  `json:"ShardId"`
		InclusiveBeginKey string `json:"InclusiveBeginKey"`
		ExclusiveEndKey   string `json:"ExclusiveEndKey"`
		Status            string `json:"Status"`
		ModifyTimestamp   string `json:"ModifyTime"`
		StopWriteTime     string `json:"StopWriteTime"`
	} `json:"Shards"`

	Total int `json:"Total"`
}

type DescribeShipperRequest added in v1.0.184

type DescribeShipperRequest struct {
	CommonRequest
	ShipperId string `json:"ShipperId"`
}

type DescribeShipperResponse added in v1.0.184

type DescribeShipperResponse struct {
	CommonResponse
	ProjectId        string            `json:"ProjectId,omitempty"`
	ProjectName      string            `json:"ProjectName,omitempty"`
	TopicId          string            `json:"TopicId,omitempty"`
	TopicName        string            `json:"TopicName,omitempty"`
	ShipperId        string            `json:"ShipperId,omitempty"`
	ShipperName      string            `json:"ShipperName,omitempty"`
	ShipperType      string            `json:"ShipperType,omitempty"`
	DashboardId      string            `json:"DashboardId,omitempty"`
	CreateTime       string            `json:"CreateTime,omitempty"`
	ModifyTime       string            `json:"ModifyTime,omitempty"`
	ShipperStartTime int               `json:"ShipperStartTime,omitempty"`
	ShipperEndTime   int               `json:"ShipperEndTime,omitempty"`
	Status           bool              `json:"Status,omitempty"`
	ContentInfo      *ContentInfo      `json:"ContentInfo,omitempty"`
	TosShipperInfo   *TosShipperInfo   `json:"TosShipperInfo,omitempty"`
	KafkaShipperInfo *KafkaShipperInfo `json:"KafkaShipperInfo,omitempty"`
}

type DescribeShippersRequest added in v1.0.184

type DescribeShippersRequest struct {
	CommonRequest
	IamProjectName string `json:"IamProjectName,omitempty"`
	ProjectId      string `json:"ProjectId,omitempty"`
	ProjectName    string `json:"ProjectName,omitempty"`
	TopicId        string `json:"TopicId,omitempty"`
	TopicName      string `json:"TopicName,omitempty"`
	ShipperId      string `json:"ShipperId,omitempty"`
	ShipperName    string `json:"ShipperName,omitempty"`
	ShipperType    string `json:"ShipperType,omitempty"`
	PageNumber     int    `json:"PageNumber,omitempty"`
	PageSize       int    `json:"PageSize,omitempty"`
}

type DescribeShippersResponse added in v1.0.184

type DescribeShippersResponse struct {
	CommonResponse
	Shippers []*DescribeShipperResponse `json:"Shippers"`
	Total    int                        `json:"Total"`
}

type DescribeTopicRequest

type DescribeTopicRequest struct {
	CommonRequest
	TopicID string
}

func (*DescribeTopicRequest) CheckValidation

func (v *DescribeTopicRequest) CheckValidation() error

type DescribeTopicResponse

type DescribeTopicResponse struct {
	CommonResponse
	TopicName       string    `json:"TopicName"`
	ProjectID       string    `json:"ProjectId"`
	TopicID         string    `json:"TopicId"`
	Ttl             uint16    `json:"Ttl"`
	CreateTimestamp string    `json:"CreateTime"`
	ModifyTimestamp string    `json:"ModifyTime"`
	ShardCount      int32     `json:"ShardCount"`
	Description     string    `json:"Description"`
	MaxSplitShard   int32     `json:"MaxSplitShard"`
	AutoSplit       bool      `json:"AutoSplit"`
	EnableTracking  bool      `json:"EnableTracking"`
	TimeKey         string    `json:"TimeKey"`
	TimeFormat      string    `json:"TimeFormat"`
	Tags            []TagInfo `json:"Tags"`
	LogPublicIP     bool      `json:"LogPublicIP"`
	EnableHotTtl    bool      `json:"EnableHotTtl"`
	HotTtl          int32     `json:"HotTtl"`
	ColdTtl         int32     `json:"ColdTtl"`
	ArchiveTtl      int32     `json:"ArchiveTtl"`
}

type DescribeTopicsRequest

type DescribeTopicsRequest struct {
	CommonRequest
	ProjectID  string
	PageNumber int
	PageSize   int
	TopicName  string
	TopicID    string
	IsFullName bool
	Tags       []TagInfo
}

func (*DescribeTopicsRequest) CheckValidation

func (v *DescribeTopicsRequest) CheckValidation() error

type DescribeTopicsResponse

type DescribeTopicsResponse struct {
	CommonResponse
	Topics []*Topic `json:"Topics"`
	Total  int      `json:"Total"`
}

type DownloadTaskResp

type DownloadTaskResp struct {
	TaskId      string
	TaskName    string
	TopicId     string
	Query       string
	StartTime   string
	EndTime     string
	LogCount    int64
	LogSize     int64
	Compression string
	DataFormat  string
	TaskStatus  string
	CreateTime  string
}

type ETLTaskResponse added in v1.0.180

type ETLTaskResponse struct {
	CreateTime      string
	DSLType         string
	TaskID          string `json:"TaskId"`
	Description     string
	ETLStatus       string
	Enable          bool
	FromTime        *int64
	LastEnableTime  string
	ModifyTime      string
	Name            string
	ProjectID       string `json:"ProjectId"`
	ProjectName     string
	Script          string
	SourceTopicID   string `json:"SourceTopicId"`
	SourceTopicName string
	TargetResources []TargetResourcesResp
	TaskType        string
	ToTime          *int64
}

type Error

type Error struct {
	HTTPCode  int32  `json:"httpCode"`
	Code      string `json:"errorCode"`
	Message   string `json:"errorMessage"`
	RequestID string `json:"requestID"`
}

func NewClientError

func NewClientError(err error) *Error

func (Error) Error

func (e Error) Error() string

func (Error) String

func (e Error) String() string

type ExcludePath

type ExcludePath struct {
	Type  string `json:"Type,omitempty"`
	Value string `json:"Value,omitempty"`
}

type ExtractRule

type ExtractRule struct {
	Delimiter           string           `json:"Delimiter,omitempty"`
	BeginRegex          string           `json:"BeginRegex,omitempty"`
	LogRegex            string           `json:"LogRegex,omitempty"`
	Keys                []string         `json:"Keys,omitempty"`
	TimeKey             string           `json:"TimeKey,omitempty"`
	TimeFormat          string           `json:"TimeFormat,omitempty"`
	FilterKeyRegex      []FilterKeyRegex `json:"FilterKeyRegex,omitempty"`
	UnMatchUpLoadSwitch bool             `json:"UnMatchUpLoadSwitch"`
	UnMatchLogKey       string           `json:"UnMatchLogKey,omitempty"`
	LogTemplate         LogTemplate      `json:"LogTemplate,omitempty"`
	Quote               string           `json:"Quote,omitempty"`
}

type FilterKeyRegex

type FilterKeyRegex struct {
	Key   string `json:"Key,omitempty"`
	Regex string `json:"Regex,omitempty"`
}

type FullTextInfo

type FullTextInfo struct {
	Delimiter      string `json:"Delimiter"`
	CaseSensitive  bool   `json:"CaseSensitive"`
	IncludeChinese bool   `json:"IncludeChinese"`
}

type HistogramInfo

type HistogramInfo struct {
	Count int64 `json:"Count"`
	Time  int64 `json:"Time"`
}

type HistogramInfoV1 added in v1.0.186

type HistogramInfoV1 struct {
	Count        int64  `json:"Count"`
	EndTime      int64  `json:"EndTime"`
	StartTime    int64  `json:"StartTime"`
	ResultStatus string `json:"ResultStatus"`
}

type HostGroupHostsRulesInfo

type HostGroupHostsRulesInfo struct {
	HostGroupInfo *HostGroupInfo `json:"HostGroupInfo"`
	HostInfos     []*HostInfo    `json:"HostInfos"`
	RuleInfos     []*RuleInfo    `json:"RuleInfos"`
}

type HostGroupInfo

type HostGroupInfo struct {
	HostGroupID                   string `json:"HostGroupId"`
	HostGroupName                 string `json:"HostGroupName"`
	HostGroupType                 string `json:"HostGroupType"`
	HostIdentifier                string `json:"HostIdentifier"`
	HostCount                     int    `json:"HostCount"`
	NormalHeartbeatStatusNumber   int    `json:"NormalHeartbeatStatusCount"`
	AbnormalHeartbeatStatusNumber int    `json:"AbnormalHeartbeatStatusCount"`
	RuleCount                     int    `json:"RuleCount"`
	CreateTime                    string `json:"CreateTime"`
	ModifyTime                    string `json:"ModifyTime"`
	AutoUpdate                    bool   `json:"AutoUpdate"`
	UpdateStartTime               string `json:"UpdateStartTime"`
	UpdateEndTime                 string `json:"UpdateEndTime"`
	AgentLatestVersion            string `json:"AgentLatestVersion"`
	ServiceLogging                bool   `json:"ServiceLogging"`
	IamProjectName                string `json:"IamProjectName"`
}

type HostInfo

type HostInfo struct {
	IP                  string `json:"Ip"`
	LogCollectorVersion string `json:"LogCollectorVersion"`
	HeartbeatStatus     int    `json:"HeartbeatStatus"`
}

type ImportExtractRule added in v1.0.184

type ImportExtractRule struct {
	TimeZone         string `json:"TimeZone,omitempty"`
	SkipLineCount    int    `json:"SkipLineCount,omitempty"`
	TimeExtractRegex string `json:"TimeExtractRegex,omitempty"`
	*ExtractRule
}

type ImportSourceInfo added in v1.0.184

type ImportSourceInfo struct {
	*TosSourceInfo   `json:"TosSourceInfo,omitempty"`
	*KafkaSourceInfo `json:"KafkaSourceInfo,omitempty"`
}

type ImportTaskInfo added in v1.0.184

type ImportTaskInfo struct {
	TaskID           string            `json:"TaskId"`
	Status           int               `json:"status"`
	TopicID          string            `json:"TopicId"`
	TaskName         string            `json:"TaskName"`
	ProjectID        string            `json:"ProjectId"`
	TopicName        string            `json:"TopicName"`
	CreateTime       string            `json:"CreateTime"`
	SourceType       string            `json:"SourceType"`
	Description      string            `json:"Description"`
	ProjectName      string            `json:"ProjectName"`
	TargetInfo       *TargetInfo       `json:"TargetInfo"`
	TaskStatistics   *TaskStatistics   `json:"TaskStatistics"`
	ImportSourceInfo *ImportSourceInfo `json:"ImportSourceInfo"`
}

type JoinConfig added in v1.0.189

type JoinConfig struct {
	Condition        string `json:"Condition"`
	SetOperationType string `json:"SetOperationType"`
}

type JsonInfo added in v1.0.184

type JsonInfo struct {
	Keys   []string `json:"Keys,omitempty"`
	Enable bool     `json:"Enable"`
	Escape bool     `json:"Escape,omitempty"`
}

type KafkaShipperInfo added in v1.0.184

type KafkaShipperInfo struct {
	Instance   string `json:"Instance"`
	Compress   string `json:"Compress"`
	KafkaTopic string `json:"KafkaTopic"`
	StartTime  int    `json:"StartTime,omitempty"`
	EndTime    int    `json:"EndTime,omitempty"`
}

type KafkaSourceInfo added in v1.0.184

type KafkaSourceInfo struct {
	Host              string `json:"host,omitempty"`
	Group             string `json:"group,omitempty"`
	Topic             string `json:"topic,omitempty"`
	Encode            string `json:"encode,omitempty"`
	Password          string `json:"password,omitempty"`
	Protocol          string `json:"protocol,omitempty"`
	Username          string `json:"username,omitempty"`
	Mechanism         string `json:"mechanism,omitempty"`
	InstanceID        string `json:"instance_id,omitempty"`
	IsNeedAuth        bool   `json:"is_need_auth,omitempty"`
	InitialOffset     int    `json:"initial_offset,omitempty"`
	TimeSourceDefault int    `json:"time_source_default,omitempty"`
}

type KeyValueInfo

type KeyValueInfo struct {
	Key   string
	Value Value
}

type KeyValueList

type KeyValueList []KeyValueParam

func (KeyValueList) Value

func (c KeyValueList) Value() (driver.Value, error)

type KeyValueParam

type KeyValueParam struct {
	Key   string `json:"key"`
	Value Value  `json:"value"`
}

type KubernetesRule

type KubernetesRule struct {
	NamespaceNameRegex        string            `json:"NamespaceNameRegex,omitempty"`
	WorkloadType              string            `json:"WorkloadType,omitempty"`
	WorkloadNameRegex         string            `json:"WorkloadNameRegex,omitempty"`
	PodNameRegex              string            `json:"PodNameRegex,omitempty"`
	IncludePodLabelRegex      map[string]string `json:"IncludePodLabelRegex,omitempty"`
	ExcludePodLabelRegex      map[string]string `json:"ExcludePodLabelRegex,omitempty"`
	LabelTag                  map[string]string `json:"LabelTag,omitempty"`
	AnnotationTag             map[string]string `json:"AnnotationTag,omitempty"`
	IncludePodAnnotationRegex map[string]string `json:"IncludePodAnnotationRegex,omitempty"`
	ExcludePodAnnotationRegex map[string]string `json:"ExcludePodAnnotationRegex,omitempty"`
}

type Log

type Log struct {
	Contents []LogContent
	Time     int64 // 可以不填, 默认使用当前时间
}

type LogContent

type LogContent struct {
	Key   string
	Value string
}

type LogTemplate

type LogTemplate struct {
	Type   string `json:"Type,omitempty"`
	Format string `json:"Format,omitempty"`
}

type LsClient

type LsClient struct {
	BaseClient *base.Client
	Endpoint   string

	AccessKeyID     string
	AccessKeySecret string
	SecurityToken   string
	UserAgent       string
	RequestTimeOut  time.Duration
	Region          string
	APIVersion      string
	CustomUserAgent string
	// contains filtered or unexported fields
}

func (*LsClient) AddTagsToResource added in v1.0.138

func (c *LsClient) AddTagsToResource(request *AddTagsToResourceRequest) (*CommonResponse, error)

func (*LsClient) ApplyRuleToHostGroups

func (c *LsClient) ApplyRuleToHostGroups(request *ApplyRuleToHostGroupsRequest) (r *CommonResponse, e error)

func (*LsClient) Close

func (c *LsClient) Close() error

func (*LsClient) CloseKafkaConsumer

func (c *LsClient) CloseKafkaConsumer(request *CloseKafkaConsumerRequest) (r *CloseKafkaConsumerResponse, e error)

func (*LsClient) ConsumeLogs

func (c *LsClient) ConsumeLogs(request *ConsumeLogsRequest) (r *ConsumeLogsResponse, e error)

func (*LsClient) ConsumerHeartbeat

func (c *LsClient) ConsumerHeartbeat(request *ConsumerHeartbeatRequest) (*ConsumerHeartbeatResponse, error)

func (*LsClient) CreateAlarm

func (c *LsClient) CreateAlarm(request *CreateAlarmRequest) (r *CreateAlarmResponse, e error)

func (*LsClient) CreateAlarmNotifyGroup

func (c *LsClient) CreateAlarmNotifyGroup(request *CreateAlarmNotifyGroupRequest) (r *CreateAlarmNotifyGroupResponse, e error)

func (*LsClient) CreateConsumerGroup

func (c *LsClient) CreateConsumerGroup(request *CreateConsumerGroupRequest) (*CreateConsumerGroupResponse, error)

func (*LsClient) CreateDownloadTask

func (c *LsClient) CreateDownloadTask(request *CreateDownloadTaskRequest) (r *CreateDownloadTaskResponse, e error)

func (*LsClient) CreateETLTask added in v1.0.180

func (c *LsClient) CreateETLTask(request *CreateETLTaskRequest) (*CreateETLTaskResponse, error)

func (*LsClient) CreateHostGroup

func (c *LsClient) CreateHostGroup(request *CreateHostGroupRequest) (r *CreateHostGroupResponse, e error)

func (*LsClient) CreateImportTask added in v1.0.184

func (c *LsClient) CreateImportTask(request *CreateImportTaskRequest) (r *CreateImportTaskResponse, err error)

func (*LsClient) CreateIndex

func (c *LsClient) CreateIndex(request *CreateIndexRequest) (r *CreateIndexResponse, e error)

func (*LsClient) CreateProject

func (c *LsClient) CreateProject(request *CreateProjectRequest) (r *CreateProjectResponse, e error)

func (*LsClient) CreateRule

func (c *LsClient) CreateRule(request *CreateRuleRequest) (r *CreateRuleResponse, e error)

func (*LsClient) CreateShipper added in v1.0.184

func (c *LsClient) CreateShipper(request *CreateShipperRequest) (*CreateShipperResponse, error)

func (*LsClient) CreateTopic

func (c *LsClient) CreateTopic(request *CreateTopicRequest) (r *CreateTopicResponse, e error)

CreateTopic 创建日志主题

func (*LsClient) DeleteAbnormalHosts added in v1.0.138

func (c *LsClient) DeleteAbnormalHosts(request *DeleteAbnormalHostsRequest) (*CommonResponse, error)

func (*LsClient) DeleteAlarm

func (c *LsClient) DeleteAlarm(request *DeleteAlarmRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteAlarmNotifyGroup

func (c *LsClient) DeleteAlarmNotifyGroup(request *DeleteAlarmNotifyGroupRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteConsumerGroup

func (c *LsClient) DeleteConsumerGroup(request *DeleteConsumerGroupRequest) (*CommonResponse, error)

func (*LsClient) DeleteETLTask added in v1.0.180

func (c *LsClient) DeleteETLTask(request *DeleteETLTaskRequest) (*CommonResponse, error)

func (*LsClient) DeleteHost

func (c *LsClient) DeleteHost(request *DeleteHostRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteHostGroup

func (c *LsClient) DeleteHostGroup(request *DeleteHostGroupRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteImportTask added in v1.0.184

func (c *LsClient) DeleteImportTask(request *DeleteImportTaskRequest) (r *DeleteImportTaskResponse, err error)

func (*LsClient) DeleteIndex

func (c *LsClient) DeleteIndex(request *DeleteIndexRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteProject

func (c *LsClient) DeleteProject(request *DeleteProjectRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteRule

func (c *LsClient) DeleteRule(request *DeleteRuleRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteRuleFromHostGroups

func (c *LsClient) DeleteRuleFromHostGroups(request *DeleteRuleFromHostGroupsRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteShipper added in v1.0.184

func (c *LsClient) DeleteShipper(request *DeleteShipperRequest) (*DeleteShipperResponse, error)

func (*LsClient) DeleteTopic

func (c *LsClient) DeleteTopic(request *DeleteTopicRequest) (r *CommonResponse, e error)

DeleteTopic 删除日志主题

func (*LsClient) DescribeAlarmNotifyGroups

func (c *LsClient) DescribeAlarmNotifyGroups(request *DescribeAlarmNotifyGroupsRequest) (r *DescribeAlarmNotifyGroupsResponse, e error)

func (*LsClient) DescribeAlarms

func (c *LsClient) DescribeAlarms(request *DescribeAlarmsRequest) (r *DescribeAlarmsResponse, e error)

func (*LsClient) DescribeCheckPoint

func (c *LsClient) DescribeCheckPoint(request *DescribeCheckPointRequest) (*DescribeCheckPointResponse, error)

func (*LsClient) DescribeConsumerGroups

func (c *LsClient) DescribeConsumerGroups(request *DescribeConsumerGroupsRequest) (*DescribeConsumerGroupsResponse, error)

func (*LsClient) DescribeCursor

func (c *LsClient) DescribeCursor(request *DescribeCursorRequest) (r *DescribeCursorResponse, e error)

func (*LsClient) DescribeDownloadTasks

func (c *LsClient) DescribeDownloadTasks(request *DescribeDownloadTasksRequest) (r *DescribeDownloadTasksResponse, e error)

func (*LsClient) DescribeDownloadUrl

func (c *LsClient) DescribeDownloadUrl(request *DescribeDownloadUrlRequest) (r *DescribeDownloadUrlResponse, e error)

func (*LsClient) DescribeETLTask added in v1.0.180

func (c *LsClient) DescribeETLTask(request *DescribeETLTaskRequest) (*DescribeETLTaskResponse, error)

func (*LsClient) DescribeETLTasks added in v1.0.180

func (c *LsClient) DescribeETLTasks(request *DescribeETLTasksRequest) (*DescribeETLTasksResponse, error)

func (*LsClient) DescribeHistogram deprecated

func (c *LsClient) DescribeHistogram(request *DescribeHistogramRequest) (r *DescribeHistogramResponse, e error)

Deprecated: use DescribeHistogramV1 instead

func (*LsClient) DescribeHistogramV1 added in v1.0.186

func (c *LsClient) DescribeHistogramV1(request *DescribeHistogramV1Request) (r *DescribeHistogramV1Response, e error)

func (*LsClient) DescribeHostGroup

func (c *LsClient) DescribeHostGroup(request *DescribeHostGroupRequest) (r *DescribeHostGroupResponse, e error)

func (*LsClient) DescribeHostGroupRules

func (c *LsClient) DescribeHostGroupRules(request *DescribeHostGroupRulesRequest) (r *DescribeHostGroupRulesResponse, e error)

func (*LsClient) DescribeHostGroups

func (c *LsClient) DescribeHostGroups(request *DescribeHostGroupsRequest) (r *DescribeHostGroupsResponse, e error)

func (*LsClient) DescribeHosts

func (c *LsClient) DescribeHosts(request *DescribeHostsRequest) (r *DescribeHostsResponse, e error)

func (*LsClient) DescribeImportTask added in v1.0.184

func (c *LsClient) DescribeImportTask(request *DescribeImportTaskRequest) (r *DescribeImportTaskResponse, err error)

func (*LsClient) DescribeImportTasks added in v1.0.184

func (c *LsClient) DescribeImportTasks(request *DescribeImportTasksRequest) (r *DescribeImportTasksResponse, err error)

func (*LsClient) DescribeIndex

func (c *LsClient) DescribeIndex(request *DescribeIndexRequest) (r *DescribeIndexResponse, e error)

func (*LsClient) DescribeKafkaConsumer

func (c *LsClient) DescribeKafkaConsumer(request *DescribeKafkaConsumerRequest) (r *DescribeKafkaConsumerResponse, e error)

func (*LsClient) DescribeLogContext

func (c *LsClient) DescribeLogContext(request *DescribeLogContextRequest) (r *DescribeLogContextResponse, e error)

func (*LsClient) DescribeProject

func (c *LsClient) DescribeProject(request *DescribeProjectRequest) (r *DescribeProjectResponse, e error)

func (*LsClient) DescribeProjects

func (c *LsClient) DescribeProjects(request *DescribeProjectsRequest) (r *DescribeProjectsResponse, e error)

func (*LsClient) DescribeRule

func (c *LsClient) DescribeRule(request *DescribeRuleRequest) (r *DescribeRuleResponse, e error)

func (*LsClient) DescribeRules

func (c *LsClient) DescribeRules(request *DescribeRulesRequest) (r *DescribeRulesResponse, e error)

func (*LsClient) DescribeShards

func (c *LsClient) DescribeShards(request *DescribeShardsRequest) (r *DescribeShardsResponse, e error)

func (*LsClient) DescribeShipper added in v1.0.184

func (c *LsClient) DescribeShipper(request *DescribeShipperRequest) (*DescribeShipperResponse, error)

func (*LsClient) DescribeShippers added in v1.0.184

func (c *LsClient) DescribeShippers(request *DescribeShippersRequest) (*DescribeShippersResponse, error)

func (*LsClient) DescribeTopic

func (c *LsClient) DescribeTopic(request *DescribeTopicRequest) (r *DescribeTopicResponse, e error)

DescribeTopic 获取一个日志主题的信息

func (*LsClient) DescribeTopics

func (c *LsClient) DescribeTopics(request *DescribeTopicsRequest) (r *DescribeTopicsResponse, e error)

DescribeTopics 获取日志主题列表

func (*LsClient) ModifyAlarm

func (c *LsClient) ModifyAlarm(request *ModifyAlarmRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyAlarmNotifyGroup

func (c *LsClient) ModifyAlarmNotifyGroup(request *ModifyAlarmNotifyGroupRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyCheckPoint

func (c *LsClient) ModifyCheckPoint(request *ModifyCheckPointRequest) (*CommonResponse, error)

func (*LsClient) ModifyConsumerGroup

func (c *LsClient) ModifyConsumerGroup(request *ModifyConsumerGroupRequest) (*CommonResponse, error)

func (*LsClient) ModifyETLTask added in v1.0.180

func (c *LsClient) ModifyETLTask(request *ModifyETLTaskRequest) (*CommonResponse, error)

func (*LsClient) ModifyETLTaskStatus added in v1.0.180

func (c *LsClient) ModifyETLTaskStatus(request *ModifyETLTaskStatusRequest) (*CommonResponse, error)

func (*LsClient) ModifyHostGroup

func (c *LsClient) ModifyHostGroup(request *ModifyHostGroupRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyHostGroupsAutoUpdate

func (c *LsClient) ModifyHostGroupsAutoUpdate(request *ModifyHostGroupsAutoUpdateRequest) (r *ModifyHostGroupsAutoUpdateResponse, e error)

func (*LsClient) ModifyImportTask added in v1.0.184

func (c *LsClient) ModifyImportTask(request *ModifyImportTaskRequest) (r *ModifyImportTaskResponse, err error)

func (*LsClient) ModifyIndex

func (c *LsClient) ModifyIndex(request *ModifyIndexRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyProject

func (c *LsClient) ModifyProject(request *ModifyProjectRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyRule

func (c *LsClient) ModifyRule(request *ModifyRuleRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyShipper added in v1.0.184

func (c *LsClient) ModifyShipper(request *ModifyShipperRequest) (*ModifyShipperResponse, error)

func (*LsClient) ModifyTopic

func (c *LsClient) ModifyTopic(request *ModifyTopicRequest) (r *CommonResponse, e error)

ModifyTopic 更新日志主题信息

func (*LsClient) OpenKafkaConsumer

func (c *LsClient) OpenKafkaConsumer(request *OpenKafkaConsumerRequest) (r *OpenKafkaConsumerResponse, e error)

func (*LsClient) PutLogs

func (c *LsClient) PutLogs(request *PutLogsRequest) (r *CommonResponse, e error)

func (*LsClient) PutLogsV2

func (c *LsClient) PutLogsV2(request *PutLogsV2Request) (r *CommonResponse, e error)

func (*LsClient) RemoveTagsFromResource added in v1.0.138

func (c *LsClient) RemoveTagsFromResource(request *RemoveTagsFromResourceRequest) (*CommonResponse, error)

func (*LsClient) Request

func (c *LsClient) Request(method, uri string, params map[string]string, headers map[string]string, body []byte) (rsp *http.Response, e error)

func (*LsClient) ResetAccessKeyToken

func (c *LsClient) ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string)

ResetAccessKeyToken reset client's access key token

func (*LsClient) ResetCheckPoint added in v1.0.138

func (c *LsClient) ResetCheckPoint(request *ResetCheckPointRequest) (*CommonResponse, error)

func (*LsClient) SearchLogs

func (c *LsClient) SearchLogs(request *SearchLogsRequest) (r *SearchLogsResponse, e error)

func (*LsClient) SearchLogsV2 added in v1.0.102

func (c *LsClient) SearchLogsV2(request *SearchLogsRequest) (*SearchLogsResponse, error)

SearchLogsV2 搜索按照0.3.0api版本进行,和默认的0.2.0版本区别见文档https://www.volcengine.com/docs/6470/112170

func (*LsClient) SetAPIVersion added in v1.0.102

func (c *LsClient) SetAPIVersion(version string)

func (*LsClient) SetCustomUserAgent added in v1.0.159

func (c *LsClient) SetCustomUserAgent(customUserAgent string)

func (*LsClient) SetRetryCounterMaximum

func (c *LsClient) SetRetryCounterMaximum(maximum int32)

func (*LsClient) SetRetryIntervalMs

func (c *LsClient) SetRetryIntervalMs(interval time.Duration)

func (*LsClient) SetTimeout

func (c *LsClient) SetTimeout(timeout time.Duration)

func (*LsClient) String

func (c *LsClient) String() string

func (*LsClient) WebTracks

func (c *LsClient) WebTracks(request *WebTracksRequest) (r *WebTracksResponse, e error)

type ModifyAlarmNotifyGroupRequest

type ModifyAlarmNotifyGroupRequest struct {
	CommonRequest
	AlarmNotifyGroupID   string       `json:"AlarmNotifyGroupId"`
	AlarmNotifyGroupName *string      `json:"AlarmNotifyGroupName,omitempty"`
	NoticeType           *NoticeTypes `json:"NotifyType,omitempty"`
	Receivers            *Receivers   `json:"Receivers,omitempty"`
}

func (*ModifyAlarmNotifyGroupRequest) CheckValidation

func (v *ModifyAlarmNotifyGroupRequest) CheckValidation() error

type ModifyAlarmRequest

type ModifyAlarmRequest struct {
	CommonRequest
	AlarmID            string              `json:"AlarmId"`
	AlarmName          *string             `json:"AlarmName"`
	Status             *bool               `json:"Status"`
	QueryRequest       *QueryRequests      `json:"QueryRequest"`
	RequestCycle       *RequestCycle       `json:"RequestCycle"`
	Condition          *string             `json:"Condition"`
	TriggerPeriod      *int                `json:"TriggerPeriod"`
	AlarmPeriod        *int                `json:"AlarmPeriod"`
	AlarmNotifyGroup   *[]string           `json:"AlarmNotifyGroup"`
	UserDefineMsg      *string             `json:"UserDefineMsg"`
	Severity           *string             `json:"Severity,omitempty"`
	AlarmPeriodDetail  *AlarmPeriodSetting `json:"AlarmPeriodDetail,omitempty"`
	JoinConfigurations []JoinConfig        `json:"JoinConfigurations,omitempty"`
	TriggerConditions  []TriggerCondition  `json:"TriggerConditions,omitempty"`
}

func (*ModifyAlarmRequest) CheckValidation

func (v *ModifyAlarmRequest) CheckValidation() error

type ModifyCheckPointRequest

type ModifyCheckPointRequest struct {
	ProjectID         string `json:"ProjectID"`
	TopicID           string `json:"TopicID"`
	ConsumerGroupName string `json:"ConsumerGroupName"`
	ShardID           int    `json:"ShardID"`
	Checkpoint        string `json:"Checkpoint"`
}

type ModifyCheckPointResponse

type ModifyCheckPointResponse struct {
	CommonResponse
}

type ModifyConsumerGroupRequest

type ModifyConsumerGroupRequest struct {
	ProjectID         string    `json:"ProjectID"`
	TopicIDList       *[]string `json:"TopicIDList"`
	ConsumerGroupName string    `json:"ConsumerGroupName"`
	HeartbeatTTL      *int      `json:"HeartbeatTTL"`
	OrderedConsume    *bool     `json:"OrderedConsume"`
}

type ModifyConsumerGroupResponse

type ModifyConsumerGroupResponse struct {
	CommonResponse
}

type ModifyETLTaskRequest added in v1.0.180

type ModifyETLTaskRequest struct {
	CommonRequest
	TaskID          string  `json:"TaskId"`
	Description     *string `json:",omitempty"`
	Name            *string `json:",omitempty"`
	Script          *string `json:",omitempty"`
	TargetResources []TargetResource
}

type ModifyETLTaskStatusRequest added in v1.0.180

type ModifyETLTaskStatusRequest struct {
	CommonRequest
	TaskID string `json:"TaskId"`
	Enable bool
}

type ModifyHostGroupRequest

type ModifyHostGroupRequest struct {
	CommonRequest
	HostGroupID     string    `json:"HostGroupId"`
	HostGroupName   *string   `json:"HostGroupName,omitempty"`
	HostGroupType   *string   `json:"HostGroupType,omitempty"`
	HostIPList      *[]string `json:"HostIpList,omitempty"`
	HostIdentifier  *string   `json:"HostIdentifier,omitempty"`
	AutoUpdate      *bool     `json:",omitempty"`
	UpdateStartTime *string   `json:",omitempty"`
	UpdateEndTime   *string   `json:",omitempty"`
	ServiceLogging  *bool     `json:",omitempty"`
}

func (*ModifyHostGroupRequest) CheckValidation

func (v *ModifyHostGroupRequest) CheckValidation() error

type ModifyHostGroupsAutoUpdateRequest

type ModifyHostGroupsAutoUpdateRequest struct {
	CommonRequest
	HostGroupIds    []string
	AutoUpdate      *bool   `json:",omitempty"`
	UpdateStartTime *string `json:",omitempty"`
	UpdateEndTime   *string `json:",omitempty"`
}

func (*ModifyHostGroupsAutoUpdateRequest) CheckValidation

func (v *ModifyHostGroupsAutoUpdateRequest) CheckValidation() error

type ModifyHostGroupsAutoUpdateResponse

type ModifyHostGroupsAutoUpdateResponse struct {
	CommonResponse
}

type ModifyImportTaskRequest added in v1.0.184

type ModifyImportTaskRequest struct {
	CommonRequest
	ProjectID        string            `json:"ProjectID,omitempty"`
	TopicID          string            `json:"TopicID"`
	TaskID           string            `json:"TaskId"`
	TaskName         string            `json:"TaskName"`
	Status           int               `json:"Status"`
	SourceType       string            `json:"SourceType"`
	Description      *string           `json:"Description,omitempty"`
	ImportSourceInfo *ImportSourceInfo `json:"ImportSourceInfo"`
	TargetInfo       *TargetInfo       `json:"TargetInfo"`
}

type ModifyImportTaskResponse added in v1.0.184

type ModifyImportTaskResponse struct {
	CommonResponse
}

type ModifyIndexRequest

type ModifyIndexRequest struct {
	CommonRequest
	TopicID           string          `json:"TopicId"`
	FullText          *FullTextInfo   `json:",omitempty"`
	KeyValue          *[]KeyValueInfo `json:",omitempty"`
	UserInnerKeyValue *[]KeyValueInfo `json:",omitempty"`
}

func (*ModifyIndexRequest) CheckValidation

func (v *ModifyIndexRequest) CheckValidation() error

type ModifyProjectRequest

type ModifyProjectRequest struct {
	CommonRequest
	ProjectID   string
	ProjectName *string `json:",omitempty"`
	Description *string `json:",omitempty"`
}

func (*ModifyProjectRequest) CheckValidation

func (v *ModifyProjectRequest) CheckValidation() error

type ModifyRuleRequest

type ModifyRuleRequest struct {
	CommonRequest
	RuleID         string          `json:"RuleId,omitempty"`
	RuleName       *string         `json:"RuleName,omitempty"`
	Paths          *[]string       `json:"Paths,omitempty"`
	LogType        *string         `json:"LogType,omitempty"`
	ExtractRule    *ExtractRule    `json:"ExtractRule,omitempty"`
	ExcludePaths   *[]ExcludePath  `json:"ExcludePaths,omitempty"`
	UserDefineRule *UserDefineRule `json:"UserDefineRule,omitempty"`
	LogSample      *string         `json:"LogSample,omitempty"`
	InputType      *int            `json:"InputType,omitempty"`
	ContainerRule  *ContainerRule  `json:"ContainerRule,omitempty"`
}

func (*ModifyRuleRequest) CheckValidation

func (v *ModifyRuleRequest) CheckValidation() error

type ModifyShipperRequest added in v1.0.184

type ModifyShipperRequest struct {
	CommonRequest
	ShipperId        string            `json:"ShipperId"`
	ShipperName      string            `json:"ShipperName,omitempty"`
	ShipperType      string            `json:"ShipperType"`
	Status           *bool             `json:"Status,omitempty"`
	ContentInfo      *ContentInfo      `json:"ContentInfo,omitempty"`
	TosShipperInfo   *TosShipperInfo   `json:"TosShipperInfo,omitempty"`
	KafkaShipperInfo *KafkaShipperInfo `json:"KafkaShipperInfo,omitempty"`
}

func (*ModifyShipperRequest) CheckValidation added in v1.0.184

func (v *ModifyShipperRequest) CheckValidation() error

type ModifyShipperResponse added in v1.0.184

type ModifyShipperResponse struct {
	CommonResponse
}

type ModifyTopicRequest

type ModifyTopicRequest struct {
	CommonRequest
	TopicID        string  `json:"TopicId"`
	TopicName      *string `json:",omitempty"`
	Ttl            *uint16 `json:",omitempty"`
	Description    *string `json:",omitempty"`
	MaxSplitShard  *int32  `json:",omitempty"`
	AutoSplit      *bool   `json:",omitempty"`
	EnableTracking *bool   `json:",omitempty"`
	TimeKey        *string `json:",omitempty"`
	TimeFormat     *string `json:",omitempty"`
	LogPublicIP    *bool   `json:",omitempty"`
	EnableHotTtl   *bool   `json:",omitempty"`
	HotTtl         *int32  `json:",omitempty"`
	ColdTtl        *int32  `json:",omitempty"`
	ArchiveTtl     *int32  `json:",omitempty"`
}

func (*ModifyTopicRequest) CheckValidation

func (v *ModifyTopicRequest) CheckValidation() error

type NoticeType

type NoticeType string

type NoticeTypes

type NoticeTypes []NoticeType

type NotifyGroupsInfo

type NotifyGroupsInfo struct {
	GroupName       string      `json:"AlarmNotifyGroupName"`
	NotifyGroupID   string      `json:"AlarmNotifyGroupId"`
	NoticeType      NoticeTypes `json:"NotifyType"`
	Receivers       Receivers   `json:"Receivers"`
	CreateTimestamp string      `json:"CreateTime"`
	ModifyTimestamp string      `json:"ModifyTime"`
	IamProjectName  string      `json:"IamProjectName"`
}

type OpenKafkaConsumerRequest

type OpenKafkaConsumerRequest struct {
	CommonRequest
	TopicID string `json:"TopicId"`
}

func (*OpenKafkaConsumerRequest) CheckValidation

func (v *OpenKafkaConsumerRequest) CheckValidation() error

type OpenKafkaConsumerResponse

type OpenKafkaConsumerResponse struct {
	CommonResponse
}

type ParsePathRule

type ParsePathRule struct {
	PathSample string   `json:"PathSample,omitempty"`
	Regex      string   `json:"Regex,omitempty"`
	Keys       []string `json:"Keys,omitempty"`
}

type Plugin added in v1.0.127

type Plugin struct {
	Processors []map[string]interface{} `json:"processors,omitempty"`
}

type ProjectInfo

type ProjectInfo struct {
	ProjectID       string    `json:"ProjectId"`
	ProjectName     string    `json:"ProjectName"`
	Description     string    `json:"Description"`
	CreateTimestamp string    `json:"CreateTime"`
	TopicCount      int64     `json:"TopicCount"`
	InnerNetDomain  string    `json:"InnerNetDomain"`
	IamProjectName  string    `json:"IamProjectName"`
	Tags            []TagInfo `json:"Tags"`
}

type PutLogsRequest

type PutLogsRequest struct {
	CommonRequest
	TopicID      string
	HashKey      string
	CompressType string
	LogBody      *pb.LogGroupList
}

func (*PutLogsRequest) CheckValidation

func (v *PutLogsRequest) CheckValidation() error

type PutLogsV2Request

type PutLogsV2Request struct {
	CommonRequest
	TopicID      string
	HashKey      string
	CompressType string
	Source       string
	FileName     string
	Logs         []Log
}

type QueryRequest

type QueryRequest struct {
	CommonRequest
	Query           string `json:"Query"`
	Number          uint8  `json:"Number"`
	TopicID         string `json:"TopicId"`
	TopicName       string `json:"TopicName,omitempty"`
	StartTimeOffset int    `json:"StartTimeOffset"`
	EndTimeOffset   int    `json:"EndTimeOffset"`
}

type QueryRequests

type QueryRequests []QueryRequest

type QueryResp

type QueryResp struct {
	AlarmID            string             `json:"AlarmId"`
	AlarmName          string             `json:"AlarmName"`
	ProjectID          string             `json:"ProjectId"`
	Status             bool               `json:"Status"`
	QueryRequest       []QueryRequest     `json:"QueryRequest"`
	RequestCycle       RequestCycle       `json:"RequestCycle"`
	Condition          string             `json:"Condition"`
	TriggerPeriod      int                `json:"TriggerPeriod"`
	AlarmPeriod        int                `json:"AlarmPeriod"`
	AlarmNotifyGroup   []NotifyGroupsInfo `json:"AlarmNotifyGroup"`
	UserDefineMsg      string             `json:"UserDefineMsg"`
	CreateTimestamp    string             `json:"CreateTime"`
	ModifyTimestamp    string             `json:"ModifyTime"`
	Severity           string             `json:"Severity"`
	AlarmPeriodDetail  AlarmPeriodSetting `json:"AlarmPeriodDetail"`
	JoinConfigurations []JoinConfig       `json:"JoinConfigurations"`
	TriggerConditions  []TriggerCondition `json:"TriggerConditions"`
}

type Receiver

type Receiver struct {
	ReceiverType     ReveiverType      `json:"ReceiverType"`
	ReceiverNames    []string          `json:"ReceiverNames"`
	ReceiverChannels []ReceiverChannel `json:"ReceiverChannels"`
	StartTime        string            `json:"StartTime"`
	EndTime          string            `json:"EndTime"`
	Webhook          string            `json:",omitempty"`
}

type ReceiverChannel

type ReceiverChannel string

type Receivers

type Receivers []Receiver

type RemoveTagsFromResourceRequest added in v1.0.138

type RemoveTagsFromResourceRequest struct {
	CommonRequest
	ResourceType  string   `json:","`
	ResourcesList []string `json:","`
	TagKeyList    []string `json:","`
}

func (*RemoveTagsFromResourceRequest) CheckValidation added in v1.0.138

func (v *RemoveTagsFromResourceRequest) CheckValidation() error

type RequestCycle

type RequestCycle struct {
	Type    string `json:"Type"`
	Time    int    `json:"Time"`
	CronTab string `json:"CronTab"`
}

type ResetCheckPointRequest added in v1.0.138

type ResetCheckPointRequest struct {
	ProjectID         string `json:","`
	ConsumerGroupName string `json:","`
	Position          string `json:","`
}

func (*ResetCheckPointRequest) CheckValidation added in v1.0.138

func (v *ResetCheckPointRequest) CheckValidation() error

type ReveiverType

type ReveiverType string

type RuleInfo

type RuleInfo struct {
	TopicID        string         `json:"TopicId"`
	TopicName      string         `json:"TopicName"`
	RuleID         string         `json:"RuleId"`
	RuleName       string         `json:"RuleName"`
	Paths          []string       `json:"Paths"`
	LogType        string         `json:"LogType"`
	ExtractRule    ExtractRule    `json:"ExtractRule"`
	ExcludePaths   []ExcludePath  `json:"ExcludePaths"`
	UserDefineRule UserDefineRule `json:"UserDefineRule"`
	LogSample      string         `json:"LogSample"`
	InputType      int            `json:"InputType"`
	ContainerRule  ContainerRule  `json:"ContainerRule"`
	CreateTime     string         `json:"CreateTime"`
	ModifyTime     string         `json:"ModifyTime"`
}

type SearchLogsRequest

type SearchLogsRequest struct {
	CommonRequest
	TopicID   string `json:"TopicId"`
	Query     string `json:"Query"`
	StartTime int64  `json:"StartTime"`
	EndTime   int64  `json:"EndTime"`
	Limit     int    `json:"Limit"`
	HighLight bool   `json:"HighLight"`
	Context   string `json:"Context"`
	Sort      string `json:"Sort"`
}

func (*SearchLogsRequest) CheckValidation

func (v *SearchLogsRequest) CheckValidation() error

type SearchLogsResponse

type SearchLogsResponse struct {
	CommonResponse
	Status         string                   `json:"ResultStatus"`
	Analysis       bool                     `json:"Analysis"`
	ListOver       bool                     `json:"ListOver"`
	HitCount       int                      `json:"HitCount"`
	Count          int                      `json:"Count"`
	Limit          int                      `json:"Limit"`
	Logs           []map[string]interface{} `json:"Logs"`
	AnalysisResult *AnalysisResult          `json:"AnalysisResult"`
	Context        string                   `json:"Context"`
	HighLight      []string                 `json:"HighLight,omitempty"`
}

type ShardHashKey

type ShardHashKey struct {
	HashKey string `json:"HashKey,omitempty"`
}

type TagInfo added in v1.0.127

type TagInfo struct {
	Key   string `json:","`
	Value string `json:","`
}

type TargetInfo added in v1.0.184

type TargetInfo struct {
	Region         string             `json:"Region"`
	LogType        string             `json:"LogType"`
	LogSample      string             `json:"LogSample"`
	ExtractRule    *ImportExtractRule `json:"ExtractRule,omitempty"`
	UserDefineRule *UserDefineRule    `json:"UserDefineRule,omitempty"`
}

type TargetResource added in v1.0.180

type TargetResource struct {
	Alias   string
	TopicID string `json:"TopicId"`
}

type TargetResourcesResp added in v1.0.180

type TargetResourcesResp struct {
	Alias       string
	TopicID     string `json:"TopicId"`
	TopicName   string
	ProjectName string
	ProjectID   string `json:"ProjectId"`
}

type TaskStatistics added in v1.0.184

type TaskStatistics struct {
	Total            int    `json:"Total"`
	Failed           int    `json:"Failed"`
	Skipped          int    `json:"Skipped"`
	NotExist         int    `json:"NotExist"`
	BytesTotal       int    `json:"BytesTotal"`
	TaskStatus       string `json:"TaskStatus"`
	Transferred      int    `json:"Transferred"`
	BytesTransferred int    `json:"BytesTransferred"`
}

type Topic

type Topic struct {
	TopicName       string    `json:"TopicName"`
	ProjectID       string    `json:"ProjectId"`
	TopicID         string    `json:"TopicId"`
	Ttl             uint16    `json:"Ttl"`
	CreateTimestamp string    `json:"CreateTime"`
	ModifyTimestamp string    `json:"ModifyTime"`
	ShardCount      int32     `json:"ShardCount"`
	Description     string    `json:"Description"`
	MaxSplitShard   int32     `json:"MaxSplitShard"`
	AutoSplit       bool      `json:"AutoSplit"`
	EnableTracking  bool      `json:"EnableTracking"`
	TimeKey         string    `json:"TimeKey"`
	TimeFormat      string    `json:"TimeFormat"`
	Tags            []TagInfo `json:"Tags"`
	LogPublicIP     bool      `json:"LogPublicIP"`
	EnableHotTtl    bool      `json:"EnableHotTtl"`
	HotTtl          int32     `json:"HotTtl"`
	ColdTtl         int32     `json:"ColdTtl"`
	ArchiveTtl      int32     `json:"ArchiveTtl"`
}

type TosShipperInfo added in v1.0.184

type TosShipperInfo struct {
	Bucket          string `json:"Bucket,omitempty"`
	Prefix          string `json:"Prefix,omitempty"`
	MaxSize         int    `json:"MaxSize,omitempty"`
	Compress        string `json:"Compress,omitempty"`
	Interval        int    `json:"Interval,omitempty"`
	PartitionFormat string `json:"PartitionFormat,omitempty"`
}

type TosSourceInfo added in v1.0.184

type TosSourceInfo struct {
	Bucket       string `json:"bucket,omitempty"`
	Prefix       string `json:"prefix,omitempty"`
	Region       string `json:"region,omitempty"`
	CompressType string `json:"compress_type,omitempty"`
}

type TriggerCondition added in v1.0.189

type TriggerCondition struct {
	Severity       string `json:"Severity"`
	Condition      string `json:"Condition"`
	CountCondition string `json:"CountCondition"`
}

type UserDefineRule

type UserDefineRule struct {
	ParsePathRule *ParsePathRule    `json:"ParsePathRule,omitempty"`
	ShardHashKey  *ShardHashKey     `json:"ShardHashKey,omitempty"`
	EnableRawLog  bool              `json:"EnableRawLog,omitempty"`
	Fields        map[string]string `json:"Fields,omitempty"`
	Plugin        *Plugin           `json:"Plugin,omitempty"`
	Advanced      *Advanced         `json:"Advanced,omitempty"`
	TailFiles     bool              `json:"TailFiles,omitempty"`
}

type Value

type Value struct {
	ValueType      string         `json:"ValueType"`
	Delimiter      string         `json:"Delimiter"`
	CasSensitive   bool           `json:"CaseSensitive"`
	IncludeChinese bool           `json:"IncludeChinese"`
	SQLFlag        bool           `json:"SqlFlag"`
	JsonKeys       []KeyValueInfo `json:"JsonKeys"`
	IndexAll       bool           `json:"IndexAll"`
}

type WebTracksRequest

type WebTracksRequest struct {
	CommonRequest
	TopicID      string `json:"-"`
	ProjectID    string `json:"-"`
	CompressType string `json:"-"`
	Logs         []map[string]string
	Source       string `json:"Source,omitempty"`
}

func (*WebTracksRequest) CheckValidation

func (v *WebTracksRequest) CheckValidation() error

type WebTracksResponse

type WebTracksResponse struct {
	CommonResponse
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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