Versions in this module Expand all Collapse all v0 v0.5.1 Sep 6, 2023 Changes in this version + const CompressLz4Error + const CompressMethodLz4 + const CompressMethodNone + const HeaderRequestId + const HttpError + const InternalServerError + const InvalidRequest + const InvalidUtf8InKey + const InvalidUtf8InValue + const JsonMarshalError + const JsonUnMarshalError + const LevelDebug + const LevelError + const LevelInfo + const LevelWarn + const MAX_COUNT + const MINIMAL_RATE + const MaxBulkSize + const MaxBulkSizeExceeded + const MaxKeyCount + const MaxKeyCountExceeded + const MaxKeySize + const MaxKeySizeExceeded + const MaxLogGroupSize + const MaxLogSize + const MaxLogSizeExceeded + const MaxValueSize + const MaxValueSizeExceeded + const OpenAPIVersion + const PostBodyInvalid + const PostBodyTooLarge + const ProjectOrLogPoolNotExist + const RequestOpenAPIBodyOrParamInvalid + const SDKInternalErrorStatusCode + const SDKVersion + const SignatureError + const SignatureNotMatch + const UnknownError + const UserNotExist + var BeijingZone = time.FixedZone("beijing", 3600 * 8) + var DefaultChainCredentials = credentials.NewChainCredentials([]credentials.Provider{ ... }) + var File_klog_proto protoreflect.FileDescriptor + func IsError(err error, code string) bool + type AlarmLogPolicyStatusReq struct + Enabled int + PolicyId int64 + func NewAlarmLogPolicyStatusReq(enabled bool, policyId int64) *AlarmLogPolicyStatusReq + type AlarmStatisticReq struct + End int64 + PolicyId int64 + Start int64 + func (o *AlarmStatisticReq) ConvertToMap() map[string]interface{} + type ChartIdInfo struct + ChartId *int64 + type ChartIdResp struct + type ChartInfo struct + ChartName string + ChartType string + CreateTime string + DashboardId *int64 + Display string + Search *ChartSearchInfo + UpdateTime string + type ChartSearchInfo struct + LogPoolName string + Query string + TimeRange string + type Client struct + func NewClient(options *ClientOptions) *Client + func (o *Client) Flush(wait bool) + func (o *Client) GetStat() *Stat + func (o *Client) GetStatDelta() *Stat + 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) Stop() + 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) 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) 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) RemoveLogPolicy(req *RemoveLogPolicyReq) (*LogPolicyResp, error) + func (o Client) SetIndexTemplate(req *IndexTemplateReq) (*ErrorResp, error) + 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 struct + AccessKey string + AppName string + CompressMethod string + Credentials *credentials.Credentials + DownSampleRate float64 + DropIfPoolNotExists bool + Endpoint string + HTTPClient *http.Client + LogLevel int + Logger Logger + MachineId int + MaxRetries int + RateLimit int + SecretKey string + WorkerNum int + type DashboardIdResp struct + DashboardId *int64 + type DashboardInfo struct + Charts []*ChartInfo + CreateTime string + DashboardId int64 + DashboardName string + ProjectName string + UpdateTime string + type DataHeatItemMetric struct + Name string + Percent string + Value string + type DataHeatMetricInfo struct + ItemType string + MetricName string + Metrics []*DataHeatItemMetric + type DataHeatReq struct + LogPoolNames []string + ProjectNames []string + type DataHeatResp struct + HeatMetrics []*DataHeatMetricInfo + LogPoolNames []string + ProjectNames []string + type DeleteDashboardReq struct + DashboardId *int64 + type DescribeDashboardReq struct + DashboardId *int64 + type DescribeDashboardResp struct + type DescribeLogHistoryReq struct + End int64 + Idc string + PolicyId int64 + ProjectName string + Query string + Start int64 + func (o *DescribeLogHistoryReq) ConvertToMap() map[string]interface{} + type DescribeLogPolicyReq struct + DashboardId int64 + Enabled int + ProjectName string + Query string + func (o *DescribeLogPolicyReq) ConvertToMap() map[string]interface{} + func (o *DescribeLogPolicyReq) ValidateReq() error + type DescribeLogPoolReq struct + func (o *DescribeLogPoolReq) ValidateReq() error + type DescribeLogPoolResp struct + type DescribeProjectReq struct + ProjectName string + func (o *DescribeProjectReq) ValidateReq() error + type DescribeProjectResp struct + type DownSampler struct + func NewDownSampler(rate float64) *DownSampler + func (o *DownSampler) Ok() bool + type DownloadTask struct + DownloadID string + EndTime int64 + StartTime int64 + type DownloadTaskReq struct + func (o *DownloadTaskReq) ValidateReq() error + type DownloadUrlInfo struct + FileName string + Size float64 + SizeUnit string + Status string + Url string + type DownloadUrlReq struct + type DownloadUrlsResp struct + Urls []*DownloadUrlInfo + type ErrorResp struct + ErrorCode string + ErrorMessage string + func (o *ErrorResp) GetErrorResp() ErrorResp + func (o *ErrorResp) HasError() bool + func (o *ErrorResp) SetErrorResp(resp ErrorResp) + func (o *ErrorResp) SetRequestId(requestId string) + func (o *ErrorResp) SetStatusCode(statusCode int) + func (o ErrorResp) GetRequestId() string + func (o ErrorResp) GetStatusCode() int + type FullTextIndex struct + Chinese bool + Lowercase bool + Separator string + type GetTokenResp struct + ExpireAt int64 + Token string + type GetUsageFeeReq struct + From string + Metrics []string + Targets []*NameInfo + To string + func (o *GetUsageFeeReq) ValidateReq() error + type GetUsageFeeResp struct + Data []*UsageMetricInfo + SumPrice float64 + type GetUsageReq struct + Data []*UsageMetricInfo + Projects []string + TimeSeries []int64 + type GetUsageResp struct + Data []*UsageMetricInfo + Projects []string + TimeSeries []int64 + type IKLogError interface + GetErrorResp func() ErrorResp + SetErrorResp func(ErrorResp) + type IamProjectInfo struct + CreateTime string + Krn string + ProjectDesc string + ProjectId int64 + ProjectName string + Status int + type IndexField struct + FieldAlias string + FieldName string + FieldType string + SubFields []*IndexField + type IndexTemplateReq struct + FullTextIndex *FullTextIndex + IndexFields []*IndexField + IndexStatus bool + func NewIndexTemplateReq(projectName, logPoolName string, fullTextIndex *FullTextIndex, ...) *IndexTemplateReq + func (o *IndexTemplateReq) ValidateReq() error + type IndexTemplateResp struct + FullTextIndex *FullTextIndex + IndexFields []*IndexField + IndexStatus bool + type ListDashboardResp struct + Dashboards []*DashboardInfo + type ListDashboardsReq struct + func (o *ListDashboardsReq) ValidateReq() error + type ListDownloadTaskReq struct + func (o *ListDownloadTaskReq) ValidateReq() error + type ListDownloadTaskResp struct + Downloads []*DownloadTask + type ListIamProjectsResp struct + ProjectList []*IamProjectInfo + Total int64 + type ListLogPoolReq struct + Tags []*TagInfo + func (o *ListLogPoolReq) ValidateReq() error + type ListLogPoolResp struct + LogPools []*LogPoolInfo + type ListProjectReq struct + ProjectName string + Region string + Tags []*TagInfo + func NewListProjectReq(page, size int) *ListProjectReq + func (o *ListProjectReq) ValidateReq() error + type ListProjectResp struct + Projects []*ProjectInfo + type ListRespInfo struct + Count int64 + Total int64 + type ListTagKeyResp struct + Keys []string + type ListTagValuesResp struct + Tags []*TagInfo + type Log struct + Contents []*Log_Content + Time int64 + func (*Log) Descriptor() ([]byte, []int) + func (*Log) ProtoMessage() + func (x *Log) GetContents() []*Log_Content + func (x *Log) GetTime() int64 + func (x *Log) ProtoReflect() protoreflect.Message + func (x *Log) Reset() + func (x *Log) String() string + type LogGroup struct + Filename *string + Logs []*Log + Pool *string + Project *string + Reserved *string + Source *string + func (*LogGroup) Descriptor() ([]byte, []int) + func (*LogGroup) ProtoMessage() + 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 (x *LogGroup) ProtoReflect() protoreflect.Message + func (x *LogGroup) Reset() + func (x *LogGroup) String() string + type LogGroupList struct + LogGroupList []*LogGroup + func (*LogGroupList) Descriptor() ([]byte, []int) + func (*LogGroupList) ProtoMessage() + func (x *LogGroupList) GetLogGroupList() []*LogGroup + func (x *LogGroupList) ProtoReflect() protoreflect.Message + func (x *LogGroupList) Reset() + func (x *LogGroupList) String() string + type LogHistogram struct + Key string + LogCount int64 + type LogHistory struct + Condition string + CreateTime float64 + DashboardId string + DashboardName string + ExecuteTime float64 + Id float64 + IsTrigger bool + LogPoolName string + Name string + NotifyStatus string + PolicyId float64 + ProjectName string + Reason string + Status string + type LogInfoReq struct + Aggregations interface{} + HitsOpen bool + Interval int64 + Offset int + Query string + Size int + SortBy []map[string]bool + func NewLogInfoReq(projectName string, logPoolName string, from int64, to int64, query string) *LogInfoReq + func (o *LogInfoReq) ValidateReq() error + type LogInfoResp struct + Aggregations map[string]interface{} + Count int64 + HasSql bool + Histogram []*LogHistogram + KeyValues map[string][]interface{} + Keys []string + Logs []map[string]interface{} + Total int64 + type LogPolicyChannelParam struct + CallBackUrl string + ChannelType float64 + EmailContent string + SmsContent string + UsrgrpId float64 + UsrgrpName string + type LogPolicyInfo struct + ChannelParam *LogPolicyChannelParam + ChannelParams string + Condition string + CronExpr string + DashBoardName string + DashboardId string + DayOfWeek int + Enabled int + FixInterval string + Hour int + Id int64 + Idc string + Name string + NotifyInterval int64 + NotifyThreshold int64 + ProjectName string + Queries []*LogQuery + Remarks string + ScheduleType int64 + Status *bool + func (o *LogPolicyInfo) ValidateReq() error + type LogPolicyPageInfo struct + PageIndex int64 + PageSize int64 + type LogPolicyResp struct + Data interface{} + Message string + Status int + TotalCount int + type LogPoolInfo struct + CreateTime string + Description string + LogPoolId string + Partitions int + RetentionDays int + Tags []*TagInfo + UpdateTime string + func NewLogPoolInfo(projectName, logPoolName string, partitions, retentionDays int) *LogPoolInfo + type LogQuery struct + End string + GraphId float64 + GraphName string + Id float64 + LogPoolName string + PolicyId float64 + Query string + Start string + TimeSpanType string + type LogStatistics struct + AlarmCount int64 + AlarmDod string + NofityDod string + NotifyCount int64 + type Log_Content struct + Key string + Value string + func (*Log_Content) Descriptor() ([]byte, []int) + func (*Log_Content) ProtoMessage() + func (x *Log_Content) GetKey() string + func (x *Log_Content) GetValue() string + func (x *Log_Content) ProtoReflect() protoreflect.Message + func (x *Log_Content) Reset() + func (x *Log_Content) String() string + type Logger interface + Debugf func(format string, a ...interface{}) + Errorf func(format string, a ...interface{}) + Infof func(format string, a ...interface{}) + Warnf func(format string, a ...interface{}) + func GetStdLogger(level int) Logger + type MonitorDataKeyValue struct + LogPool string + Project string + type MonitorDataPoint struct + Keys *MonitorDataKeyValue + Values [][]int + type MonitorDataPoints struct + MetricName string + Points []*MonitorDataPoint + type MonitorDataReq struct + EndTime string + LogPools []string + MetricNames []string + PageNumber int + PageSize int + Period int + ProjectName string + Service string + StartTime string + type MonitorDataResp struct + DataPoints []*MonitorDataPoints + PageNumber int + PageSize int + TotalCount int + type NameInfo struct + LogPoolName string + ProjectName string + type PageInfo struct + Page int + Size int + type ProjectInfo struct + CreateTime string + Description string + IamProjectId int64 + IamProjectName string + LogPoolNum int + ProjectName string + Region string + Status string + Tags []*TagInfo + UpdateTime string + type RateLimit struct + func NewRateLimit(limitPerSec, slotsPerSec int) *RateLimit + func (o *RateLimit) Wait() + type RemoveLogPolicyReq struct + PolicyIdList []int64 + type SpecialMetricInfo struct + Code string + Value int64 + 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 + type TagInfo struct + Id int64 + Key string + Value string + type TimeRangeInfo struct + From int64 + To int64 + type UpdateDashboardReq struct + Charts []*ChartInfo + DashboardId *int64 + DashboardName string + ProjectName string + func (o *UpdateDashboardReq) ValidateReq() error + type UsageMetricInfo struct + DayToDayRatio string + MetricName string + Output []int64 + Price float64 + SpecialMetric []*SpecialMetricInfo + Unit string + YesterdayUsage int64 + type UserGroupResp struct + TotalCount int + UserGrpList []*UserGrpList + type UserGrpList struct + Name string + UserCount int + UsrGrpID int + type UserInfoResp struct + UserId string + UserStatus int