Documentation
¶
Index ¶
- Constants
- Variables
- func IsError(err error, code string) bool
- type AlarmLogPolicyStatusReq
- type AlarmStatisticReq
- type ChartIdInfo
- type ChartIdResp
- type ChartInfo
- type ChartSearchInfo
- type Client
- func (o Client) CreateChart(req *ChartInfo) (*ChartIdResp, error)
- func (o Client) CreateDashboard(req *DashboardInfo) (*DashboardIdResp, error)
- func (o Client) CreateDownloadTask(req *DownloadTaskReq) (*ErrorResp, error)
- func (o Client) CreateLogPolicy(req *LogPolicyInfo) (*LogPolicyResp, error)
- func (o Client) CreateLogPool(req *LogPoolInfo) (*ErrorResp, error)
- func (o Client) CreateProject(req *ProjectInfo) (*ErrorResp, error)
- func (o Client) CreateUser() (*ErrorResp, error)
- func (o Client) DeleteChart(req *ChartInfo) (*ErrorResp, error)
- func (o Client) DeleteDashboard(req *DeleteDashboardReq) (*ErrorResp, error)
- func (o Client) DeleteLogPool(req *LogPoolInfo) (*ErrorResp, error)
- func (o Client) DeleteProject(req *ProjectInfo) (*ErrorResp, error)
- func (o Client) DescribeAlertStatistics(req *AlarmStatisticReq) (*LogPolicyResp, error)
- func (o Client) DescribeDashboard(req *DescribeDashboardReq) (*DescribeDashboardResp, error)
- func (o Client) DescribeLogHistory(req *DescribeLogHistoryReq) (*LogPolicyResp, error)
- func (o Client) DescribeLogPolicy(req *DescribeLogPolicyReq) (*LogPolicyResp, error)
- func (o Client) DescribeLogPool(req *NameInfo) (*DescribeLogPoolResp, error)
- func (o Client) DescribeProjectInfo(req *NameInfo) (*DescribeProjectResp, error)
- func (o Client) EnableDisableLogPolicy(req *AlarmLogPolicyStatusReq) (*LogPolicyResp, error)
- func (o *Client) Flush(wait bool)
- func (o Client) GetDataHeat(req *DataHeatReq) (*DataHeatResp, error)
- func (o Client) GetDownloadUrls(req *DownloadUrlReq) (*DownloadUrlsResp, error)
- func (o Client) GetDynamicIndex(req *NameInfo) (*IndexTemplateResp, error)
- func (o Client) GetIndexTemplate(req *NameInfo) (*IndexTemplateResp, error)
- func (o Client) GetLogs(req *LogInfoReq) (*LogInfoResp, error)
- func (o Client) GetMonitorData(req *MonitorDataReq) (*MonitorDataResp, error)
- func (o *Client) GetStat() *Stat
- func (o *Client) GetStatDelta() *Stat
- func (o Client) GetToken(expireTime int64) (*GetTokenResp, error)
- func (o Client) GetTokenDefaultExpiration() (*GetTokenResp, error)
- func (o Client) GetUsage(req *GetUsageReq) (*GetUsageResp, error)
- func (o Client) GetUsageFee(req *GetUsageFeeReq) (*GetUsageFeeResp, error)
- func (o Client) GetUserGroup() (*UserGroupResp, error)
- func (o Client) GetUserStatus() (*UserInfoResp, error)
- func (o Client) ListDashboards(req *ListDashboardsReq) (*ListDashboardResp, error)
- func (o Client) ListDownloadTasks(req *ListDownloadTaskReq) (*ListDownloadTaskResp, error)
- func (o Client) ListIamProjects() (*ListIamProjectsResp, error)
- func (o Client) ListLogPools(req *ListLogPoolReq) (*ListLogPoolResp, error)
- func (o Client) ListProjects(req *ListProjectReq) (*ListProjectResp, error)
- func (o Client) ListTagKeys() (*ListTagKeyResp, error)
- func (o Client) ListTagValues(req *TagInfo) (*ListTagValuesResp, error)
- func (o Client) ModifyLogPolicy(req *LogPolicyInfo) (*LogPolicyResp, error)
- func (o *Client) Push(projectName, logPoolName, source, filename string, log *Log) error
- func (o *Client) PushString(projectName, logPoolName, message, source, filename string, timestamp int64) error
- func (o Client) RemoveLogPolicy(req *RemoveLogPolicyReq) (*LogPolicyResp, error)
- func (o Client) SetIndexTemplate(req *IndexTemplateReq) (*ErrorResp, error)
- func (o *Client) Stop()
- func (o Client) UpdateChart(req *ChartInfo) (*ErrorResp, error)
- func (o Client) UpdateDashboard(req *UpdateDashboardReq) (*ErrorResp, error)
- func (o Client) UpdateDashboardName(req *UpdateDashboardReq) (*ErrorResp, error)
- func (o Client) UpdateLogPool(req *LogPoolInfo) (*ErrorResp, error)
- func (o Client) UpdateProject(req *ProjectInfo) (*ErrorResp, error)
- type ClientOptions
- type DashboardIdResp
- type DashboardInfo
- type DataHeatItemMetric
- type DataHeatMetricInfo
- type DataHeatReq
- type DataHeatResp
- type DeleteDashboardReq
- type DescribeDashboardReq
- type DescribeDashboardResp
- type DescribeLogHistoryReq
- type DescribeLogPolicyReq
- type DescribeLogPoolReq
- type DescribeLogPoolResp
- type DescribeProjectReq
- type DescribeProjectResp
- type DownSampler
- type DownloadTask
- type DownloadTaskReq
- type DownloadUrlInfo
- type DownloadUrlReq
- type DownloadUrlsResp
- type ErrorResp
- func (o *ErrorResp) GetErrorResp() ErrorResp
- func (o ErrorResp) GetRequestId() string
- func (o ErrorResp) GetStatusCode() int
- func (o *ErrorResp) HasError() bool
- func (o *ErrorResp) SetErrorResp(resp ErrorResp)
- func (o *ErrorResp) SetRequestId(requestId string)
- func (o *ErrorResp) SetStatusCode(statusCode int)
- type FullTextIndex
- type GetTokenResp
- type GetUsageFeeReq
- type GetUsageFeeResp
- type GetUsageReq
- type GetUsageResp
- type IKLogError
- type IamProjectInfo
- type IndexField
- type IndexTemplateReq
- type IndexTemplateResp
- type ListDashboardResp
- type ListDashboardsReq
- type ListDownloadTaskReq
- type ListDownloadTaskResp
- type ListIamProjectsResp
- type ListLogPoolReq
- type ListLogPoolResp
- type ListProjectReq
- type ListProjectResp
- type ListRespInfo
- type ListTagKeyResp
- type ListTagValuesResp
- type Log
- type LogGroup
- func (*LogGroup) Descriptor() ([]byte, []int)deprecated
- func (x *LogGroup) GetFilename() string
- func (x *LogGroup) GetLogs() []*Log
- func (x *LogGroup) GetPool() string
- func (x *LogGroup) GetProject() string
- func (x *LogGroup) GetReserved() string
- func (x *LogGroup) GetSource() string
- func (*LogGroup) ProtoMessage()
- func (x *LogGroup) ProtoReflect() protoreflect.Message
- func (x *LogGroup) Reset()
- func (x *LogGroup) String() string
- type LogGroupList
- type LogHistogram
- type LogHistory
- type LogInfoReq
- type LogInfoResp
- type LogPolicyChannelParam
- type LogPolicyInfo
- type LogPolicyPageInfo
- type LogPolicyResp
- type LogPoolInfo
- type LogQuery
- type LogStatistics
- type Log_Content
- type Logger
- type MonitorDataKeyValue
- type MonitorDataPoint
- type MonitorDataPoints
- type MonitorDataReq
- type MonitorDataResp
- type NameInfo
- type PageInfo
- type ProjectInfo
- type RateLimit
- type RemoveLogPolicyReq
- type SpecialMetricInfo
- type Stat
- type TagInfo
- type TimeRangeInfo
- type UpdateDashboardReq
- type UsageMetricInfo
- type UserGroupResp
- type UserGrpList
- type UserInfoResp
Constants ¶
View Source
const ( MaxKeyCount = 900 // amount MaxKeySize = 1 << 20 // byte MaxValueSize = 1 << 20 // byte MaxBulkSize = 4 << 10 // amount MaxLogSize = 3000000 // byte MaxLogGroupSize = 3000000 // byte )
View Source
const ( InternalServerError = "InternalServerError" SignatureNotMatch = "SignatureNotMatch" PostBodyTooLarge = "PostBodyTooLarge" PostBodyInvalid = "PostBodyInvalid" // deprecated ProjectOrLogPoolNotExist = "ProjectOrLogPoolNotExist" UserNotExist = "UserNotExist" MaxBulkSizeExceeded = "MaxBulkSizeExceeded" MaxKeyCountExceeded = "MaxKeyCountExceeded" MaxKeySizeExceeded = "MaxKeySizeExceeded" MaxValueSizeExceeded = "MaxValueSizeExceeded" MaxLogSizeExceeded = "MaxLogSizeExceeded" InvalidUtf8InKey = "InvalidUtf8InKey" InvalidUtf8InValue = "InvalidUtf8InValue" HttpError = "HttpError" SignatureError = "SignatureError" CompressLz4Error = "CompressLz4Error" UnknownError = "UnknownError" RequestOpenAPIBodyOrParamInvalid = "RequestOpenAPIBodyOrParamInvalid" InvalidRequest = "InvalidRequest" JsonMarshalError = "JsonMarshalError" JsonUnMarshalError = "JsonUnMarshalError" )
错误码
View Source
const ( HeaderRequestId = "X-KSC-REQUEST-ID" OpenAPIVersion = "2020-07-31" SDKInternalErrorStatusCode = -1 )
View Source
const ( MINIMAL_RATE float64 = 1e-8 MAX_COUNT float64 = 1 << 30 )
View Source
const ( LevelDebug int = 1 LevelInfo int = 2 LevelWarn int = 3 LevelError int = 4 )
View Source
const ( CompressMethodNone = "none" CompressMethodLz4 = "lz4" )
View Source
const (
SDKVersion = "0.5.1-go-gitee"
)
Variables ¶
View Source
var BeijingZone = time.FixedZone("beijing", 3600*8)
View Source
var DefaultChainCredentials = credentials.NewChainCredentials( []credentials.Provider{ &credentials.EnvProvider{}, &credentials.SharedCredentialsProvider{Filename: "", Profile: ""}, })
DefaultChainCredentials is a Credentials which will find the first available credentials Value from the list of Providers.
This should be used in the default case. Once the type of credentials are known switching to the specific Credentials will be more efficient.
View Source
var File_klog_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type AlarmLogPolicyStatusReq ¶
type AlarmLogPolicyStatusReq struct {
PolicyId int64 `json:"policyId"`
Enabled int `json:"enabled"`
}
func NewAlarmLogPolicyStatusReq ¶
func NewAlarmLogPolicyStatusReq(enabled bool, policyId int64) *AlarmLogPolicyStatusReq
type AlarmStatisticReq ¶
type AlarmStatisticReq struct {
PolicyId int64 `json:"policyId"`
Start int64 `json:"start"`
End int64 `json:"end"`
}
func (*AlarmStatisticReq) ConvertToMap ¶
func (o *AlarmStatisticReq) ConvertToMap() map[string]interface{}
type ChartIdInfo ¶
type ChartIdInfo struct {
ChartId *int64
}
type ChartIdResp ¶
type ChartIdResp struct {
ErrorResp
ChartIdInfo
}
type ChartSearchInfo ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(options *ClientOptions) *Client
func (Client) CreateChart ¶
func (o Client) CreateChart(req *ChartInfo) (*ChartIdResp, error)
func (Client) CreateDashboard ¶
func (o Client) CreateDashboard(req *DashboardInfo) (*DashboardIdResp, error)
func (Client) CreateDownloadTask ¶
func (o Client) CreateDownloadTask(req *DownloadTaskReq) (*ErrorResp, error)
func (Client) CreateLogPolicy ¶
func (o Client) CreateLogPolicy(req *LogPolicyInfo) (*LogPolicyResp, error)
func (Client) CreateLogPool ¶
func (o Client) CreateLogPool(req *LogPoolInfo) (*ErrorResp, error)
func (Client) CreateProject ¶
func (o Client) CreateProject(req *ProjectInfo) (*ErrorResp, error)
func (Client) CreateUser ¶
func (Client) DeleteChart ¶
func (Client) DeleteDashboard ¶
func (o Client) DeleteDashboard(req *DeleteDashboardReq) (*ErrorResp, error)
func (Client) DeleteLogPool ¶
func (o Client) DeleteLogPool(req *LogPoolInfo) (*ErrorResp, error)
func (Client) DeleteProject ¶
func (o Client) DeleteProject(req *ProjectInfo) (*ErrorResp, error)
func (Client) DescribeAlertStatistics ¶
func (o Client) DescribeAlertStatistics(req *AlarmStatisticReq) (*LogPolicyResp, error)
func (Client) DescribeDashboard ¶
func (o Client) DescribeDashboard(req *DescribeDashboardReq) (*DescribeDashboardResp, error)
func (Client) DescribeLogHistory ¶
func (o Client) DescribeLogHistory(req *DescribeLogHistoryReq) (*LogPolicyResp, error)
func (Client) DescribeLogPolicy ¶
func (o Client) DescribeLogPolicy(req *DescribeLogPolicyReq) (*LogPolicyResp, error)
func (Client) DescribeLogPool ¶
func (o Client) DescribeLogPool(req *NameInfo) (*DescribeLogPoolResp, error)
func (Client) DescribeProjectInfo ¶
func (o Client) DescribeProjectInfo(req *NameInfo) (*DescribeProjectResp, error)
func (Client) EnableDisableLogPolicy ¶
func (o Client) EnableDisableLogPolicy(req *AlarmLogPolicyStatusReq) (*LogPolicyResp, error)
func (Client) GetDataHeat ¶
func (o Client) GetDataHeat(req *DataHeatReq) (*DataHeatResp, error)
func (Client) GetDownloadUrls ¶
func (o Client) GetDownloadUrls(req *DownloadUrlReq) (*DownloadUrlsResp, error)
func (Client) GetDynamicIndex ¶
func (o Client) GetDynamicIndex(req *NameInfo) (*IndexTemplateResp, error)
func (Client) GetIndexTemplate ¶
func (o Client) GetIndexTemplate(req *NameInfo) (*IndexTemplateResp, error)
func (Client) GetLogs ¶
func (o Client) GetLogs(req *LogInfoReq) (*LogInfoResp, error)
func (Client) GetMonitorData ¶
func (o Client) GetMonitorData(req *MonitorDataReq) (*MonitorDataResp, error)
func (*Client) GetStatDelta ¶
func (Client) GetToken ¶
func (o Client) GetToken(expireTime int64) (*GetTokenResp, error)
func (Client) GetTokenDefaultExpiration ¶
func (o Client) GetTokenDefaultExpiration() (*GetTokenResp, error)
func (Client) GetUsage ¶
func (o Client) GetUsage(req *GetUsageReq) (*GetUsageResp, error)
func (Client) GetUsageFee ¶
func (o Client) GetUsageFee(req *GetUsageFeeReq) (*GetUsageFeeResp, error)
func (Client) GetUserGroup ¶
func (o Client) GetUserGroup() (*UserGroupResp, error)
func (Client) GetUserStatus ¶
func (o Client) GetUserStatus() (*UserInfoResp, error)
func (Client) ListDashboards ¶
func (o Client) ListDashboards(req *ListDashboardsReq) (*ListDashboardResp, error)
func (Client) ListDownloadTasks ¶
func (o Client) ListDownloadTasks(req *ListDownloadTaskReq) (*ListDownloadTaskResp, error)
func (Client) ListIamProjects ¶
func (o Client) ListIamProjects() (*ListIamProjectsResp, error)
func (Client) ListLogPools ¶
func (o Client) ListLogPools(req *ListLogPoolReq) (*ListLogPoolResp, error)
func (Client) ListProjects ¶
func (o Client) ListProjects(req *ListProjectReq) (*ListProjectResp, error)
func (Client) ListTagKeys ¶
func (o Client) ListTagKeys() (*ListTagKeyResp, error)
func (Client) ListTagValues ¶
func (o Client) ListTagValues(req *TagInfo) (*ListTagValuesResp, error)
func (Client) ModifyLogPolicy ¶
func (o Client) ModifyLogPolicy(req *LogPolicyInfo) (*LogPolicyResp, error)
func (*Client) Push ¶
Push 异步发送一条log 如果返回error,表示日志大小、编码等不符合要求 source: 日志来源,如主机名、ip等,用于进行日志上下文查询 filename: 日志文件路径,用于进行日志上下文查询
func (*Client) PushString ¶
func (o *Client) PushString(projectName, logPoolName, message, source, filename string, timestamp int64) error
PushString 是 Push 的一个便利用法。
func (Client) RemoveLogPolicy ¶
func (o Client) RemoveLogPolicy(req *RemoveLogPolicyReq) (*LogPolicyResp, error)
func (Client) SetIndexTemplate ¶
func (o Client) SetIndexTemplate(req *IndexTemplateReq) (*ErrorResp, error)
func (Client) UpdateChart ¶
func (Client) UpdateDashboard ¶
func (o Client) UpdateDashboard(req *UpdateDashboardReq) (*ErrorResp, error)
func (Client) UpdateDashboardName ¶
func (o Client) UpdateDashboardName(req *UpdateDashboardReq) (*ErrorResp, error)
func (Client) UpdateLogPool ¶
func (o Client) UpdateLogPool(req *LogPoolInfo) (*ErrorResp, error)
func (Client) UpdateProject ¶
func (o Client) UpdateProject(req *ProjectInfo) (*ErrorResp, error)
type ClientOptions ¶
type ClientOptions struct {
AccessKey string
SecretKey string
Credentials *credentials.Credentials
Endpoint string
HTTPClient *http.Client
Logger Logger
LogLevel int
// 发送日志的协程数
WorkerNum int
CompressMethod string
DropIfPoolNotExists bool
RateLimit int
DownSampleRate float64
MaxRetries int
// 标识上报的app名字,非必填
AppName string
// 机器ID,取值范围[1, 1023],用于生成日志ID。如果缺省,会随机生成一个机器ID。
MachineId int
}
type DashboardIdResp ¶
type DashboardInfo ¶
type DataHeatItemMetric ¶
type DataHeatMetricInfo ¶
type DataHeatMetricInfo struct {
MetricName string
ItemType string
Metrics []*DataHeatItemMetric
}
type DataHeatReq ¶
type DataHeatResp ¶
type DataHeatResp struct {
ErrorResp
ProjectNames []string
LogPoolNames []string
HeatMetrics []*DataHeatMetricInfo
}
type DeleteDashboardReq ¶
type DeleteDashboardReq struct {
DashboardId *int64
}
type DescribeDashboardReq ¶
type DescribeDashboardReq struct {
DashboardId *int64
}
type DescribeDashboardResp ¶
type DescribeDashboardResp struct {
ErrorResp
DashboardInfo
}
type DescribeLogHistoryReq ¶
type DescribeLogHistoryReq struct {
LogPolicyPageInfo
Idc string `json:"idc"`
PolicyId int64 `json:"policyId"`
Start int64 `json:"start"`
End int64 `json:"end"`
Query string `json:"query"`
ProjectName string `json:"projectName"`
}
func (*DescribeLogHistoryReq) ConvertToMap ¶
func (o *DescribeLogHistoryReq) ConvertToMap() map[string]interface{}
type DescribeLogPolicyReq ¶
type DescribeLogPolicyReq struct {
LogPolicyPageInfo
Query string `json:"query"`
Enabled int `json:"enabled"`
ProjectName string `json:"projectName"`
DashboardId int64 `json:"dashboardId"`
}
func (*DescribeLogPolicyReq) ConvertToMap ¶
func (o *DescribeLogPolicyReq) ConvertToMap() map[string]interface{}
func (*DescribeLogPolicyReq) ValidateReq ¶
func (o *DescribeLogPolicyReq) ValidateReq() error
type DescribeLogPoolReq ¶
type DescribeLogPoolReq struct {
NameInfo
}
func (*DescribeLogPoolReq) ValidateReq ¶
func (o *DescribeLogPoolReq) ValidateReq() error
type DescribeLogPoolResp ¶
type DescribeLogPoolResp struct {
ErrorResp
LogPoolInfo
}
type DescribeProjectReq ¶
type DescribeProjectReq struct {
ProjectName string
}
func (*DescribeProjectReq) ValidateReq ¶
func (o *DescribeProjectReq) ValidateReq() error
type DescribeProjectResp ¶
type DescribeProjectResp struct {
ErrorResp
ProjectInfo
}
type DownSampler ¶
type DownSampler struct {
// contains filtered or unexported fields
}
func NewDownSampler ¶
func NewDownSampler(rate float64) *DownSampler
func (*DownSampler) Ok ¶
func (o *DownSampler) Ok() bool
type DownloadTask ¶
type DownloadTask struct {
NameInfo
TimeRangeInfo
DownloadID string
StartTime int64
EndTime int64
}
type DownloadTaskReq ¶
type DownloadTaskReq struct {
NameInfo
TimeRangeInfo
}
func (*DownloadTaskReq) ValidateReq ¶
func (o *DownloadTaskReq) ValidateReq() error
type DownloadUrlInfo ¶
type DownloadUrlReq ¶
type DownloadUrlReq struct {
DownloadTask
}
type DownloadUrlsResp ¶
type DownloadUrlsResp struct {
ErrorResp
Urls []*DownloadUrlInfo
}
type ErrorResp ¶
type ErrorResp struct {
ErrorCode string `json:"ErrorCode,omitempty"`
ErrorMessage string `json:"ErrorMessage,omitempty"`
// contains filtered or unexported fields
}
func (*ErrorResp) GetErrorResp ¶
func (ErrorResp) GetRequestId ¶
func (ErrorResp) GetStatusCode ¶
func (*ErrorResp) SetErrorResp ¶
func (*ErrorResp) SetRequestId ¶
func (*ErrorResp) SetStatusCode ¶
type FullTextIndex ¶
type GetTokenResp ¶
type GetUsageFeeReq ¶
type GetUsageFeeReq struct {
From string `json:"From,omitempty"`
To string `json:"To,omitempty"`
Targets []*NameInfo `json:"Targets,omitempty"`
Metrics []string `json:"Metrics,omitempty"`
}
func (*GetUsageFeeReq) ValidateReq ¶
func (o *GetUsageFeeReq) ValidateReq() error
type GetUsageFeeResp ¶
type GetUsageFeeResp struct {
ErrorResp
SumPrice float64
Data []*UsageMetricInfo
}
type GetUsageReq ¶
type GetUsageReq struct {
Projects []string
TimeSeries []int64
Data []*UsageMetricInfo
}
type GetUsageResp ¶
type GetUsageResp struct {
ErrorResp
Projects []string
TimeSeries []int64
Data []*UsageMetricInfo
}
type IKLogError ¶
type IamProjectInfo ¶
type IndexField ¶
type IndexField struct {
FullTextIndex
FieldName string
FieldType string
FieldAlias string
SubFields []*IndexField
}
type IndexTemplateReq ¶
type IndexTemplateReq struct {
NameInfo
FullTextIndex *FullTextIndex
IndexFields []*IndexField
IndexStatus bool
}
func NewIndexTemplateReq ¶
func NewIndexTemplateReq(projectName, logPoolName string, fullTextIndex *FullTextIndex, indexStatus bool) *IndexTemplateReq
func (*IndexTemplateReq) ValidateReq ¶
func (o *IndexTemplateReq) ValidateReq() error
type IndexTemplateResp ¶
type IndexTemplateResp struct {
ErrorResp
NameInfo
FullTextIndex *FullTextIndex
IndexFields []*IndexField
IndexStatus bool
}
type ListDashboardResp ¶
type ListDashboardResp struct {
ErrorResp
ListRespInfo
Dashboards []*DashboardInfo
}
type ListDashboardsReq ¶
type ListDashboardsReq struct {
PageInfo
DashboardInfo
}
func (*ListDashboardsReq) ValidateReq ¶
func (o *ListDashboardsReq) ValidateReq() error
type ListDownloadTaskReq ¶
func (*ListDownloadTaskReq) ValidateReq ¶
func (o *ListDownloadTaskReq) ValidateReq() error
type ListDownloadTaskResp ¶
type ListDownloadTaskResp struct {
ErrorResp
ListRespInfo
Downloads []*DownloadTask
}
type ListIamProjectsResp ¶
type ListIamProjectsResp struct {
ErrorResp
Total int64
ProjectList []*IamProjectInfo
}
type ListLogPoolReq ¶
func (*ListLogPoolReq) ValidateReq ¶
func (o *ListLogPoolReq) ValidateReq() error
type ListLogPoolResp ¶
type ListLogPoolResp struct {
ErrorResp
NameInfo
ListRespInfo
LogPools []*LogPoolInfo
}
type ListProjectReq ¶
func NewListProjectReq ¶
func NewListProjectReq(page, size int) *ListProjectReq
func (*ListProjectReq) ValidateReq ¶
func (o *ListProjectReq) ValidateReq() error
type ListProjectResp ¶
type ListProjectResp struct {
ErrorResp
ListRespInfo
Projects []*ProjectInfo
}
type ListRespInfo ¶
type ListTagKeyResp ¶
type ListTagKeyResp struct {
ErrorResp
ListRespInfo
Keys []string
}
type ListTagValuesResp ¶
type ListTagValuesResp struct {
ErrorResp
ListRespInfo
Tags []*TagInfo
}
type Log ¶
type Log struct {
Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"`
Contents []*Log_Content `protobuf:"bytes,2,rep,name=contents,proto3" json:"contents,omitempty"`
// contains filtered or unexported fields
}
func (*Log) Descriptor
deprecated
func (*Log) GetContents ¶
func (x *Log) GetContents() []*Log_Content
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
func (*Log) ProtoReflect ¶
func (x *Log) ProtoReflect() protoreflect.Message
type LogGroup ¶
type LogGroup struct {
Logs []*Log `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"`
Reserved *string `protobuf:"bytes,2,opt,name=reserved,proto3,oneof" json:"reserved,omitempty"`
Filename *string `protobuf:"bytes,3,opt,name=filename,proto3,oneof" json:"filename,omitempty"`
Source *string `protobuf:"bytes,4,opt,name=source,proto3,oneof" json:"source,omitempty"`
Project *string `protobuf:"bytes,5,opt,name=project,proto3,oneof" json:"project,omitempty"`
Pool *string `protobuf:"bytes,6,opt,name=pool,proto3,oneof" json:"pool,omitempty"`
// contains filtered or unexported fields
}
func (*LogGroup) Descriptor
deprecated
func (*LogGroup) GetFilename ¶
func (*LogGroup) GetProject ¶
func (*LogGroup) GetReserved ¶
func (*LogGroup) ProtoMessage ¶
func (*LogGroup) ProtoMessage()
func (*LogGroup) ProtoReflect ¶
func (x *LogGroup) ProtoReflect() protoreflect.Message
type LogGroupList ¶
type LogGroupList struct {
LogGroupList []*LogGroup `protobuf:"bytes,1,rep,name=logGroupList,proto3" json:"logGroupList,omitempty"`
// contains filtered or unexported fields
}
func (*LogGroupList) Descriptor
deprecated
func (*LogGroupList) Descriptor() ([]byte, []int)
Deprecated: Use LogGroupList.ProtoReflect.Descriptor instead.
func (*LogGroupList) GetLogGroupList ¶
func (x *LogGroupList) GetLogGroupList() []*LogGroup
func (*LogGroupList) ProtoMessage ¶
func (*LogGroupList) ProtoMessage()
func (*LogGroupList) ProtoReflect ¶
func (x *LogGroupList) ProtoReflect() protoreflect.Message
func (*LogGroupList) Reset ¶
func (x *LogGroupList) Reset()
func (*LogGroupList) String ¶
func (x *LogGroupList) String() string
type LogHistogram ¶
type LogHistory ¶
type LogHistory struct {
Id float64 `json:"id"`
PolicyId float64 `json:"policyId"`
ProjectName string `json:"projectName"`
LogPoolName string `json:"logPoolName"`
DashboardId string `json:"dashboardId" `
DashboardName string `json:"dashboardName"`
Name string `json:"alertName" `
ExecuteTime float64 `json:"executeTime" `
Condition string `json:"condition" `
NotifyStatus string `json:"notifyStatus"`
Status string `json:"status" `
IsTrigger bool `json:"isTrigger"`
Reason string `json:"reason"`
CreateTime float64 `json:"createtime"`
}
type LogInfoReq ¶
type LogInfoReq struct {
NameInfo
TimeRangeInfo
Query string
HitsOpen bool
Interval int64
Offset int
Size int
SortBy []map[string]bool
Aggregations interface{}
}
func NewLogInfoReq ¶
func (*LogInfoReq) ValidateReq ¶
func (o *LogInfoReq) ValidateReq() error
type LogInfoResp ¶
type LogPolicyChannelParam ¶
type LogPolicyInfo ¶
type LogPolicyInfo struct {
Id int64 `json:"id"`
Name string `json:"name"`
ProjectName string `json:"projectName"`
DashboardId string `json:"dashboardId"`
DashBoardName string `json:"dashBoardName"`
Queries []*LogQuery `json:"queries"`
ChannelParam *LogPolicyChannelParam `json:"channelParam"`
ChannelParams string `json:"channelParams"`
Condition string `json:"condition"`
ScheduleType int64 `json:"scheduleType"`
FixInterval string `json:"fixInterval"`
DayOfWeek int `json:"dayOfWeek"`
Hour int `json:"hour"`
CronExpr string `json:"cronExpr"`
NotifyThreshold int64 `json:"notifyThreshold"`
NotifyInterval int64 `json:"notifyInterval"`
Remarks string `json:"remarks"`
Status *bool `json:"-"`
Enabled int `json:"enabled"`
Idc string `json:"idc"`
}
func (*LogPolicyInfo) ValidateReq ¶
func (o *LogPolicyInfo) ValidateReq() error
type LogPolicyPageInfo ¶
type LogPolicyResp ¶
type LogPoolInfo ¶
type LogPoolInfo struct {
NameInfo
Tags []*TagInfo
Partitions int
RetentionDays int
LogPoolId string
Description string
CreateTime string
UpdateTime string
}
func NewLogPoolInfo ¶
func NewLogPoolInfo(projectName, logPoolName string, partitions, retentionDays int) *LogPoolInfo
type LogQuery ¶
type LogQuery struct {
Id float64 `json:"id"`
PolicyId float64 `json:"policyId" `
GraphId float64 `json:"graphId" `
GraphName string `json:"graphName" `
Query string `json:"query" `
Start string `json:"start"`
End string `json:"end"`
LogPoolName string `json:"logPoolName"`
TimeSpanType string `json:"timeSpanType"`
}
type LogStatistics ¶
type Log_Content ¶
type Log_Content struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*Log_Content) Descriptor
deprecated
func (*Log_Content) Descriptor() ([]byte, []int)
Deprecated: Use Log_Content.ProtoReflect.Descriptor instead.
func (*Log_Content) GetKey ¶
func (x *Log_Content) GetKey() string
func (*Log_Content) GetValue ¶
func (x *Log_Content) GetValue() string
func (*Log_Content) ProtoMessage ¶
func (*Log_Content) ProtoMessage()
func (*Log_Content) ProtoReflect ¶
func (x *Log_Content) ProtoReflect() protoreflect.Message
func (*Log_Content) Reset ¶
func (x *Log_Content) Reset()
func (*Log_Content) String ¶
func (x *Log_Content) String() string
type Logger ¶
type MonitorDataKeyValue ¶
type MonitorDataPoint ¶
type MonitorDataPoint struct {
Keys *MonitorDataKeyValue
Values [][]int
}
type MonitorDataPoints ¶
type MonitorDataPoints struct {
MetricName string
Points []*MonitorDataPoint
}
type MonitorDataReq ¶
type MonitorDataResp ¶
type MonitorDataResp struct {
ErrorResp
TotalCount int
PageSize int
PageNumber int
DataPoints []*MonitorDataPoints
}
type ProjectInfo ¶
type RateLimit ¶
type RateLimit struct {
// contains filtered or unexported fields
}
func NewRateLimit ¶
type RemoveLogPolicyReq ¶
type RemoveLogPolicyReq struct {
PolicyIdList []int64 `json:"policyIdList"`
}
type SpecialMetricInfo ¶
type Stat ¶
type Stat struct {
CurRetried int64
DownSampledLogs int64 // 被降采样丢弃的日志数
DroppedLogs int64 // 因日志池不存在,被丢弃的日志数
ErroredLogs int64 // 单条超限或编码错误,被丢弃的日志数
FailedBatches int64
FailedLogs int64 // 达到最大重试次数之后,被丢弃的日志数
LastError string
LastLogs int64
LastRetried int64
LastRetriedAt string
LastSucceededAt string
Retried int64
SentBatches int64
SentLogs int64 // 发送成功的日志数
StartedAt string
// contains filtered or unexported fields
}
type TimeRangeInfo ¶
type UpdateDashboardReq ¶
type UpdateDashboardReq struct {
DashboardId *int64
DashboardName string
ProjectName string
Charts []*ChartInfo
}
func (*UpdateDashboardReq) ValidateReq ¶
func (o *UpdateDashboardReq) ValidateReq() error
type UsageMetricInfo ¶
type UserGroupResp ¶
type UserGroupResp struct {
ErrorResp
UserGrpList []*UserGrpList `json:"userGrpList"`
TotalCount int `json:"totalCount"`
}
type UserGrpList ¶
type UserInfoResp ¶
Click to show internal directories.
Click to hide internal directories.