Documentation ¶
Overview ¶
Package sls is a generated protocol buffer package.
It is generated from these files:
log.proto
It has these top-level messages:
LogContent Log LogTag LogGroup SlsLogPackage SlsLogPackageList LogGroupList
Index ¶
- Constants
- Variables
- func AddNecessaryApsaraLogInputConfigField(inputConfigDetail map[string]interface{})
- func AddNecessaryDelimiterLogInputConfigField(inputConfigDetail map[string]interface{})
- func AddNecessaryInputConfigField(inputConfigDetail map[string]interface{})
- func AddNecessaryJSONLogInputConfigField(inputConfigDetail map[string]interface{})
- func AddNecessaryLocalFileInputConfigField(inputConfigDetail map[string]interface{})
- func AddNecessaryRegexLogInputConfigField(inputConfigDetail map[string]interface{})
- func GenerateInnerLogger(logFileName, isJsonType, logMaxSize, logFileBackupCount, allowLogLevel string) log.Logger
- func GetFileConfigInputDetailType(detail InputDetailInterface) (string, bool)
- func InitApsaraLogConfigInputDetail(detail *ApsaraLogConfigInputDetail)
- func InitCommonConfigInputDetail(detail *CommonConfigInputDetail)
- func InitDelimiterConfigInputDetail(detail *DelimiterConfigInputDetail)
- func InitJSONConfigInputDetail(detail *JSONConfigInputDetail)
- func InitLocalFileConfigInputDetail(detail *LocalFileConfigInputDetail)
- func InitPluginLogConfigInputDetail(detail *PluginLogConfigInputDetail)
- func InitRegexConfigInputDetail(detail *RegexConfigInputDetail)
- func InitStreamLogConfigInputDetail(detail *StreamLogConfigInputDetail)
- func IsDebugLevelMatched(level int) bool
- func IsTokenError(err error) bool
- func IsValidInputType(inputType string) bool
- func Retry(ctx context.Context, o backoff.Operation) error
- func RetryWithAttempt(ctx context.Context, maxAttempt int, o ConditionOperation) error
- func RetryWithBackOff(ctx context.Context, b backoff.BackOff, o backoff.Operation) error
- func RetryWithCondition(ctx context.Context, b backoff.BackOff, o ConditionOperation) error
- func UpdateInputConfigField(detail InputDetailInterface, key string, val interface{}) error
- type Alert
- type AlertConfiguration
- type AlertQuery
- type ApsaraLogConfigInputDetail
- type BadResponseError
- type Chart
- type ChartDisplay
- type ChartSearch
- type Client
- func (c *Client) ApplyConfigToMachineGroup(project string, confName, groupName string) (err error)
- func (c *Client) CheckConfigExist(project string, config string) (ok bool, err error)
- func (c *Client) CheckLogstoreExist(project string, logstore string) (bool, error)
- func (c *Client) CheckMachineGroupExist(project string, machineGroup string) (bool, error)
- func (c *Client) CheckProjectExist(name string) (bool, error)
- func (c *Client) Close() error
- func (c *Client) CreateAlert(project string, alert *Alert) error
- func (c *Client) CreateChart(project, dashboardName string, chart Chart) error
- func (c *Client) CreateConfig(project string, config *LogConfig) (err error)
- func (c *Client) CreateConfigString(project string, config string) (err error)
- func (c *Client) CreateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
- func (c *Client) CreateDashboard(project string, dashboard Dashboard) error
- func (c *Client) CreateDashboardString(project string, dashboardStr string) error
- func (c *Client) CreateEtlMeta(project string, etlMeta *EtlMeta) (err error)
- func (c *Client) CreateIndex(project, logstore string, index Index) error
- func (c *Client) CreateIndexString(project, logstore string, index string) error
- func (c *Client) CreateLogStore(project string, logstore string, ttl, shardCnt int, autoSplit bool, ...) error
- func (c *Client) CreateLogStoreV2(project string, logstore *LogStore) error
- func (c *Client) CreateMachineGroup(project string, m *MachineGroup) error
- func (c *Client) CreateProject(name, description string) (*LogProject, error)
- func (c *Client) CreateSavedSearch(project string, savedSearch *SavedSearch) error
- func (c *Client) DeleteAlert(project string, alertName string) error
- func (c *Client) DeleteChart(project, dashboardName, chartName string) error
- func (c *Client) DeleteConfig(project string, config string) (err error)
- func (c *Client) DeleteConsumerGroup(project, logstore string, cgName string) (err error)
- func (c *Client) DeleteDashboard(project, name string) error
- func (c *Client) DeleteEtlMeta(project string, etlMetaName, etlMetaKey string) (err error)
- func (c *Client) DeleteIndex(project, logstore string) error
- func (c *Client) DeleteLogStore(project string, logstore string) (err error)
- func (c *Client) DeleteMachineGroup(project string, machineGroup string) (err error)
- func (c *Client) DeleteProject(name string) error
- func (c *Client) DeleteSavedSearch(project string, savedSearchName string) error
- func (c *Client) DisableAlert(project string, alertName string) error
- func (c *Client) EnableAlert(project string, alertName string) error
- func (c *Client) GetAlert(project string, alertName string) (*Alert, error)
- func (c *Client) GetAppliedConfigs(project string, groupName string) (confNames []string, err error)
- func (c *Client) GetAppliedMachineGroups(project string, confName string) (groupNames []string, err error)
- func (c *Client) GetChart(project, dashboardName, chartName string) (chart *Chart, err error)
- func (c *Client) GetCheckpoint(project, logstore string, cgName string) (checkPointList []*ConsumerGroupCheckPoint, err error)
- func (c *Client) GetConfig(project string, config string) (logConfig *LogConfig, err error)
- func (c *Client) GetConfigString(project string, config string) (logConfig string, err error)
- func (c *Client) GetCursor(project, logstore string, shardID int, from string) (cursor string, err error)
- func (c *Client) GetCursorTime(project, logstore string, shardID int, cursor string) (cursorTime time.Time, err error)
- func (c *Client) GetDashboard(project, name string) (dashboard *Dashboard, err error)
- func (c *Client) GetDashboardString(project, name string) (dashboard string, err error)
- func (c *Client) GetEtlMeta(project string, etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error)
- func (c *Client) GetHistograms(project, logstore string, topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
- func (c *Client) GetIndex(project, logstore string) (*Index, error)
- func (c *Client) GetIndexString(project, logstore string) (string, error)
- func (c *Client) GetLogStore(project string, logstore string) (*LogStore, error)
- func (c *Client) GetLogs(project, logstore string, topic string, from int64, to int64, queryExp string, ...) (*GetLogsResponse, error)
- func (c *Client) GetLogsBytes(project, logstore string, shardID int, cursor, endCursor string, ...) (out []byte, nextCursor string, err error)
- func (c *Client) GetMachineGroup(project string, machineGroup string) (m *MachineGroup, err error)
- func (c *Client) GetPrevCursorTime(project, logstore string, shardID int, cursor string) (cursorTime time.Time, err error)
- func (c *Client) GetProject(name string) (*LogProject, error)
- func (c *Client) GetSavedSearch(project string, savedSearchName string) (*SavedSearch, error)
- func (c *Client) HeartBeat(project, logstore string, cgName, consumer string, heartBeatShardIDs []int) (shardIDs []int, err error)
- func (c *Client) ListAlert(project, alertName, dashboard string, offset, size int) (alerts []*Alert, total int, count int, err error)
- func (c *Client) ListConfig(project string, offset, size int) (cfgNames []string, total int, err error)
- func (c *Client) ListConsumerGroup(project, logstore string) (cgList []*ConsumerGroup, err error)
- func (c *Client) ListDashboard(project string, dashboardName string, offset, size int) (dashboardList []string, count, total int, err error)
- func (c *Client) ListEtlMeta(project string, etlMetaName string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (c *Client) ListEtlMetaName(project string, offset, size int) (total int, count int, etlMetaNameList []string, err error)
- func (c *Client) ListEtlMetaWithTag(project string, etlMetaName, etlMetaTag string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (c *Client) ListLogStore(project string) ([]string, error)
- func (c *Client) ListMachineGroup(project string, offset, size int) (m []string, total int, err error)
- func (c *Client) ListMachines(project, machineGroupName string) (ms []*Machine, total int, err error)
- func (c *Client) ListProject() (projectNames []string, err error)
- func (c *Client) ListProjectV2(offset, size int) (projects []LogProject, count, total int, err error)
- func (c *Client) ListSavedSearch(project string, savedSearchName string, offset, size int) (savedSearches []string, total int, count int, err error)
- func (c *Client) ListShards(project, logstore string) (shardIDs []*Shard, err error)
- func (c *Client) MergeShards(project, logstore string, shardID int) (shards []*Shard, err error)
- func (c *Client) PostLogStoreLogs(project, logstore string, lg *LogGroup, hashKey *string) (err error)
- func (c *Client) PullLogs(project, logstore string, shardID int, cursor, endCursor string, ...) (gl *LogGroupList, nextCursor string, err error)
- func (c *Client) PutLogs(project, logstore string, lg *LogGroup) (err error)
- func (c *Client) PutLogsWithCompressType(project, logstore string, lg *LogGroup, compressType int) (err error)
- func (c *Client) PutRawLogWithCompressType(project, logstore string, rawLogData []byte, compressType int) (err error)
- func (c *Client) RemoveConfigFromMachineGroup(project string, confName, groupName string) (err error)
- func (c *Client) ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string)
- func (c *Client) SplitShard(project, logstore string, shardID int, splitKey string) (shards []*Shard, err error)
- func (c *Client) UpdateAlert(project string, alert *Alert) error
- func (c *Client) UpdateChart(project, dashboardName string, chart Chart) error
- func (c *Client) UpdateCheckpoint(project, logstore string, cgName string, consumer string, shardID int, ...) (err error)
- func (c *Client) UpdateConfig(project string, config *LogConfig) (err error)
- func (c *Client) UpdateConfigString(project string, configName, configDetail string) (err error)
- func (c *Client) UpdateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
- func (c *Client) UpdateDashboard(project string, dashboard Dashboard) error
- func (c *Client) UpdateDashboardString(project string, dashboardName, dashboardStr string) error
- func (c *Client) UpdateEtlMeta(project string, etlMeta *EtlMeta) (err error)
- func (c *Client) UpdateIndex(project, logstore string, index Index) error
- func (c *Client) UpdateIndexString(project, logstore string, index string) error
- func (c *Client) UpdateLogStore(project string, logstore string, ttl, shardCnt int) (err error)
- func (c *Client) UpdateLogStoreV2(project string, logstore *LogStore) (err error)
- func (c *Client) UpdateMachineGroup(project string, m *MachineGroup) (err error)
- func (c *Client) UpdateProject(name, description string) (*LogProject, error)
- func (c *Client) UpdateSavedSearch(project string, savedSearch *SavedSearch) error
- type ClientInterface
- type CommonConfigInputDetail
- type ConditionOperation
- type ConfigPluginCanal
- type ConfigPluginDockerStdout
- type ConsumerGroup
- type ConsumerGroupCheckPoint
- type Dashboard
- type DelimiterConfigInputDetail
- type ETLJob
- type Error
- type EtlMeta
- type FunctionConfig
- type GetContextLogsResponse
- type GetHistogramsResponse
- type GetLogsResponse
- type Index
- type IndexKey
- type IndexLine
- type InputDetail
- type InputDetailInterface
- type JSONConfigInputDetail
- type JobLogConfig
- type JsonKey
- type LocalFileConfigInputDetail
- type Log
- func (*Log) Descriptor() ([]byte, []int)
- func (m *Log) GetContents() []*LogContent
- func (m *Log) GetTime() uint32
- func (m *Log) Marshal() (dAtA []byte, err error)
- func (m *Log) MarshalTo(dAtA []byte) (int, error)
- func (*Log) ProtoMessage()
- func (m *Log) Reset()
- func (m *Log) Size() (n int)
- func (m *Log) String() string
- func (m *Log) Unmarshal(dAtA []byte) error
- type LogConfig
- type LogConfigPluginInput
- type LogContent
- func (*LogContent) Descriptor() ([]byte, []int)
- func (m *LogContent) GetKey() string
- func (m *LogContent) GetValue() string
- func (m *LogContent) Marshal() (dAtA []byte, err error)
- func (m *LogContent) MarshalTo(dAtA []byte) (int, error)
- func (*LogContent) ProtoMessage()
- func (m *LogContent) Reset()
- func (m *LogContent) Size() (n int)
- func (m *LogContent) String() string
- func (m *LogContent) Unmarshal(dAtA []byte) error
- type LogGroup
- func (*LogGroup) Descriptor() ([]byte, []int)
- func (m *LogGroup) GetCategory() string
- func (m *LogGroup) GetLogTags() []*LogTag
- func (m *LogGroup) GetLogs() []*Log
- func (m *LogGroup) GetMachineUUID() string
- func (m *LogGroup) GetSource() string
- func (m *LogGroup) GetTopic() string
- func (m *LogGroup) Marshal() (dAtA []byte, err error)
- func (m *LogGroup) MarshalTo(dAtA []byte) (int, error)
- func (*LogGroup) ProtoMessage()
- func (m *LogGroup) Reset()
- func (m *LogGroup) Size() (n int)
- func (m *LogGroup) String() string
- func (m *LogGroup) Unmarshal(dAtA []byte) error
- type LogGroupList
- func (*LogGroupList) Descriptor() ([]byte, []int)
- func (m *LogGroupList) GetLogGroups() []*LogGroup
- func (m *LogGroupList) Marshal() (dAtA []byte, err error)
- func (m *LogGroupList) MarshalTo(dAtA []byte) (int, error)
- func (*LogGroupList) ProtoMessage()
- func (m *LogGroupList) Reset()
- func (m *LogGroupList) Size() (n int)
- func (m *LogGroupList) String() string
- func (m *LogGroupList) Unmarshal(dAtA []byte) error
- type LogProject
- func (p *LogProject) ApplyConfigToMachineGroup(confName, groupName string) (err error)
- func (p *LogProject) CheckConfigExist(name string) (bool, error)
- func (p *LogProject) CheckLogstoreExist(name string) (bool, error)
- func (p *LogProject) CheckMachineGroupExist(name string) (bool, error)
- func (p *LogProject) CreateConfig(c *LogConfig) (err error)
- func (p *LogProject) CreateConfigString(c string) (err error)
- func (p *LogProject) CreateETLJob(j *ETLJob) error
- func (p *LogProject) CreateEtlMeta(etlMeta *EtlMeta) (err error)
- func (p *LogProject) CreateLogStore(name string, ttl, shardCnt int, autoSplit bool, maxSplitShard int) error
- func (p *LogProject) CreateLogStoreV2(logstore *LogStore) error
- func (p *LogProject) CreateMachineGroup(m *MachineGroup) error
- func (p *LogProject) DeleteConfig(name string) (err error)
- func (p *LogProject) DeleteETLJob(name string) error
- func (p *LogProject) DeleteEtlMeta(etlMetaName, etlMetaKey string) (err error)
- func (p *LogProject) DeleteLogStore(name string) (err error)
- func (p *LogProject) DeleteMachineGroup(name string) (err error)
- func (p *LogProject) GetAppliedConfigs(groupName string) (confNames []string, err error)
- func (p *LogProject) GetAppliedMachineGroups(confName string) (groupNames []string, err error)
- func (p *LogProject) GetConfig(name string) (c *LogConfig, err error)
- func (p *LogProject) GetConfigString(name string) (c string, err error)
- func (p *LogProject) GetETLJob(name string) (*ETLJob, error)
- func (p *LogProject) GetEtlMeta(etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error)
- func (p *LogProject) GetLogStore(name string) (*LogStore, error)
- func (p *LogProject) GetMachineGroup(name string) (m *MachineGroup, err error)
- func (p *LogProject) ListConfig(offset, size int) (cfgNames []string, total int, err error)
- func (p *LogProject) ListETLJobs() ([]string, error)
- func (p *LogProject) ListEtlMeta(etlMetaName string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (p *LogProject) ListEtlMetaName(offset, size int) (total int, count int, etlMetaNameList []string, err error)
- func (p *LogProject) ListEtlMetaWithTag(etlMetaName, etlMetaTag string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (p *LogProject) ListLogStore() ([]string, error)
- func (p *LogProject) ListMachineGroup(offset, size int) (m []string, total int, err error)
- func (p *LogProject) RemoveConfigFromMachineGroup(confName, groupName string) (err error)
- func (p *LogProject) UpdateConfig(c *LogConfig) (err error)
- func (p *LogProject) UpdateConfigString(configName, c string) (err error)
- func (p *LogProject) UpdateETLJob(name string, job *ETLJob) error
- func (p *LogProject) UpdateEtlMeta(etlMeta *EtlMeta) (err error)
- func (p *LogProject) UpdateLogStore(name string, ttl, shardCnt int) (err error)
- func (p *LogProject) UpdateLogStoreV2(logstore *LogStore) (err error)
- func (p *LogProject) UpdateMachineGroup(m *MachineGroup) (err error)
- func (p *LogProject) WithRequestTimeout(timeout time.Duration) *LogProject
- func (p *LogProject) WithRetryTimeout(timeout time.Duration) *LogProject
- func (p *LogProject) WithToken(token string) (*LogProject, error)
- type LogStore
- func (s *LogStore) CheckIndexExist() (bool, error)
- func (s *LogStore) CreateIndex(index Index) error
- func (s *LogStore) CreateIndexString(indexStr string) error
- func (s *LogStore) CreateShipper(shipper *Shipper) error
- func (s *LogStore) DeleteIndex() error
- func (s *LogStore) DeleteShipper(shipperName string) error
- func (s *LogStore) GetContextLogs(backLines int32, forwardLines int32, packID string, packMeta string) (*GetContextLogsResponse, error)
- func (s *LogStore) GetCursor(shardID int, from string) (cursor string, err error)
- func (s *LogStore) GetHistograms(topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
- func (s *LogStore) GetIndex() (*Index, error)
- func (s *LogStore) GetIndexString() (string, error)
- func (s *LogStore) GetLogs(topic string, from int64, to int64, queryExp string, maxLineNum int64, ...) (*GetLogsResponse, error)
- func (s *LogStore) GetLogsBytes(shardID int, cursor, endCursor string, logGroupMaxCount int) (out []byte, nextCursor string, err error)
- func (s *LogStore) GetShipper(shipperName string) (*Shipper, error)
- func (s *LogStore) ListShards() (shardIDs []*Shard, err error)
- func (s *LogStore) PostLogStoreLogs(lg *LogGroup, hashKey *string) (err error)
- func (s *LogStore) PullLogs(shardID int, cursor, endCursor string, logGroupMaxCount int) (gl *LogGroupList, nextCursor string, err error)
- func (s *LogStore) PutLogs(lg *LogGroup) (err error)
- func (s *LogStore) PutRawLog(rawLogData []byte) (err error)
- func (s *LogStore) SetPutLogCompressType(compressType int) error
- func (s *LogStore) UpdateIndex(index Index) error
- func (s *LogStore) UpdateIndexString(indexStr string) error
- func (s *LogStore) UpdateShipper(shipper *Shipper) error
- type LogTag
- func (*LogTag) Descriptor() ([]byte, []int)
- func (m *LogTag) GetKey() string
- func (m *LogTag) GetValue() string
- func (m *LogTag) Marshal() (dAtA []byte, err error)
- func (m *LogTag) MarshalTo(dAtA []byte) (int, error)
- func (*LogTag) ProtoMessage()
- func (m *LogTag) Reset()
- func (m *LogTag) Size() (n int)
- func (m *LogTag) String() string
- func (m *LogTag) Unmarshal(dAtA []byte) error
- type MachinGroupAttribute
- type Machine
- type MachineGroup
- type MachineList
- type Notification
- type OSSShipperConfig
- type OutputDetail
- type PluginInputItem
- type PluginInterface
- type PluginLogConfigInputDetail
- type RegexConfigInputDetail
- type SavedSearch
- type Schedule
- type SensitiveKey
- type Shard
- type Shipper
- type SingleHistogram
- type SlsLogPackage
- func (*SlsLogPackage) Descriptor() ([]byte, []int)
- func (m *SlsLogPackage) GetData() []byte
- func (m *SlsLogPackage) GetUncompressSize() int32
- func (m *SlsLogPackage) Marshal() (dAtA []byte, err error)
- func (m *SlsLogPackage) MarshalTo(dAtA []byte) (int, error)
- func (*SlsLogPackage) ProtoMessage()
- func (m *SlsLogPackage) Reset()
- func (m *SlsLogPackage) Size() (n int)
- func (m *SlsLogPackage) String() string
- func (m *SlsLogPackage) Unmarshal(dAtA []byte) error
- type SlsLogPackageList
- func (*SlsLogPackageList) Descriptor() ([]byte, []int)
- func (m *SlsLogPackageList) GetPackages() []*SlsLogPackage
- func (m *SlsLogPackageList) Marshal() (dAtA []byte, err error)
- func (m *SlsLogPackageList) MarshalTo(dAtA []byte) (int, error)
- func (*SlsLogPackageList) ProtoMessage()
- func (m *SlsLogPackageList) Reset()
- func (m *SlsLogPackageList) Size() (n int)
- func (m *SlsLogPackageList) String() string
- func (m *SlsLogPackageList) Unmarshal(dAtA []byte) error
- type SourceConfig
- type StreamLogConfigInputDetail
- type TokenAutoUpdateClient
- func (c *TokenAutoUpdateClient) ApplyConfigToMachineGroup(project string, confName, groupName string) (err error)
- func (c *TokenAutoUpdateClient) CheckConfigExist(project string, config string) (ok bool, err error)
- func (c *TokenAutoUpdateClient) CheckLogstoreExist(project string, logstore string) (ok bool, err error)
- func (c *TokenAutoUpdateClient) CheckMachineGroupExist(project string, machineGroup string) (ok bool, err error)
- func (c *TokenAutoUpdateClient) CheckProjectExist(name string) (ok bool, err error)
- func (c *TokenAutoUpdateClient) Close() error
- func (c *TokenAutoUpdateClient) CreateAlert(project string, alert *Alert) (err error)
- func (c *TokenAutoUpdateClient) CreateChart(project, dashboardName string, chart Chart) (err error)
- func (c *TokenAutoUpdateClient) CreateConfig(project string, config *LogConfig) (err error)
- func (c *TokenAutoUpdateClient) CreateConfigString(project string, config string) (err error)
- func (c *TokenAutoUpdateClient) CreateDashboard(project string, dashboard Dashboard) (err error)
- func (c *TokenAutoUpdateClient) CreateDashboardString(project string, dashboardStr string) (err error)
- func (c *TokenAutoUpdateClient) CreateEtlMeta(project string, etlMeta *EtlMeta) (err error)
- func (c *TokenAutoUpdateClient) CreateIndex(project, logstore string, index Index) (err error)
- func (c *TokenAutoUpdateClient) CreateIndexString(project, logstore string, index string) (err error)
- func (c *TokenAutoUpdateClient) CreateLogStore(project string, logstore string, ttl, shardCnt int, autoSplit bool, ...) (err error)
- func (c *TokenAutoUpdateClient) CreateLogStoreV2(project string, logstore *LogStore) (err error)
- func (c *TokenAutoUpdateClient) CreateMachineGroup(project string, m *MachineGroup) (err error)
- func (c *TokenAutoUpdateClient) CreateProject(name, description string) (prj *LogProject, err error)
- func (c *TokenAutoUpdateClient) CreateSavedSearch(project string, savedSearch *SavedSearch) (err error)
- func (c *TokenAutoUpdateClient) DeleteAlert(project string, alertName string) (err error)
- func (c *TokenAutoUpdateClient) DeleteChart(project, dashboardName, chartName string) (err error)
- func (c *TokenAutoUpdateClient) DeleteConfig(project string, config string) (err error)
- func (c *TokenAutoUpdateClient) DeleteDashboard(project, name string) (err error)
- func (c *TokenAutoUpdateClient) DeleteEtlMeta(project string, etlMetaName, etlMetaKey string) (err error)
- func (c *TokenAutoUpdateClient) DeleteIndex(project, logstore string) (err error)
- func (c *TokenAutoUpdateClient) DeleteLogStore(project string, logstore string) (err error)
- func (c *TokenAutoUpdateClient) DeleteMachineGroup(project string, machineGroup string) (err error)
- func (c *TokenAutoUpdateClient) DeleteProject(name string) (err error)
- func (c *TokenAutoUpdateClient) DeleteSavedSearch(project string, savedSearchName string) (err error)
- func (c *TokenAutoUpdateClient) DisableAlert(project string, alertName string) (err error)
- func (c *TokenAutoUpdateClient) EnableAlert(project string, alertName string) (err error)
- func (c *TokenAutoUpdateClient) GetAlert(project string, alertName string) (alert *Alert, err error)
- func (c *TokenAutoUpdateClient) GetAppliedConfigs(project string, groupName string) (confNames []string, err error)
- func (c *TokenAutoUpdateClient) GetAppliedMachineGroups(project string, confName string) (groupNames []string, err error)
- func (c *TokenAutoUpdateClient) GetChart(project, dashboardName, chartName string) (chart *Chart, err error)
- func (c *TokenAutoUpdateClient) GetConfig(project string, config string) (logConfig *LogConfig, err error)
- func (c *TokenAutoUpdateClient) GetConfigString(project string, config string) (logConfig string, err error)
- func (c *TokenAutoUpdateClient) GetCursor(project, logstore string, shardID int, from string) (cursor string, err error)
- func (c *TokenAutoUpdateClient) GetDashboard(project, name string) (dashboard *Dashboard, err error)
- func (c *TokenAutoUpdateClient) GetDashboardString(project, name string) (dashboard string, err error)
- func (c *TokenAutoUpdateClient) GetEtlMeta(project string, etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error)
- func (c *TokenAutoUpdateClient) GetHistograms(project, logstore string, topic string, from int64, to int64, queryExp string) (h *GetHistogramsResponse, err error)
- func (c *TokenAutoUpdateClient) GetIndex(project, logstore string) (index *Index, err error)
- func (c *TokenAutoUpdateClient) GetIndexString(project, logstore string) (index string, err error)
- func (c *TokenAutoUpdateClient) GetLogStore(project string, logstore string) (logstoreRst *LogStore, err error)
- func (c *TokenAutoUpdateClient) GetLogs(project, logstore string, topic string, from int64, to int64, queryExp string, ...) (r *GetLogsResponse, err error)
- func (c *TokenAutoUpdateClient) GetLogsBytes(project, logstore string, shardID int, cursor, endCursor string, ...) (out []byte, nextCursor string, err error)
- func (c *TokenAutoUpdateClient) GetMachineGroup(project string, machineGroup string) (m *MachineGroup, err error)
- func (c *TokenAutoUpdateClient) GetProject(name string) (prj *LogProject, err error)
- func (c *TokenAutoUpdateClient) GetSavedSearch(project string, savedSearchName string) (savedSearch *SavedSearch, err error)
- func (c *TokenAutoUpdateClient) ListAlert(project string, alertName string, dashboard string, offset, size int) (alerts []*Alert, total int, count int, err error)
- func (c *TokenAutoUpdateClient) ListConfig(project string, offset, size int) (cfgNames []string, total int, err error)
- func (c *TokenAutoUpdateClient) ListDashboard(project string, dashboardName string, offset, size int) (dashboardList []string, count, total int, err error)
- func (c *TokenAutoUpdateClient) ListEtlMeta(project string, etlMetaName string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (c *TokenAutoUpdateClient) ListEtlMetaName(project string, offset, size int) (total int, count int, etlMetaNameList []string, err error)
- func (c *TokenAutoUpdateClient) ListEtlMetaWithTag(project string, etlMetaName, etlMetaTag string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error)
- func (c *TokenAutoUpdateClient) ListLogStore(project string) (logstoreList []string, err error)
- func (c *TokenAutoUpdateClient) ListMachineGroup(project string, offset, size int) (m []string, total int, err error)
- func (c *TokenAutoUpdateClient) ListMachines(project, machineGroupName string) (ms []*Machine, total int, err error)
- func (c *TokenAutoUpdateClient) ListProject() (projectNames []string, err error)
- func (c *TokenAutoUpdateClient) ListProjectV2(offset, size int) (projects []LogProject, count, total int, err error)
- func (c *TokenAutoUpdateClient) ListSavedSearch(project string, savedSearchName string, offset, size int) (savedSearches []string, total int, count int, err error)
- func (c *TokenAutoUpdateClient) ListShards(project, logstore string) (shardIDs []*Shard, err error)
- func (c *TokenAutoUpdateClient) MergeShards(project, logstore string, shardID int) (shards []*Shard, err error)
- func (c *TokenAutoUpdateClient) PostLogStoreLogs(project, logstore string, lg *LogGroup, hashKey *string) (err error)
- func (c *TokenAutoUpdateClient) PullLogs(project, logstore string, shardID int, cursor, endCursor string, ...) (gl *LogGroupList, nextCursor string, err error)
- func (c *TokenAutoUpdateClient) PutLogs(project, logstore string, lg *LogGroup) (err error)
- func (c *TokenAutoUpdateClient) PutLogsWithCompressType(project, logstore string, lg *LogGroup, compressType int) (err error)
- func (c *TokenAutoUpdateClient) PutRawLogWithCompressType(project, logstore string, rawLogData []byte, compressType int) (err error)
- func (c *TokenAutoUpdateClient) RemoveConfigFromMachineGroup(project string, confName, groupName string) (err error)
- func (c *TokenAutoUpdateClient) ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string)
- func (c *TokenAutoUpdateClient) SplitShard(project, logstore string, shardID int, splitKey string) (shards []*Shard, err error)
- func (c *TokenAutoUpdateClient) UpdateAlert(project string, alert *Alert) (err error)
- func (c *TokenAutoUpdateClient) UpdateChart(project, dashboardName string, chart Chart) (err error)
- func (c *TokenAutoUpdateClient) UpdateConfig(project string, config *LogConfig) (err error)
- func (c *TokenAutoUpdateClient) UpdateConfigString(project string, configName, configDetail string) (err error)
- func (c *TokenAutoUpdateClient) UpdateDashboard(project string, dashboard Dashboard) (err error)
- func (c *TokenAutoUpdateClient) UpdateDashboardString(project string, dashboardName, dashboardStr string) (err error)
- func (c *TokenAutoUpdateClient) UpdateEtlMeta(project string, etlMeta *EtlMeta) (err error)
- func (c *TokenAutoUpdateClient) UpdateIndex(project, logstore string, index Index) (err error)
- func (c *TokenAutoUpdateClient) UpdateIndexString(project, logstore string, index string) (err error)
- func (c *TokenAutoUpdateClient) UpdateLogStore(project string, logstore string, ttl, shardCnt int) (err error)
- func (c *TokenAutoUpdateClient) UpdateLogStoreV2(project string, logstore *LogStore) (err error)
- func (c *TokenAutoUpdateClient) UpdateMachineGroup(project string, m *MachineGroup) (err error)
- func (c *TokenAutoUpdateClient) UpdateSavedSearch(project string, savedSearch *SavedSearch) (err error)
- type TriggerConfig
- type UpdateTokenFunction
Constants ¶
const ( Compress_LZ4 = iota // 0 Compress_None // 1 Compress_Max // max compress type(just for filter invalid compress type) )
compress type
const ( NotificationTypeSMS = "SMS" NotificationTypeWebhook = "Webhook" NotificationTypeDingTalk = "DingTalk" NotificationTypeEmail = "Email" NotificationTypeMessageCenter = "MessageCenter" )
const ( // OffsetNewest stands for the log head offset, i.e. the offset that will be // assigned to the next message that will be produced to the shard. OffsetNewest = "end" // OffsetOldest stands for the oldest offset available on the logstore for a // shard. OffsetOldest = "begin" // ProgressHeader stands for the progress header in GetLogs response ProgressHeader = "X-Log-Progress" // GetLogsCountHeader stands for the count header in GetLogs response GetLogsCountHeader = "X-Log-Count" // RequestIDHeader stands for the requestID in all response RequestIDHeader = "x-log-requestid" GetLogsQueryInfo = "X-Log-Query-Info" )
const ( //EtlMetaURI is etl meta uri EtlMetaURI = "etlmetas" //EtlMetaNameURI is etl meta name uri EtlMetaNameURI = "etlmetanames" //EtlMetaAllTagMatch is for search meta without tag filtering EtlMetaAllTagMatch = "__all_etl_meta_tag_match__" )
const ( InputTypeSyslog = "syslog" InputTypeStreamlog = "streamlog" InputTypePlugin = "plugin" InputTypeFile = "file" )
const InputTypes
const ( LogFileTypeApsaraLog = "apsara_log" LogFileTypeRegexLog = "common_reg_log" LogFileTypeJSONLog = "json_log" LogFileTypeDelimiterLog = "delimiter_log" )
const LogFileTypes
const ( MergeTypeTopic = "topic" MergeTypeLogstore = "logstore" )
const MergeType
const ( TopicFormatNone = "none" // no topic TopicFormatMachineGroup = "group_topic" // machine group's topic )
const ( PluginInputTypeDockerStdout = "service_docker_stdout" PPluginInputTypeCanal = "service_canal" )
const PluginInputType
const ( MachineIDTypeIP = "ip" MachineIDTypeUserDefined = "userdefined" )
const MachineIDTypes
const BAD_REQUEST = "BadRequest"
const CONFIG_ALREADY_EXIST = "ConfigAlreadyExist"
const CONFIG_NOT_EXIST = "ConfigNotExist"
const GROUP_ALREADY_EXIST = "GroupAlreadyExist"
const GROUP_NOT_EXIST = "GroupNotExist"
const INTERNAL_SERVER_ERROR = "InternalServerError"
const INVALID_API_VERSION = "InvalidAPIVersion"
const INVALID_BODY_RAW_SIZE = "InvalidBodyRawSize"
const INVALID_COMPRESS_TYPE = "InvalidCompressType"
const INVALID_CONTENT_TYPE = "InvalidContentType"
const INVALID_CURSOR = "InvalidCursor"
const INVALID_DATE_FORMAT = "InvalidDateFormat"
const INVALID_ENCODING = "InvalidEncoding"
const INVALID_KEY = "InvalidKey"
const INVALID_LINE = "InvalidLine"
const INVALID_LOGSTORE_QUERY = "InvalidLogStoreQuery"
const INVALID_OFFSET = "InvalidOffset"
const INVALID_PARAMETER = "InvalidParameter"
const INVALID_QUERY_STRING = "InvalidQueryString"
const INVALID_REVERSE = "InvalidReverse"
const INVALID_SIGNATURE_METHOD = "InvalidSignatureMethod"
const INVALID_TIMESTAMP = "InvalidTimestamp"
const INVALID_TIME_RANGE = "InvalidTimeRange"
const LOGSTORE_ALREADY_EXIST = "LogStoreAlreadyExist"
const LOGSTORE_INFO_INVALID = "LogstoreInfoInvalid"
const LOGSTORE_NOT_EXIST = "LogStoreNotExist"
const LOGSTORE_WITHOUT_SHARD = "LogStoreWithoutShard"
const MISSING_API_VERSION = "MissingAPIVersion"
const MISSING_BODY_RAW_SIZE = "MissingBodyRawSize"
const MISSING_CONTENT_LENGTH = "MissingContentLength"
const MISSING_CONTENT_TYPE = "MissingContentType"
const MISSING_DATE = "MissingDate"
const MISSING_HOST = "MissingHost"
const MISSING_SIGNATURE_METHOD = "MissingSignatureMethod"
const MISS_ACCESS_KEY_ID = "MissAccessKeyId"
const (
OSSShipperType = "oss"
)
const (
OutputTypeLogService = "LogService"
)
const OutputType
const PARAMETER_INVALID = "ParameterInvalid"
const POST_BODY_INVALID = "PostBodyInvalid"
const POST_BODY_TOO_LARGE = "PostBodyTooLarge"
const POST_BODY_UNCOMPRESS_ERROR = "PostBodyUncompressError"
const PROJECT_FORBIDDEN = "ProjectForbidden"
const PROJECT_NOT_EXIST = "ProjectNotExist"
const PROJECT_QUOTA_EXCEED = "ProjectQuotaExceed"
const READ_QUOTA_EXCEED = "ReadQuotaExceed"
const REQUEST_TIME_TOO_SKEWED = "RequestTimeTooSkewed"
const SERVER_BUSY = "ServerBusy"
const SHARD_NOT_EXIST = "ShardNotExist"
const SHARD_READ_QUOTA_EXCEED = "ShardReadQuotaExceed"
const SHARD_WRITE_QUOTA_EXCEED = "ShardWriteQuotaExceed"
const SHIPPER_NOT_EXIST = "ShipperNotExist"
const SIGNATURE_NOT_MATCH = "SignatureNotMatch"
const UN_AUTHORIZED = "Unauthorized"
const WRITE_QUOTA_EXCEED = "WriteQuotaExceed"
Variables ¶
var ( ErrInvalidLengthLog = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLog = fmt.Errorf("proto: integer overflow") )
var GlobalDebugLevel = 0
var GlobalForceUsingHTTP = false
GlobalForceUsingHTTP if GlobalForceUsingHTTP is true, then all request will use HTTP(ignore LogProject's UsingHTTP flag)
var InvalidCompressError = errors.New("Invalid Compress Type")
var InvalidTypeError = errors.New("invalid config type")
var Logger = initDefaultSLSLogger()
var NoConfigFieldError = errors.New("no this config field")
var RetryOnServerErrorEnabled = true
RetryOnServerErrorEnabled if RetryOnServerErrorEnabled is false, then all error requests will not be retried
Functions ¶
func AddNecessaryApsaraLogInputConfigField ¶
func AddNecessaryApsaraLogInputConfigField(inputConfigDetail map[string]interface{})
func AddNecessaryDelimiterLogInputConfigField ¶
func AddNecessaryDelimiterLogInputConfigField(inputConfigDetail map[string]interface{})
func AddNecessaryInputConfigField ¶
func AddNecessaryInputConfigField(inputConfigDetail map[string]interface{})
AddNecessaryInputConfigField ...
func AddNecessaryJSONLogInputConfigField ¶
func AddNecessaryJSONLogInputConfigField(inputConfigDetail map[string]interface{})
func AddNecessaryLocalFileInputConfigField ¶
func AddNecessaryLocalFileInputConfigField(inputConfigDetail map[string]interface{})
func AddNecessaryRegexLogInputConfigField ¶
func AddNecessaryRegexLogInputConfigField(inputConfigDetail map[string]interface{})
func GenerateInnerLogger ¶ added in v0.1.6
func GetFileConfigInputDetailType ¶
func GetFileConfigInputDetailType(detail InputDetailInterface) (string, bool)
func InitApsaraLogConfigInputDetail ¶
func InitApsaraLogConfigInputDetail(detail *ApsaraLogConfigInputDetail)
InitApsaraLogConfigInputDetail ...
func InitCommonConfigInputDetail ¶
func InitCommonConfigInputDetail(detail *CommonConfigInputDetail)
InitCommonConfigInputDetail ...
func InitDelimiterConfigInputDetail ¶
func InitDelimiterConfigInputDetail(detail *DelimiterConfigInputDetail)
InitDelimiterConfigInputDetail ...
func InitJSONConfigInputDetail ¶
func InitJSONConfigInputDetail(detail *JSONConfigInputDetail)
InitJSONConfigInputDetail ...
func InitLocalFileConfigInputDetail ¶
func InitLocalFileConfigInputDetail(detail *LocalFileConfigInputDetail)
InitLocalFileConfigInputDetail ...
func InitPluginLogConfigInputDetail ¶
func InitPluginLogConfigInputDetail(detail *PluginLogConfigInputDetail)
InitPluginLogConfigInputDetail ...
func InitRegexConfigInputDetail ¶
func InitRegexConfigInputDetail(detail *RegexConfigInputDetail)
InitRegexConfigInputDetail ...
func InitStreamLogConfigInputDetail ¶
func InitStreamLogConfigInputDetail(detail *StreamLogConfigInputDetail)
InitStreamLogConfigInputDetail ...
func IsDebugLevelMatched ¶ added in v0.1.6
func IsTokenError ¶
func IsValidInputType ¶
IsValidInputType check if specific inputType is valid
func Retry ¶
Retry execute the input operation immediately at first, and do an exponential backoff retry when failed. The default max elapsed time is 15 minutes. The default retry intervals are shown below, in seconds.
1 0.5 [0.25, 0.75] 2 0.75 [0.375, 1.125] 3 1.125 [0.562, 1.687] 4 1.687 [0.8435, 2.53] 5 2.53 [1.265, 3.795] 6 3.795 [1.897, 5.692] 7 5.692 [2.846, 8.538] 8 8.538 [4.269, 12.807] 9 12.807 [6.403, 19.210]
... The signature of backoff.Operation is "func() error".
func RetryWithAttempt ¶
func RetryWithAttempt(ctx context.Context, maxAttempt int, o ConditionOperation) error
RetryWithAttempt ...
func RetryWithBackOff ¶
RetryWithBackOff ...
func RetryWithCondition ¶
RetryWithCondition ...
func UpdateInputConfigField ¶
func UpdateInputConfigField(detail InputDetailInterface, key string, val interface{}) error
UpdateInputConfigField ...
Types ¶
type Alert ¶
type Alert struct { Name string `json:"name"` DisplayName string `json:"displayName"` Description string `json:"description"` State string `json:"state"` Configuration *AlertConfiguration `json:"configuration"` Schedule *Schedule `json:"schedule"` CreateTime int64 `json:"createTime,omitempty"` LastModifiedTime int64 `json:"lastModifiedTime,omitempty"` }
func (*Alert) MarshalJSON ¶
type AlertConfiguration ¶
type AlertConfiguration struct { Condition string `json:"condition"` Dashboard string `json:"dashboard"` QueryList []*AlertQuery `json:"queryList"` MuteUntil int64 `json:"muteUntil"` NotificationList []*Notification `json:"notificationList"` NotifyThreshold int32 `json:"notifyThreshold"` Throttling string `json:"throttling"` }
type AlertQuery ¶
type ApsaraLogConfigInputDetail ¶
type ApsaraLogConfigInputDetail struct { LocalFileConfigInputDetail LogBeginRegex string `json:"logBeginRegex"` }
ApsaraLogConfigInputDetail apsara log config
func ConvertToApsaraLogConfigInputDetail ¶
func ConvertToApsaraLogConfigInputDetail(detail InputDetailInterface) (*ApsaraLogConfigInputDetail, bool)
type BadResponseError ¶
BadResponseError : special sls error, not valid json format
func NewBadResponseError ¶
func NewBadResponseError(body string, header map[string][]string, httpCode int) *BadResponseError
NewBadResponseError ...
func (BadResponseError) Error ¶
func (e BadResponseError) Error() string
func (BadResponseError) String ¶
func (e BadResponseError) String() string
type Chart ¶
type Chart struct { Title string `json:"title"` Type string `json:"type"` Search ChartSearch `json:"search"` Display ChartDisplay `json:"display"` }
type ChartDisplay ¶
type ChartSearch ¶
type Client ¶
type Client struct { Endpoint string // IP or hostname of SLS endpoint AccessKeyID string AccessKeySecret string SecurityToken string UserAgent string // default defaultLogUserAgent RequestTimeOut time.Duration RetryTimeOut time.Duration // contains filtered or unexported fields }
Client ...
func (*Client) ApplyConfigToMachineGroup ¶
ApplyConfigToMachineGroup applies config to machine group.
func (*Client) CheckConfigExist ¶
CheckConfigExist check config exist or not
func (*Client) CheckLogstoreExist ¶
CheckLogstoreExist check logstore exist or not
func (*Client) CheckMachineGroupExist ¶
CheckMachineGroupExist check machine group exist or not
func (*Client) CheckProjectExist ¶
CheckProjectExist check project exist or not
func (*Client) CreateChart ¶
func (*Client) CreateConfig ¶
CreateConfig creates a new config in SLS.
func (*Client) CreateConfigString ¶
CreateConfigString creates a new config in SLS.
func (*Client) CreateConsumerGroup ¶
func (c *Client) CreateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
CreateConsumerGroup ...
func (*Client) CreateDashboard ¶
func (*Client) CreateDashboardString ¶
func (*Client) CreateEtlMeta ¶
func (*Client) CreateIndex ¶
CreateIndex ...
func (*Client) CreateIndexString ¶
CreateIndexString ...
func (*Client) CreateLogStore ¶
func (c *Client) CreateLogStore(project string, logstore string, ttl, shardCnt int, autoSplit bool, maxSplitShard int) error
CreateLogStore creates a new logstore in SLS, where name is logstore name, and ttl is time-to-live(in day) of logs, and shardCnt is the number of shards, and autoSplit is auto split, and maxSplitShard is the max number of shard.
func (*Client) CreateLogStoreV2 ¶
CreateLogStoreV2 creates a new logstore in SLS
func (*Client) CreateMachineGroup ¶
func (c *Client) CreateMachineGroup(project string, m *MachineGroup) error
CreateMachineGroup creates a new machine group in SLS.
func (*Client) CreateProject ¶
func (c *Client) CreateProject(name, description string) (*LogProject, error)
CreateProject create a new loghub project.
func (*Client) CreateSavedSearch ¶
func (c *Client) CreateSavedSearch(project string, savedSearch *SavedSearch) error
func (*Client) DeleteChart ¶
func (*Client) DeleteConfig ¶
DeleteConfig deletes a config according by config name.
func (*Client) DeleteConsumerGroup ¶
DeleteConsumerGroup ...
func (*Client) DeleteDashboard ¶
func (*Client) DeleteEtlMeta ¶
func (*Client) DeleteIndex ¶
DeleteIndex ...
func (*Client) DeleteLogStore ¶
DeleteLogStore deletes a logstore according by logstore name.
func (*Client) DeleteMachineGroup ¶
DeleteMachineGroup deletes machine group according machine group name.
func (*Client) DeleteSavedSearch ¶
func (*Client) GetAppliedConfigs ¶
func (c *Client) GetAppliedConfigs(project string, groupName string) (confNames []string, err error)
GetAppliedConfigs returns applied config names list according machine group name groupName.
func (*Client) GetAppliedMachineGroups ¶
func (c *Client) GetAppliedMachineGroups(project string, confName string) (groupNames []string, err error)
GetAppliedMachineGroups returns applied machine group names list according config name.
func (*Client) GetCheckpoint ¶
func (c *Client) GetCheckpoint(project, logstore string, cgName string) (checkPointList []*ConsumerGroupCheckPoint, err error)
GetCheckpoint ...
func (*Client) GetConfigString ¶
GetConfigString returns config according by config name.
func (*Client) GetCursor ¶
func (c *Client) GetCursor(project, logstore string, shardID int, from string) (cursor string, err error)
GetCursor gets log cursor of one shard specified by shardId. The from can be in three form: a) unix timestamp in seccond, b) "begin", c) "end". For more detail please read: https://help.aliyun.com/document_detail/29024.html
func (*Client) GetCursorTime ¶
func (c *Client) GetCursorTime(project, logstore string, shardID int, cursor string) (cursorTime time.Time, err error)
GetCursorTime ...
func (*Client) GetDashboard ¶
func (*Client) GetDashboardString ¶
func (*Client) GetEtlMeta ¶
func (*Client) GetHistograms ¶
func (c *Client) GetHistograms(project, logstore string, topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
GetHistograms query logs with [from, to) time range
func (*Client) GetIndexString ¶
GetIndexString ...
func (*Client) GetLogStore ¶
GetLogStore returns logstore according by logstore name.
func (*Client) GetLogs ¶
func (c *Client) GetLogs(project, logstore string, topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogsResponse, error)
GetLogs query logs with [from, to) time range
func (*Client) GetLogsBytes ¶
func (c *Client) GetLogsBytes(project, logstore string, shardID int, cursor, endCursor string, logGroupMaxCount int) (out []byte, nextCursor string, err error)
GetLogsBytes gets logs binary data from shard specified by shardId according cursor and endCursor. The logGroupMaxCount is the max number of logGroup could be returned. The nextCursor is the next curosr can be used to read logs at next time.
func (*Client) GetMachineGroup ¶
func (c *Client) GetMachineGroup(project string, machineGroup string) (m *MachineGroup, err error)
GetMachineGroup retruns machine group according by machine group name.
func (*Client) GetPrevCursorTime ¶
func (c *Client) GetPrevCursorTime(project, logstore string, shardID int, cursor string) (cursorTime time.Time, err error)
GetPrevCursorTime ...
func (*Client) GetProject ¶
func (c *Client) GetProject(name string) (*LogProject, error)
GetProject ...
func (*Client) GetSavedSearch ¶
func (c *Client) GetSavedSearch(project string, savedSearchName string) (*SavedSearch, error)
func (*Client) HeartBeat ¶
func (c *Client) HeartBeat(project, logstore string, cgName, consumer string, heartBeatShardIDs []int) (shardIDs []int, err error)
HeartBeat ...
func (*Client) ListConfig ¶
func (c *Client) ListConfig(project string, offset, size int) (cfgNames []string, total int, err error)
ListConfig returns config names list and the total number of configs. The offset starts from 0 and the size is the max number of configs could be returned.
func (*Client) ListConsumerGroup ¶
func (c *Client) ListConsumerGroup(project, logstore string) (cgList []*ConsumerGroup, err error)
ListConsumerGroup ...
func (*Client) ListDashboard ¶
func (*Client) ListEtlMeta ¶
func (*Client) ListEtlMetaName ¶
func (*Client) ListEtlMetaWithTag ¶
func (*Client) ListLogStore ¶
ListLogStore returns all logstore names of project p.
func (*Client) ListMachineGroup ¶
func (c *Client) ListMachineGroup(project string, offset, size int) (m []string, total int, err error)
ListMachineGroup returns machine group name list and the total number of machine groups. The offset starts from 0 and the size is the max number of machine groups could be returned.
func (*Client) ListMachines ¶
func (*Client) ListProject ¶
ListProject list all projects in specific region the region is related with the client's endpoint
func (*Client) ListProjectV2 ¶
func (c *Client) ListProjectV2(offset, size int) (projects []LogProject, count, total int, err error)
ListProjectV2 list all projects in specific region the region is related with the client's endpoint ref https://www.alibabacloud.com/help/doc-detail/74955.htm
func (*Client) ListSavedSearch ¶
func (*Client) ListShards ¶
ListShards returns shard id list of this logstore.
func (*Client) MergeShards ¶
MergeShards https://help.aliyun.com/document_detail/29022.html
func (*Client) PostLogStoreLogs ¶
func (c *Client) PostLogStoreLogs(project, logstore string, lg *LogGroup, hashKey *string) (err error)
PostLogStoreLogs put logs into Shard logstore by hashKey. The callers should transform user logs into LogGroup.
func (*Client) PullLogs ¶
func (c *Client) PullLogs(project, logstore string, shardID int, cursor, endCursor string, logGroupMaxCount int) (gl *LogGroupList, nextCursor string, err error)
PullLogs gets logs from shard specified by shardId according cursor and endCursor. The logGroupMaxCount is the max number of logGroup could be returned. The nextCursor is the next cursor can be used to read logs at next time. @note if you want to pull logs continuous, set endCursor = ""
func (*Client) PutLogs ¶
PutLogs put logs into logstore. The callers should transform user logs into LogGroup.
func (*Client) PutLogsWithCompressType ¶
func (c *Client) PutLogsWithCompressType(project, logstore string, lg *LogGroup, compressType int) (err error)
PutLogsWithCompressType put logs into logstore with specific compress type. The callers should transform user logs into LogGroup.
func (*Client) PutRawLogWithCompressType ¶
func (c *Client) PutRawLogWithCompressType(project, logstore string, rawLogData []byte, compressType int) (err error)
PutRawLogWithCompressType put raw log data to log service, no marshal
func (*Client) RemoveConfigFromMachineGroup ¶
func (c *Client) RemoveConfigFromMachineGroup(project string, confName, groupName string) (err error)
RemoveConfigFromMachineGroup removes config from machine group.
func (*Client) ResetAccessKeyToken ¶
ResetAccessKeyToken reset client's access key token
func (*Client) SplitShard ¶
func (c *Client) SplitShard(project, logstore string, shardID int, splitKey string) (shards []*Shard, err error)
SplitShard https://help.aliyun.com/document_detail/29021.html
func (*Client) UpdateChart ¶
func (*Client) UpdateCheckpoint ¶
func (c *Client) UpdateCheckpoint(project, logstore string, cgName string, consumer string, shardID int, checkpoint string, forceSuccess bool) (err error)
UpdateCheckpoint ...
func (*Client) UpdateConfig ¶
UpdateConfig updates a config.
func (*Client) UpdateConfigString ¶
UpdateConfigString updates a config.
func (*Client) UpdateConsumerGroup ¶
func (c *Client) UpdateConsumerGroup(project, logstore string, cg ConsumerGroup) (err error)
UpdateConsumerGroup ...
func (*Client) UpdateDashboard ¶
func (*Client) UpdateDashboardString ¶
func (*Client) UpdateEtlMeta ¶
func (*Client) UpdateIndex ¶
UpdateIndex ...
func (*Client) UpdateIndexString ¶
UpdateIndexString ...
func (*Client) UpdateLogStore ¶
UpdateLogStore updates a logstore according by logstore name, obviously we can't modify the logstore name itself.
func (*Client) UpdateLogStoreV2 ¶
UpdateLogStoreV2 updates a logstore according by logstore name, obviously we can't modify the logstore name itself.
func (*Client) UpdateMachineGroup ¶
func (c *Client) UpdateMachineGroup(project string, m *MachineGroup) (err error)
UpdateMachineGroup updates a machine group.
func (*Client) UpdateProject ¶
func (c *Client) UpdateProject(name, description string) (*LogProject, error)
UpdateProject create a new loghub project.
func (*Client) UpdateSavedSearch ¶
func (c *Client) UpdateSavedSearch(project string, savedSearch *SavedSearch) error
type ClientInterface ¶
type ClientInterface interface { // #################### Client Operations ##################### // ResetAccessKeyToken reset client's access key token ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string) // Close the client Close() error // #################### Project Operations ##################### // CreateProject create a new loghub project. CreateProject(name, description string) (*LogProject, error) GetProject(name string) (*LogProject, error) // ListProject list all projects in specific region // the region is related with the client's endpoint ListProject() (projectNames []string, err error) // ListProjectV2 list all projects in specific region // the region is related with the client's endpoint // ref https://www.alibabacloud.com/help/doc-detail/74955.htm ListProjectV2(offset, size int) (projects []LogProject, count, total int, err error) // CheckProjectExist check project exist or not CheckProjectExist(name string) (bool, error) // DeleteProject ... DeleteProject(name string) error // #################### Logstore Operations ##################### // ListLogStore returns all logstore names of project p. ListLogStore(project string) ([]string, error) // GetLogStore returns logstore according by logstore name. GetLogStore(project string, logstore string) (*LogStore, error) // CreateLogStore creates a new logstore in SLS // where name is logstore name, // and ttl is time-to-live(in day) of logs, // and shardCnt is the number of shards, // and autoSplit is auto split, // and maxSplitShard is the max number of shard. CreateLogStore(project string, logstore string, ttl, shardCnt int, autoSplit bool, maxSplitShard int) error // CreateLogStoreV2 creates a new logstore in SLS CreateLogStoreV2(project string, logstore *LogStore) error // DeleteLogStore deletes a logstore according by logstore name. DeleteLogStore(project string, logstore string) (err error) // UpdateLogStore updates a logstore according by logstore name, // obviously we can't modify the logstore name itself. UpdateLogStore(project string, logstore string, ttl, shardCnt int) (err error) // UpdateLogStoreV2 updates a logstore according by logstore name, // obviously we can't modify the logstore name itself. UpdateLogStoreV2(project string, logstore *LogStore) error // CheckLogstoreExist check logstore exist or not CheckLogstoreExist(project string, logstore string) (bool, error) // #################### Logtail Operations ##################### // ListMachineGroup returns machine group name list and the total number of machine groups. // The offset starts from 0 and the size is the max number of machine groups could be returned. ListMachineGroup(project string, offset, size int) (m []string, total int, err error) // ListMachines list all machines in machineGroupName ListMachines(project, machineGroupName string) (ms []*Machine, total int, err error) // CheckMachineGroupExist check machine group exist or not CheckMachineGroupExist(project string, machineGroup string) (bool, error) // GetMachineGroup retruns machine group according by machine group name. GetMachineGroup(project string, machineGroup string) (m *MachineGroup, err error) // CreateMachineGroup creates a new machine group in SLS. CreateMachineGroup(project string, m *MachineGroup) error // UpdateMachineGroup updates a machine group. UpdateMachineGroup(project string, m *MachineGroup) (err error) // DeleteMachineGroup deletes machine group according machine group name. DeleteMachineGroup(project string, machineGroup string) (err error) // ListConfig returns config names list and the total number of configs. // The offset starts from 0 and the size is the max number of configs could be returned. ListConfig(project string, offset, size int) (cfgNames []string, total int, err error) // CheckConfigExist check config exist or not CheckConfigExist(project string, config string) (ok bool, err error) // GetConfig returns config according by config name. GetConfig(project string, config string) (logConfig *LogConfig, err error) // GetConfigString returns config according by config name. GetConfigString(name string, config string) (c string, err error) // UpdateConfig updates a config. UpdateConfig(project string, config *LogConfig) (err error) // UpdateConfigString updates a config. UpdateConfigString(project string, configName, configDetail string) (err error) // CreateConfig creates a new config in SLS. CreateConfig(project string, config *LogConfig) (err error) // CreateConfigString creates a new config in SLS. CreateConfigString(project string, config string) (err error) // DeleteConfig deletes a config according by config name. DeleteConfig(project string, config string) (err error) // GetAppliedMachineGroups returns applied machine group names list according config name. GetAppliedMachineGroups(project string, confName string) (groupNames []string, err error) // GetAppliedConfigs returns applied config names list according machine group name groupName. GetAppliedConfigs(project string, groupName string) (confNames []string, err error) // ApplyConfigToMachineGroup applies config to machine group. ApplyConfigToMachineGroup(project string, confName, groupName string) (err error) // RemoveConfigFromMachineGroup removes config from machine group. RemoveConfigFromMachineGroup(project string, confName, groupName string) (err error) // #################### ETL Operations ##################### CreateEtlMeta(project string, etlMeta *EtlMeta) (err error) UpdateEtlMeta(project string, etlMeta *EtlMeta) (err error) DeleteEtlMeta(project string, etlMetaName, etlMetaKey string) (err error) GetEtlMeta(project string, etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error) ListEtlMeta(project string, etlMetaName string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error) ListEtlMetaWithTag(project string, etlMetaName, etlMetaTag string, offset, size int) (total int, count int, etlMetaList []*EtlMeta, err error) ListEtlMetaName(project string, offset, size int) (total int, count int, etlMetaNameList []string, err error) // #################### Shard Operations ##################### // ListShards returns shard id list of this logstore. ListShards(project, logstore string) (shards []*Shard, err error) // SplitShard https://help.aliyun.com/document_detail/29021.html SplitShard(project, logstore string, shardID int, splitKey string) (shards []*Shard, err error) // MergeShards https://help.aliyun.com/document_detail/29022.html MergeShards(project, logstore string, shardID int) (shards []*Shard, err error) // #################### Log Operations ##################### // PutLogs put logs into logstore. // The callers should transform user logs into LogGroup. PutLogs(project, logstore string, lg *LogGroup) (err error) // PostLogStoreLogs put logs into Shard logstore by hashKey. // The callers should transform user logs into LogGroup. PostLogStoreLogs(project, logstore string, lg *LogGroup, hashKey *string) (err error) // PutLogsWithCompressType put logs into logstore with specific compress type. // The callers should transform user logs into LogGroup. PutLogsWithCompressType(project, logstore string, lg *LogGroup, compressType int) (err error) // PutRawLogWithCompressType put raw log data to log service, no marshal PutRawLogWithCompressType(project, logstore string, rawLogData []byte, compressType int) (err error) // GetCursor gets log cursor of one shard specified by shardId. // The from can be in three form: a) unix timestamp in seccond, b) "begin", c) "end". // For more detail please read: https://help.aliyun.com/document_detail/29024.html GetCursor(project, logstore string, shardID int, from string) (cursor string, err error) // GetLogsBytes gets logs binary data from shard specified by shardId according cursor and endCursor. // The logGroupMaxCount is the max number of logGroup could be returned. // The nextCursor is the next curosr can be used to read logs at next time. GetLogsBytes(project, logstore string, shardID int, cursor, endCursor string, logGroupMaxCount int) (out []byte, nextCursor string, err error) // PullLogs gets logs from shard specified by shardId according cursor and endCursor. // The logGroupMaxCount is the max number of logGroup could be returned. // The nextCursor is the next cursor can be used to read logs at next time. // @note if you want to pull logs continuous, set endCursor = "" PullLogs(project, logstore string, shardID int, cursor, endCursor string, logGroupMaxCount int) (gl *LogGroupList, nextCursor string, err error) // GetHistograms query logs with [from, to) time range GetHistograms(project, logstore string, topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error) // GetLogs query logs with [from, to) time range GetLogs(project, logstore string, topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogsResponse, error) // #################### Index Operations ##################### // CreateIndex ... CreateIndex(project, logstore string, index Index) error // CreateIndexString ... CreateIndexString(project, logstore string, indexStr string) error // UpdateIndex ... UpdateIndex(project, logstore string, index Index) error // UpdateIndexString ... UpdateIndexString(project, logstore string, indexStr string) error // DeleteIndex ... DeleteIndex(project, logstore string) error // GetIndex ... GetIndex(project, logstore string) (*Index, error) // GetIndexString ... GetIndexString(project, logstore string) (string, error) // #################### Chart&Dashboard Operations ##################### ListDashboard(project string, dashboardName string, offset, size int) (dashboardList []string, count, total int, err error) GetDashboard(project, name string) (dashboard *Dashboard, err error) GetDashboardString(project, name string) (dashboard string, err error) DeleteDashboard(project, name string) error UpdateDashboard(project string, dashboard Dashboard) error UpdateDashboardString(project string, dashboardName, dashboardStr string) error CreateDashboard(project string, dashboard Dashboard) error CreateDashboardString(project string, dashboardStr string) error GetChart(project, dashboardName, chartName string) (chart *Chart, err error) DeleteChart(project, dashboardName, chartName string) error UpdateChart(project, dashboardName string, chart Chart) error CreateChart(project, dashboardName string, chart Chart) error // #################### SavedSearch&Alert Operations ##################### CreateSavedSearch(project string, savedSearch *SavedSearch) error UpdateSavedSearch(project string, savedSearch *SavedSearch) error DeleteSavedSearch(project string, savedSearchName string) error GetSavedSearch(project string, savedSearchName string) (*SavedSearch, error) ListSavedSearch(project string, savedSearchName string, offset, size int) (savedSearches []string, total int, count int, err error) CreateAlert(project string, alert *Alert) error UpdateAlert(project string, alert *Alert) error DeleteAlert(project string, alertName string) error GetAlert(project string, alertName string) (*Alert, error) DisableAlert(project string, alertName string) error EnableAlert(project string, alertName string) error ListAlert(project, alertName, dashboard string, offset, size int) (alerts []*Alert, total int, count int, err error) // contains filtered or unexported methods }
ClientInterface for all log's open api
func CreateNormalInterface ¶
func CreateNormalInterface(endpoint, accessKeyID, accessKeySecret, securityToken string) ClientInterface
CreateNormalInterface create a normal client
func CreateTokenAutoUpdateClient ¶
func CreateTokenAutoUpdateClient(endpoint string, tokenUpdateFunc UpdateTokenFunction, shutdown <-chan struct{}) (client ClientInterface, err error)
CreateTokenAutoUpdateClient crate a TokenAutoUpdateClient this client will auto fetch security token and retry when operation is `Unauthorized` @note TokenAutoUpdateClient will destroy when shutdown channel is closed
type CommonConfigInputDetail ¶
type CommonConfigInputDetail struct { LocalStorage bool `json:"localStorage"` FilterKeys []string `json:"filterKey,omitempty"` FilterRegex []string `json:"filterRegex,omitempty"` ShardHashKey []string `json:"shardHashKey,omitempty"` EnableTag bool `json:"enableTag"` EnableRawLog bool `json:"enableRawLog"` MaxSendRate int `json:"maxSendRate"` SendRateExpire int `json:"sendRateExpire"` SensitiveKeys []SensitiveKey `json:"sensitive_keys,omitempty"` MergeType string `json:"mergeType,omitempty"` DelayAlarmBytes int `json:"delayAlarmBytes,omitempty"` AdjustTimeZone bool `json:"adjustTimezone"` LogTimeZone string `json:"logTimezone,omitempty"` Priority int `json:"priority,omitempty"` }
CommonConfigInputDetail is all input detail's basic config
type ConditionOperation ¶
ConditionOperation : retry depends on the retured bool
type ConfigPluginCanal ¶
type ConfigPluginCanal struct { Host string Port int User string Password string Flavor string ServerID int IncludeTables []string ExcludeTables []string StartBinName string StartBinLogPos int HeartBeatPeriod int ReadTimeout int EnableDDL bool EnableXID bool EnableGTID bool EnableInsert bool EnableUpdate bool EnableDelete bool TextToString bool StartFromBegining bool Charset string }
func CreateConfigPluginCanal ¶
func CreateConfigPluginCanal() *ConfigPluginCanal
type ConfigPluginDockerStdout ¶
type ConfigPluginDockerStdout struct { IncludeLabel map[string]string ExcludeLabel map[string]string IncludeEnv map[string]string ExcludeEnv map[string]string FlushIntervalMs int TimeoutMs int BeginLineRegex string BeginLineTimeoutMs int BeginLineCheckLength int MaxLogSize int Stdout bool Stderr bool }
func CreateConfigPluginDockerStdout ¶
func CreateConfigPluginDockerStdout() *ConfigPluginDockerStdout
type ConsumerGroup ¶
type ConsumerGroup struct { ConsumerGroupName string `json:"consumerGroup"` Timeout int `json:"timeout"` // timeout seconds InOrder bool `json:"order"` }
ConsumerGroup type define
type ConsumerGroupCheckPoint ¶
type ConsumerGroupCheckPoint struct { ShardID int `json:"shard"` CheckPoint string `json:"checkpoint"` UpdateTime int `json:"updateTime"` Consumer string `json:"consumer"` }
ConsumerGroupCheckPoint type define
type DelimiterConfigInputDetail ¶
type DelimiterConfigInputDetail struct { LocalFileConfigInputDetail Separator string `json:"separator"` Quote string `json:"quote"` Key []string `json:"key"` TimeKey string `json:"timeKey"` AutoExtend bool `json:"autoExtend"` }
DelimiterConfigInputDetail delimiter log config
func ConvertToDelimiterConfigInputDetail ¶
func ConvertToDelimiterConfigInputDetail(detail InputDetailInterface) (*DelimiterConfigInputDetail, bool)
type ETLJob ¶
type ETLJob struct { JobName string `json:"etlJobName"` SourceConfig *SourceConfig `json:"sourceConfig"` TriggerConfig *TriggerConfig `json:"triggerConfig"` FunctionConfig *FunctionConfig `json:"functionConfig"` // TODO: change this to map[string]interface{} once log service fixes the format FunctionParameter interface{} `json:"functionParameter"` LogConfig *JobLogConfig `json:"logConfig"` Enable bool `json:"enable"` CreateTime int64 `json:"createTime"` UpdateTime int64 `json:"updateTime"` }
func (*ETLJob) UnmarshalJSON ¶
This can be removed once log service returns function parameter in json type. "functionParameter":{"a":1} instead of "functionParameter":"{\"a\":1}"
type Error ¶
type Error struct { HTTPCode int32 `json:"httpCode"` Code string `json:"errorCode"` Message string `json:"errorMessage"` RequestID string `json:"requestID"` }
Error defines sls error
type FunctionConfig ¶
type GetContextLogsResponse ¶ added in v0.1.6
type GetContextLogsResponse struct { Progress string `json:"progress"` TotalLines int64 `json:"total_lines"` BackLines int64 `json:"back_lines"` ForwardLines int64 `json:"forward_lines"` Logs []map[string]string `json:"logs"` }
func (*GetContextLogsResponse) IsComplete ¶ added in v0.1.6
func (resp *GetContextLogsResponse) IsComplete() bool
type GetHistogramsResponse ¶
type GetHistogramsResponse struct { Progress string `json:"progress"` Count int64 `json:"count"` Histograms []SingleHistogram `json:"histograms"` }
func (*GetHistogramsResponse) IsComplete ¶
func (resp *GetHistogramsResponse) IsComplete() bool
type GetLogsResponse ¶
type GetLogsResponse struct { Progress string `json:"progress"` Count int64 `json:"count"` Logs []map[string]string `json:"logs"` Contents string `json:"contents"` }
GetLogsResponse defines response from GetLogs call
func (*GetLogsResponse) GetKeys ¶ added in v0.1.6
func (resp *GetLogsResponse) GetKeys() (error, []string)
func (*GetLogsResponse) IsComplete ¶
func (resp *GetLogsResponse) IsComplete() bool
type Index ¶
type Index struct { Keys map[string]IndexKey `json:"keys,omitempty"` Line *IndexLine `json:"line,omitempty"` }
Index is an index config for a log store.
func CreateDefaultIndex ¶
func CreateDefaultIndex() *Index
CreateDefaultIndex return a full text index config
type IndexKey ¶
type IndexKey struct { Token []string `json:"token"` // tokens that split the log line. CaseSensitive bool `json:"caseSensitive"` Type string `json:"type"` // text, long, double DocValue bool `json:"doc_value,omitempty"` Alias string `json:"alias,omitempty"` Chn bool `json:"chn"` // parse chinese or not JsonKeys map[string]*JsonKey `json:"json_keys,omitempty"` }
IndexKey ...
type InputDetail ¶
type InputDetail struct { LogType string `json:"logType"` LogPath string `json:"logPath"` FilePattern string `json:"filePattern"` LocalStorage bool `json:"localStorage"` TimeKey string `json:"timeKey"` TimeFormat string `json:"timeFormat"` LogBeginRegex string `json:"logBeginRegex"` Regex string `json:"regex"` Keys []string `json:"key"` FilterKeys []string `json:"filterKey"` FilterRegex []string `json:"filterRegex"` TopicFormat string `json:"topicFormat"` Separator string `json:"separator"` AutoExtend bool `json:"autoExtend"` }
InputDetail defines log_config input @note : deprecated and no maintenance
func ConvertToInputDetail ¶
func ConvertToInputDetail(detail InputDetailInterface) (*InputDetail, bool)
type InputDetailInterface ¶
type InputDetailInterface interface { }
InputDetailInterface all input detail's interface
type JSONConfigInputDetail ¶
type JSONConfigInputDetail struct { LocalFileConfigInputDetail TimeKey string `json:"timeKey"` }
JSONConfigInputDetail pure json log config
func ConvertToJSONConfigInputDetail ¶
func ConvertToJSONConfigInputDetail(detail InputDetailInterface) (*JSONConfigInputDetail, bool)
type JobLogConfig ¶
type LocalFileConfigInputDetail ¶
type LocalFileConfigInputDetail struct { CommonConfigInputDetail LogType string `json:"logType"` LogPath string `json:"logPath"` FilePattern string `json:"filePattern"` TimeFormat string `json:"timeFormat"` TopicFormat string `json:"topicFormat,omitempty"` Preserve bool `json:"preserve"` PreserveDepth int `json:"preserveDepth"` FileEncoding string `json:"fileEncoding,omitempty"` DiscardUnmatch bool `json:"discardUnmatch"` MaxDepth int `json:"maxDepth"` TailExisted bool `json:"tailExisted"` DiscardNonUtf8 bool `json:"discardNonUtf8"` DelaySkipBytes int `json:"delaySkipBytes"` IsDockerFile bool `json:"dockerFile"` DockerIncludeLabel map[string]string `json:"dockerIncludeLabel,omitempty"` DockerExcludeLabel map[string]string `json:"dockerExcludeLabel,omitempty"` DockerIncludeEnv map[string]string `json:"dockerIncludeEnv,omitempty"` DockerExcludeEnv map[string]string `json:"dockerExcludeEnv,omitempty"` }
LocalFileConfigInputDetail all file input detail's basic config
type Log ¶
type Log struct { Time *uint32 `protobuf:"varint,1,req,name=Time" json:"Time,omitempty"` Contents []*LogContent `protobuf:"bytes,2,rep,name=Contents" json:"Contents,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Log) Descriptor ¶
func (*Log) GetContents ¶
func (m *Log) GetContents() []*LogContent
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
type LogConfig ¶
type LogConfig struct { Name string `json:"configName"` LogSample string `json:"logSample"` InputType string `json:"inputType"` // syslog plugin file InputDetail InputDetailInterface `json:"inputDetail"` OutputType string `json:"outputType"` OutputDetail OutputDetail `json:"outputDetail"` CreateTime uint32 `json:"createTime,omitempty` LastModifyTime uint32 `json:"lastModifyTime,omitempty"` }
LogConfig defines log config
type LogConfigPluginInput ¶
type LogConfigPluginInput struct { Inputs []*PluginInputItem `json:"inputs"` Processors []*PluginInputItem `json:"processors,omitempty"` Aggregators []*PluginInputItem `json:"aggregators,omitempty"` Flushers []*PluginInputItem `json:"flushers,omitempty"` }
type LogContent ¶
type LogContent struct { Key *string `protobuf:"bytes,1,req,name=Key" json:"Key,omitempty"` Value *string `protobuf:"bytes,2,req,name=Value" json:"Value,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*LogContent) Descriptor ¶
func (*LogContent) Descriptor() ([]byte, []int)
func (*LogContent) GetKey ¶
func (m *LogContent) GetKey() string
func (*LogContent) GetValue ¶
func (m *LogContent) GetValue() string
func (*LogContent) Marshal ¶
func (m *LogContent) Marshal() (dAtA []byte, err error)
func (*LogContent) ProtoMessage ¶
func (*LogContent) ProtoMessage()
func (*LogContent) Reset ¶
func (m *LogContent) Reset()
func (*LogContent) Size ¶
func (m *LogContent) Size() (n int)
func (*LogContent) String ¶
func (m *LogContent) String() string
func (*LogContent) Unmarshal ¶
func (m *LogContent) Unmarshal(dAtA []byte) error
type LogGroup ¶
type LogGroup struct { Logs []*Log `protobuf:"bytes,1,rep,name=Logs" json:"Logs,omitempty"` Category *string `protobuf:"bytes,2,opt,name=Category" json:"Category,omitempty"` Topic *string `protobuf:"bytes,3,opt,name=Topic" json:"Topic,omitempty"` Source *string `protobuf:"bytes,4,opt,name=Source" json:"Source,omitempty"` MachineUUID *string `protobuf:"bytes,5,opt,name=MachineUUID" json:"MachineUUID,omitempty"` LogTags []*LogTag `protobuf:"bytes,6,rep,name=LogTags" json:"LogTags,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*LogGroup) Descriptor ¶
func (*LogGroup) GetCategory ¶
func (*LogGroup) GetLogTags ¶
func (*LogGroup) GetMachineUUID ¶
func (*LogGroup) ProtoMessage ¶
func (*LogGroup) ProtoMessage()
type LogGroupList ¶
type LogGroupList struct { LogGroups []*LogGroup `protobuf:"bytes,1,rep,name=LogGroups" json:"LogGroups,omitempty"` XXX_unrecognized []byte `json:"-"` }
func LogsBytesDecode ¶
func LogsBytesDecode(data []byte) (gl *LogGroupList, err error)
LogsBytesDecode decodes logs binary data returned by GetLogsBytes API
func (*LogGroupList) Descriptor ¶
func (*LogGroupList) Descriptor() ([]byte, []int)
func (*LogGroupList) GetLogGroups ¶
func (m *LogGroupList) GetLogGroups() []*LogGroup
func (*LogGroupList) Marshal ¶
func (m *LogGroupList) Marshal() (dAtA []byte, err error)
func (*LogGroupList) ProtoMessage ¶
func (*LogGroupList) ProtoMessage()
func (*LogGroupList) Reset ¶
func (m *LogGroupList) Reset()
func (*LogGroupList) Size ¶
func (m *LogGroupList) Size() (n int)
func (*LogGroupList) String ¶
func (m *LogGroupList) String() string
func (*LogGroupList) Unmarshal ¶
func (m *LogGroupList) Unmarshal(dAtA []byte) error
type LogProject ¶
type LogProject struct { Name string `json:"projectName"` // Project name Description string `json:"description"` // Project description Status string `json:"status"` // Normal Owner string `json:"owner"` // empty Region string `json:"region"` // region id, eg cn-shanghai CreateTime string `json:"createTime"` // unix time seconds, eg 1524539357 LastModifyTime string `json:"lastModifyTime"` // unix time seconds, eg 1524539357 Endpoint string // IP or hostname of SLS endpoint AccessKeyID string AccessKeySecret string SecurityToken string UsingHTTP bool // default https UserAgent string // default defaultLogUserAgent // contains filtered or unexported fields }
LogProject defines log project
func NewLogProject ¶
func NewLogProject(name, endpoint, accessKeyID, accessKeySecret string) (p *LogProject, err error)
NewLogProject creates a new SLS project.
func (*LogProject) ApplyConfigToMachineGroup ¶
func (p *LogProject) ApplyConfigToMachineGroup(confName, groupName string) (err error)
ApplyConfigToMachineGroup applies config to machine group.
func (*LogProject) CheckConfigExist ¶
func (p *LogProject) CheckConfigExist(name string) (bool, error)
CheckConfigExist check config exist or not
func (*LogProject) CheckLogstoreExist ¶
func (p *LogProject) CheckLogstoreExist(name string) (bool, error)
CheckLogstoreExist check logstore exist or not
func (*LogProject) CheckMachineGroupExist ¶
func (p *LogProject) CheckMachineGroupExist(name string) (bool, error)
CheckMachineGroupExist check machine group exist or not
func (*LogProject) CreateConfig ¶
func (p *LogProject) CreateConfig(c *LogConfig) (err error)
CreateConfig creates a new config in SLS.
func (*LogProject) CreateConfigString ¶
func (p *LogProject) CreateConfigString(c string) (err error)
CreateConfigString creates a new config in SLS.
func (*LogProject) CreateETLJob ¶
func (p *LogProject) CreateETLJob(j *ETLJob) error
CreateETLJob creates a new ETL job in SLS.
func (*LogProject) CreateEtlMeta ¶
func (p *LogProject) CreateEtlMeta(etlMeta *EtlMeta) (err error)
func (*LogProject) CreateLogStore ¶
func (p *LogProject) CreateLogStore(name string, ttl, shardCnt int, autoSplit bool, maxSplitShard int) error
CreateLogStore creates a new logstore in SLS, where name is logstore name, and ttl is time-to-live(in day) of logs, and shardCnt is the number of shards, and autoSplit is auto split, and maxSplitShard is the max number of shard.
func (*LogProject) CreateLogStoreV2 ¶
func (p *LogProject) CreateLogStoreV2(logstore *LogStore) error
CreateLogStoreV2 creates a new logstore in SLS
func (*LogProject) CreateMachineGroup ¶
func (p *LogProject) CreateMachineGroup(m *MachineGroup) error
CreateMachineGroup creates a new machine group in SLS.
func (*LogProject) DeleteConfig ¶
func (p *LogProject) DeleteConfig(name string) (err error)
DeleteConfig deletes a config according by config name.
func (*LogProject) DeleteETLJob ¶
func (p *LogProject) DeleteETLJob(name string) error
DeleteETLJob deletes a job according to job name.
func (*LogProject) DeleteEtlMeta ¶
func (p *LogProject) DeleteEtlMeta(etlMetaName, etlMetaKey string) (err error)
func (*LogProject) DeleteLogStore ¶
func (p *LogProject) DeleteLogStore(name string) (err error)
DeleteLogStore deletes a logstore according by logstore name.
func (*LogProject) DeleteMachineGroup ¶
func (p *LogProject) DeleteMachineGroup(name string) (err error)
DeleteMachineGroup deletes machine group according machine group name.
func (*LogProject) GetAppliedConfigs ¶
func (p *LogProject) GetAppliedConfigs(groupName string) (confNames []string, err error)
GetAppliedConfigs returns applied config names list according machine group name groupName.
func (*LogProject) GetAppliedMachineGroups ¶
func (p *LogProject) GetAppliedMachineGroups(confName string) (groupNames []string, err error)
GetAppliedMachineGroups returns applied machine group names list according config name.
func (*LogProject) GetConfig ¶
func (p *LogProject) GetConfig(name string) (c *LogConfig, err error)
GetConfig returns config according by config name.
func (*LogProject) GetConfigString ¶
func (p *LogProject) GetConfigString(name string) (c string, err error)
GetConfigString returns config according by config name.
func (*LogProject) GetETLJob ¶
func (p *LogProject) GetETLJob(name string) (*ETLJob, error)
GetETLJob returns ETL job according to job name.
func (*LogProject) GetEtlMeta ¶
func (p *LogProject) GetEtlMeta(etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error)
func (*LogProject) GetLogStore ¶
func (p *LogProject) GetLogStore(name string) (*LogStore, error)
GetLogStore returns logstore according by logstore name.
func (*LogProject) GetMachineGroup ¶
func (p *LogProject) GetMachineGroup(name string) (m *MachineGroup, err error)
GetMachineGroup retruns machine group according by machine group name.
func (*LogProject) ListConfig ¶
func (p *LogProject) ListConfig(offset, size int) (cfgNames []string, total int, err error)
ListConfig returns config names list and the total number of configs. The offset starts from 0 and the size is the max number of configs could be returned.
func (*LogProject) ListETLJobs ¶
func (p *LogProject) ListETLJobs() ([]string, error)
ListETLJobs returns all job names of project.
func (*LogProject) ListEtlMeta ¶
func (*LogProject) ListEtlMetaName ¶
func (*LogProject) ListEtlMetaWithTag ¶
func (*LogProject) ListLogStore ¶
func (p *LogProject) ListLogStore() ([]string, error)
ListLogStore returns all logstore names of project p.
func (*LogProject) ListMachineGroup ¶
func (p *LogProject) ListMachineGroup(offset, size int) (m []string, total int, err error)
ListMachineGroup returns machine group name list and the total number of machine groups. The offset starts from 0 and the size is the max number of machine groups could be returned.
func (*LogProject) RemoveConfigFromMachineGroup ¶
func (p *LogProject) RemoveConfigFromMachineGroup(confName, groupName string) (err error)
RemoveConfigFromMachineGroup removes config from machine group.
func (*LogProject) UpdateConfig ¶
func (p *LogProject) UpdateConfig(c *LogConfig) (err error)
UpdateConfig updates a config.
func (*LogProject) UpdateConfigString ¶
func (p *LogProject) UpdateConfigString(configName, c string) (err error)
UpdateConfigString updates a config.
func (*LogProject) UpdateETLJob ¶
func (p *LogProject) UpdateETLJob(name string, job *ETLJob) error
UpdateETLJob updates an ETL job according to job name, Not all fields of ETLJob can be updated
func (*LogProject) UpdateEtlMeta ¶
func (p *LogProject) UpdateEtlMeta(etlMeta *EtlMeta) (err error)
func (*LogProject) UpdateLogStore ¶
func (p *LogProject) UpdateLogStore(name string, ttl, shardCnt int) (err error)
UpdateLogStore updates a logstore according by logstore name, obviously we can't modify the logstore name itself.
func (*LogProject) UpdateLogStoreV2 ¶
func (p *LogProject) UpdateLogStoreV2(logstore *LogStore) (err error)
UpdateLogStoreV2 updates a logstore according by logstore name obviously we can't modify the logstore name itself.
func (*LogProject) UpdateMachineGroup ¶
func (p *LogProject) UpdateMachineGroup(m *MachineGroup) (err error)
UpdateMachineGroup updates a machine group.
func (*LogProject) WithRequestTimeout ¶
func (p *LogProject) WithRequestTimeout(timeout time.Duration) *LogProject
WithRequestTimeout with custom timeout for a request
func (*LogProject) WithRetryTimeout ¶
func (p *LogProject) WithRetryTimeout(timeout time.Duration) *LogProject
WithRetryTimeout with custom timeout for a operation each operation may send one or more HTTP requests in case of retry required.
func (*LogProject) WithToken ¶
func (p *LogProject) WithToken(token string) (*LogProject, error)
WithToken add token parameter
type LogStore ¶
type LogStore struct { Name string `json:"logstoreName"` TTL int `json:"ttl"` ShardCount int `json:"shardCount"` WebTracking bool `json:"enable_tracking"` AutoSplit bool `json:"autoSplit"` MaxSplitShard int `json:"maxSplitShard"` AppendMeta bool `json:"appendMeta"` CreateTime uint32 `json:"createTime,omitempty"` LastModifyTime uint32 `json:"lastModifyTime,omitempty"` // contains filtered or unexported fields }
LogStore defines LogStore struct
func NewLogStore ¶
func NewLogStore(logStoreName string, project *LogProject) (*LogStore, error)
NewLogStore ...
func (*LogStore) CheckIndexExist ¶
CheckIndexExist check index exist or not
func (*LogStore) CreateIndexString ¶
CreateIndexString ...
func (*LogStore) CreateShipper ¶
CreateShipper ...
func (*LogStore) DeleteShipper ¶
DeleteShipper ...
func (*LogStore) GetContextLogs ¶ added in v0.1.6
func (s *LogStore) GetContextLogs(backLines int32, forwardLines int32, packID string, packMeta string) (*GetContextLogsResponse, error)
GetContextLogs ...
func (*LogStore) GetCursor ¶
GetCursor gets log cursor of one shard specified by shardId. The from can be in three form: a) unix timestamp in seccond, b) "begin", c) "end". For more detail please read: https://help.aliyun.com/document_detail/29024.html
func (*LogStore) GetHistograms ¶
func (s *LogStore) GetHistograms(topic string, from int64, to int64, queryExp string) (*GetHistogramsResponse, error)
GetHistograms query logs with [from, to) time range
func (*LogStore) GetIndexString ¶
GetIndexString ...
func (*LogStore) GetLogs ¶
func (s *LogStore) GetLogs(topic string, from int64, to int64, queryExp string, maxLineNum int64, offset int64, reverse bool) (*GetLogsResponse, error)
GetLogs query logs with [from, to) time range
func (*LogStore) GetLogsBytes ¶
func (s *LogStore) GetLogsBytes(shardID int, cursor, endCursor string, logGroupMaxCount int) (out []byte, nextCursor string, err error)
GetLogsBytes gets logs binary data from shard specified by shardId according cursor and endCursor. The logGroupMaxCount is the max number of logGroup could be returned. The nextCursor is the next curosr can be used to read logs at next time.
func (*LogStore) GetShipper ¶
GetShipper ...
func (*LogStore) ListShards ¶
ListShards returns shard id list of this logstore.
func (*LogStore) PostLogStoreLogs ¶
PostLogStoreLogs put logs into Shard logstore by hashKey. The callers should transform user logs into LogGroup.
func (*LogStore) PullLogs ¶
func (s *LogStore) PullLogs(shardID int, cursor, endCursor string, logGroupMaxCount int) (gl *LogGroupList, nextCursor string, err error)
PullLogs gets logs from shard specified by shardId according cursor and endCursor. The logGroupMaxCount is the max number of logGroup could be returned. The nextCursor is the next cursor can be used to read logs at next time. @note if you want to pull logs continuous, set endCursor = ""
func (*LogStore) PutLogs ¶
PutLogs put logs into logstore. The callers should transform user logs into LogGroup.
func (*LogStore) SetPutLogCompressType ¶
SetPutLogCompressType set put log's compress type, default lz4
func (*LogStore) UpdateIndexString ¶
UpdateIndexString ...
func (*LogStore) UpdateShipper ¶
UpdateShipper ...
type LogTag ¶
type LogTag struct { Key *string `protobuf:"bytes,1,req,name=Key" json:"Key,omitempty"` Value *string `protobuf:"bytes,2,req,name=Value" json:"Value,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*LogTag) Descriptor ¶
func (*LogTag) ProtoMessage ¶
func (*LogTag) ProtoMessage()
type MachinGroupAttribute ¶
type MachinGroupAttribute struct { ExternalName string `json:"externalName"` TopicName string `json:"groupTopic"` }
MachinGroupAttribute defines machine group attribute
type Machine ¶
type Machine struct { IP string UniqueID string `json:"machine-uniqueid"` UserdefinedID string `json:"userdefined-id"` }
Machine defines machine struct
type MachineGroup ¶
type MachineGroup struct { Name string `json:"groupName"` Type string `json:"groupType"` MachineIDType string `json:"machineIdentifyType"` MachineIDList []string `json:"machineList"` Attribute MachinGroupAttribute `json:"groupAttribute"` CreateTime uint32 `json:"createTime,omitempty"` LastModifyTime uint32 `json:"lastModifyTime,omitempty"` }
MachineGroup defines machine group
type MachineList ¶
MachineList defines machine list
type Notification ¶
type OSSShipperConfig ¶
type OSSShipperConfig struct { OssBucket string `json:"ossBucket"` OssPrefix string `json:"ossPrefix"` RoleArn string `json:"roleArn"` BufferInterval int `json:"bufferInterval"` BufferSize int `json:"bufferSize"` CompressType string `json:"compressType"` PathFormat string `json:"pathFormat"` Format string `json:"format"` }
type OutputDetail ¶
type OutputDetail struct { ProjectName string `json:"projectName"` LogStoreName string `json:"logstoreName"` }
OutputDetail defines output
type PluginInputItem ¶
type PluginInputItem struct { Type string `json:"type"` Detail PluginInterface `json:"detail"` }
func CreatePluginInputItem ¶
func CreatePluginInputItem(t string, detail PluginInterface) *PluginInputItem
type PluginInterface ¶
type PluginInterface interface { }
type PluginLogConfigInputDetail ¶
type PluginLogConfigInputDetail struct { CommonConfigInputDetail PluginDetail LogConfigPluginInput `json:"plugin"` }
PluginLogConfigInputDetail plugin log config, eg: docker stdout, binlog, mysql, http...
func ConvertToPluginLogConfigInputDetail ¶
func ConvertToPluginLogConfigInputDetail(detail InputDetailInterface) (*PluginLogConfigInputDetail, bool)
type RegexConfigInputDetail ¶
type RegexConfigInputDetail struct { LocalFileConfigInputDetail Key []string `json:"key"` LogBeginRegex string `json:"logBeginRegex"` Regex string `json:"regex"` }
RegexConfigInputDetail regex log config
func ConvertToRegexConfigInputDetail ¶
func ConvertToRegexConfigInputDetail(detail InputDetailInterface) (*RegexConfigInputDetail, bool)
type SavedSearch ¶
type SavedSearch struct { SavedSearchName string `json:"savedsearchName"` SearchQuery string `json:"searchQuery"` Logstore string `json:"logstore"` Topic string `json:"topic"` DisplayName string `json:"displayName"` }
SavedSearch ...
type SensitiveKey ¶
type Shard ¶
type Shard struct { ShardID int `json:"shardID"` Status string `json:"status"` InclusiveBeginKey string `json:"inclusiveBeginKey"` ExclusiveBeginKey string `json:"exclusiveEndKey"` CreateTime int `json:"createTime"` }
Shard defines shard struct
type Shipper ¶
type Shipper struct { ShipperName string `json:"shipperName"` TargetType string `json:"targetType"` RawTargetConfiguration json.RawMessage `json:"targetConfiguration"` TargetConfiguration interface{} `json:"-"` }
func (*Shipper) MarshalJSON ¶
func (*Shipper) UnmarshalJSON ¶
type SingleHistogram ¶
type SingleHistogram struct { Progress string `json:"progress"` Count int64 `json:"count"` From int64 `json:"from"` To int64 `json:"to"` }
GetHistogramsResponse defines response from GetHistograms call
type SlsLogPackage ¶
type SlsLogPackage struct { Data []byte `protobuf:"bytes,1,req,name=data" json:"data,omitempty"` UncompressSize *int32 `protobuf:"varint,2,opt,name=uncompress_size,json=uncompressSize" json:"uncompress_size,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*SlsLogPackage) Descriptor ¶
func (*SlsLogPackage) Descriptor() ([]byte, []int)
func (*SlsLogPackage) GetData ¶
func (m *SlsLogPackage) GetData() []byte
func (*SlsLogPackage) GetUncompressSize ¶
func (m *SlsLogPackage) GetUncompressSize() int32
func (*SlsLogPackage) Marshal ¶
func (m *SlsLogPackage) Marshal() (dAtA []byte, err error)
func (*SlsLogPackage) ProtoMessage ¶
func (*SlsLogPackage) ProtoMessage()
func (*SlsLogPackage) Reset ¶
func (m *SlsLogPackage) Reset()
func (*SlsLogPackage) Size ¶
func (m *SlsLogPackage) Size() (n int)
func (*SlsLogPackage) String ¶
func (m *SlsLogPackage) String() string
func (*SlsLogPackage) Unmarshal ¶
func (m *SlsLogPackage) Unmarshal(dAtA []byte) error
type SlsLogPackageList ¶
type SlsLogPackageList struct { Packages []*SlsLogPackage `protobuf:"bytes,1,rep,name=packages" json:"packages,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*SlsLogPackageList) Descriptor ¶
func (*SlsLogPackageList) Descriptor() ([]byte, []int)
func (*SlsLogPackageList) GetPackages ¶
func (m *SlsLogPackageList) GetPackages() []*SlsLogPackage
func (*SlsLogPackageList) Marshal ¶
func (m *SlsLogPackageList) Marshal() (dAtA []byte, err error)
func (*SlsLogPackageList) MarshalTo ¶
func (m *SlsLogPackageList) MarshalTo(dAtA []byte) (int, error)
func (*SlsLogPackageList) ProtoMessage ¶
func (*SlsLogPackageList) ProtoMessage()
func (*SlsLogPackageList) Reset ¶
func (m *SlsLogPackageList) Reset()
func (*SlsLogPackageList) Size ¶
func (m *SlsLogPackageList) Size() (n int)
func (*SlsLogPackageList) String ¶
func (m *SlsLogPackageList) String() string
func (*SlsLogPackageList) Unmarshal ¶
func (m *SlsLogPackageList) Unmarshal(dAtA []byte) error
type SourceConfig ¶
type SourceConfig struct {
LogstoreName string `json:"logstoreName"`
}
type StreamLogConfigInputDetail ¶
type StreamLogConfigInputDetail struct { CommonConfigInputDetail Tag string `json:"tag"` }
StreamLogConfigInputDetail syslog config
func ConvertToStreamLogConfigInputDetail ¶
func ConvertToStreamLogConfigInputDetail(detail InputDetailInterface) (*StreamLogConfigInputDetail, bool)
type TokenAutoUpdateClient ¶
type TokenAutoUpdateClient struct {
// contains filtered or unexported fields
}
func (*TokenAutoUpdateClient) ApplyConfigToMachineGroup ¶
func (c *TokenAutoUpdateClient) ApplyConfigToMachineGroup(project string, confName, groupName string) (err error)
func (*TokenAutoUpdateClient) CheckConfigExist ¶
func (c *TokenAutoUpdateClient) CheckConfigExist(project string, config string) (ok bool, err error)
func (*TokenAutoUpdateClient) CheckLogstoreExist ¶
func (c *TokenAutoUpdateClient) CheckLogstoreExist(project string, logstore string) (ok bool, err error)
func (*TokenAutoUpdateClient) CheckMachineGroupExist ¶
func (c *TokenAutoUpdateClient) CheckMachineGroupExist(project string, machineGroup string) (ok bool, err error)
func (*TokenAutoUpdateClient) CheckProjectExist ¶
func (c *TokenAutoUpdateClient) CheckProjectExist(name string) (ok bool, err error)
func (*TokenAutoUpdateClient) Close ¶
func (c *TokenAutoUpdateClient) Close() error
func (*TokenAutoUpdateClient) CreateAlert ¶
func (c *TokenAutoUpdateClient) CreateAlert(project string, alert *Alert) (err error)
func (*TokenAutoUpdateClient) CreateChart ¶
func (c *TokenAutoUpdateClient) CreateChart(project, dashboardName string, chart Chart) (err error)
func (*TokenAutoUpdateClient) CreateConfig ¶
func (c *TokenAutoUpdateClient) CreateConfig(project string, config *LogConfig) (err error)
func (*TokenAutoUpdateClient) CreateConfigString ¶
func (c *TokenAutoUpdateClient) CreateConfigString(project string, config string) (err error)
func (*TokenAutoUpdateClient) CreateDashboard ¶
func (c *TokenAutoUpdateClient) CreateDashboard(project string, dashboard Dashboard) (err error)
func (*TokenAutoUpdateClient) CreateDashboardString ¶
func (c *TokenAutoUpdateClient) CreateDashboardString(project string, dashboardStr string) (err error)
func (*TokenAutoUpdateClient) CreateEtlMeta ¶
func (c *TokenAutoUpdateClient) CreateEtlMeta(project string, etlMeta *EtlMeta) (err error)
func (*TokenAutoUpdateClient) CreateIndex ¶
func (c *TokenAutoUpdateClient) CreateIndex(project, logstore string, index Index) (err error)
func (*TokenAutoUpdateClient) CreateIndexString ¶
func (c *TokenAutoUpdateClient) CreateIndexString(project, logstore string, index string) (err error)
func (*TokenAutoUpdateClient) CreateLogStore ¶
func (*TokenAutoUpdateClient) CreateLogStoreV2 ¶
func (c *TokenAutoUpdateClient) CreateLogStoreV2(project string, logstore *LogStore) (err error)
func (*TokenAutoUpdateClient) CreateMachineGroup ¶
func (c *TokenAutoUpdateClient) CreateMachineGroup(project string, m *MachineGroup) (err error)
func (*TokenAutoUpdateClient) CreateProject ¶
func (c *TokenAutoUpdateClient) CreateProject(name, description string) (prj *LogProject, err error)
func (*TokenAutoUpdateClient) CreateSavedSearch ¶
func (c *TokenAutoUpdateClient) CreateSavedSearch(project string, savedSearch *SavedSearch) (err error)
func (*TokenAutoUpdateClient) DeleteAlert ¶
func (c *TokenAutoUpdateClient) DeleteAlert(project string, alertName string) (err error)
func (*TokenAutoUpdateClient) DeleteChart ¶
func (c *TokenAutoUpdateClient) DeleteChart(project, dashboardName, chartName string) (err error)
func (*TokenAutoUpdateClient) DeleteConfig ¶
func (c *TokenAutoUpdateClient) DeleteConfig(project string, config string) (err error)
func (*TokenAutoUpdateClient) DeleteDashboard ¶
func (c *TokenAutoUpdateClient) DeleteDashboard(project, name string) (err error)
func (*TokenAutoUpdateClient) DeleteEtlMeta ¶
func (c *TokenAutoUpdateClient) DeleteEtlMeta(project string, etlMetaName, etlMetaKey string) (err error)
func (*TokenAutoUpdateClient) DeleteIndex ¶
func (c *TokenAutoUpdateClient) DeleteIndex(project, logstore string) (err error)
func (*TokenAutoUpdateClient) DeleteLogStore ¶
func (c *TokenAutoUpdateClient) DeleteLogStore(project string, logstore string) (err error)
func (*TokenAutoUpdateClient) DeleteMachineGroup ¶
func (c *TokenAutoUpdateClient) DeleteMachineGroup(project string, machineGroup string) (err error)
func (*TokenAutoUpdateClient) DeleteProject ¶
func (c *TokenAutoUpdateClient) DeleteProject(name string) (err error)
func (*TokenAutoUpdateClient) DeleteSavedSearch ¶
func (c *TokenAutoUpdateClient) DeleteSavedSearch(project string, savedSearchName string) (err error)
func (*TokenAutoUpdateClient) DisableAlert ¶
func (c *TokenAutoUpdateClient) DisableAlert(project string, alertName string) (err error)
func (*TokenAutoUpdateClient) EnableAlert ¶
func (c *TokenAutoUpdateClient) EnableAlert(project string, alertName string) (err error)
func (*TokenAutoUpdateClient) GetAlert ¶
func (c *TokenAutoUpdateClient) GetAlert(project string, alertName string) (alert *Alert, err error)
func (*TokenAutoUpdateClient) GetAppliedConfigs ¶
func (c *TokenAutoUpdateClient) GetAppliedConfigs(project string, groupName string) (confNames []string, err error)
func (*TokenAutoUpdateClient) GetAppliedMachineGroups ¶
func (c *TokenAutoUpdateClient) GetAppliedMachineGroups(project string, confName string) (groupNames []string, err error)
func (*TokenAutoUpdateClient) GetChart ¶
func (c *TokenAutoUpdateClient) GetChart(project, dashboardName, chartName string) (chart *Chart, err error)
func (*TokenAutoUpdateClient) GetConfig ¶
func (c *TokenAutoUpdateClient) GetConfig(project string, config string) (logConfig *LogConfig, err error)
func (*TokenAutoUpdateClient) GetConfigString ¶
func (c *TokenAutoUpdateClient) GetConfigString(project string, config string) (logConfig string, err error)
func (*TokenAutoUpdateClient) GetDashboard ¶
func (c *TokenAutoUpdateClient) GetDashboard(project, name string) (dashboard *Dashboard, err error)
func (*TokenAutoUpdateClient) GetDashboardString ¶
func (c *TokenAutoUpdateClient) GetDashboardString(project, name string) (dashboard string, err error)
func (*TokenAutoUpdateClient) GetEtlMeta ¶
func (c *TokenAutoUpdateClient) GetEtlMeta(project string, etlMetaName, etlMetaKey string) (etlMeta *EtlMeta, err error)
func (*TokenAutoUpdateClient) GetHistograms ¶
func (c *TokenAutoUpdateClient) GetHistograms(project, logstore string, topic string, from int64, to int64, queryExp string) (h *GetHistogramsResponse, err error)
func (*TokenAutoUpdateClient) GetIndex ¶
func (c *TokenAutoUpdateClient) GetIndex(project, logstore string) (index *Index, err error)
func (*TokenAutoUpdateClient) GetIndexString ¶
func (c *TokenAutoUpdateClient) GetIndexString(project, logstore string) (index string, err error)
func (*TokenAutoUpdateClient) GetLogStore ¶
func (c *TokenAutoUpdateClient) GetLogStore(project string, logstore string) (logstoreRst *LogStore, err error)
func (*TokenAutoUpdateClient) GetLogsBytes ¶
func (*TokenAutoUpdateClient) GetMachineGroup ¶
func (c *TokenAutoUpdateClient) GetMachineGroup(project string, machineGroup string) (m *MachineGroup, err error)
func (*TokenAutoUpdateClient) GetProject ¶
func (c *TokenAutoUpdateClient) GetProject(name string) (prj *LogProject, err error)
func (*TokenAutoUpdateClient) GetSavedSearch ¶
func (c *TokenAutoUpdateClient) GetSavedSearch(project string, savedSearchName string) (savedSearch *SavedSearch, err error)
func (*TokenAutoUpdateClient) ListConfig ¶
func (*TokenAutoUpdateClient) ListDashboard ¶
func (*TokenAutoUpdateClient) ListEtlMeta ¶
func (*TokenAutoUpdateClient) ListEtlMetaName ¶
func (*TokenAutoUpdateClient) ListEtlMetaWithTag ¶
func (*TokenAutoUpdateClient) ListLogStore ¶
func (c *TokenAutoUpdateClient) ListLogStore(project string) (logstoreList []string, err error)
func (*TokenAutoUpdateClient) ListMachineGroup ¶
func (*TokenAutoUpdateClient) ListMachines ¶
func (c *TokenAutoUpdateClient) ListMachines(project, machineGroupName string) (ms []*Machine, total int, err error)
func (*TokenAutoUpdateClient) ListProject ¶
func (c *TokenAutoUpdateClient) ListProject() (projectNames []string, err error)
func (*TokenAutoUpdateClient) ListProjectV2 ¶
func (c *TokenAutoUpdateClient) ListProjectV2(offset, size int) (projects []LogProject, count, total int, err error)
func (*TokenAutoUpdateClient) ListSavedSearch ¶
func (*TokenAutoUpdateClient) ListShards ¶
func (c *TokenAutoUpdateClient) ListShards(project, logstore string) (shardIDs []*Shard, err error)
func (*TokenAutoUpdateClient) MergeShards ¶
func (c *TokenAutoUpdateClient) MergeShards(project, logstore string, shardID int) (shards []*Shard, err error)
func (*TokenAutoUpdateClient) PostLogStoreLogs ¶
func (c *TokenAutoUpdateClient) PostLogStoreLogs(project, logstore string, lg *LogGroup, hashKey *string) (err error)
func (*TokenAutoUpdateClient) PullLogs ¶
func (c *TokenAutoUpdateClient) PullLogs(project, logstore string, shardID int, cursor, endCursor string, logGroupMaxCount int) (gl *LogGroupList, nextCursor string, err error)
func (*TokenAutoUpdateClient) PutLogs ¶
func (c *TokenAutoUpdateClient) PutLogs(project, logstore string, lg *LogGroup) (err error)
func (*TokenAutoUpdateClient) PutLogsWithCompressType ¶
func (c *TokenAutoUpdateClient) PutLogsWithCompressType(project, logstore string, lg *LogGroup, compressType int) (err error)
func (*TokenAutoUpdateClient) PutRawLogWithCompressType ¶
func (c *TokenAutoUpdateClient) PutRawLogWithCompressType(project, logstore string, rawLogData []byte, compressType int) (err error)
PutRawLogWithCompressType put raw log data to log service, no marshal
func (*TokenAutoUpdateClient) RemoveConfigFromMachineGroup ¶
func (c *TokenAutoUpdateClient) RemoveConfigFromMachineGroup(project string, confName, groupName string) (err error)
func (*TokenAutoUpdateClient) ResetAccessKeyToken ¶
func (c *TokenAutoUpdateClient) ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string)
func (*TokenAutoUpdateClient) SplitShard ¶
func (*TokenAutoUpdateClient) UpdateAlert ¶
func (c *TokenAutoUpdateClient) UpdateAlert(project string, alert *Alert) (err error)
func (*TokenAutoUpdateClient) UpdateChart ¶
func (c *TokenAutoUpdateClient) UpdateChart(project, dashboardName string, chart Chart) (err error)
func (*TokenAutoUpdateClient) UpdateConfig ¶
func (c *TokenAutoUpdateClient) UpdateConfig(project string, config *LogConfig) (err error)
func (*TokenAutoUpdateClient) UpdateConfigString ¶
func (c *TokenAutoUpdateClient) UpdateConfigString(project string, configName, configDetail string) (err error)
func (*TokenAutoUpdateClient) UpdateDashboard ¶
func (c *TokenAutoUpdateClient) UpdateDashboard(project string, dashboard Dashboard) (err error)
func (*TokenAutoUpdateClient) UpdateDashboardString ¶
func (c *TokenAutoUpdateClient) UpdateDashboardString(project string, dashboardName, dashboardStr string) (err error)
func (*TokenAutoUpdateClient) UpdateEtlMeta ¶
func (c *TokenAutoUpdateClient) UpdateEtlMeta(project string, etlMeta *EtlMeta) (err error)
func (*TokenAutoUpdateClient) UpdateIndex ¶
func (c *TokenAutoUpdateClient) UpdateIndex(project, logstore string, index Index) (err error)
func (*TokenAutoUpdateClient) UpdateIndexString ¶
func (c *TokenAutoUpdateClient) UpdateIndexString(project, logstore string, index string) (err error)
func (*TokenAutoUpdateClient) UpdateLogStore ¶
func (c *TokenAutoUpdateClient) UpdateLogStore(project string, logstore string, ttl, shardCnt int) (err error)
func (*TokenAutoUpdateClient) UpdateLogStoreV2 ¶
func (c *TokenAutoUpdateClient) UpdateLogStoreV2(project string, logstore *LogStore) (err error)
func (*TokenAutoUpdateClient) UpdateMachineGroup ¶
func (c *TokenAutoUpdateClient) UpdateMachineGroup(project string, m *MachineGroup) (err error)
func (*TokenAutoUpdateClient) UpdateSavedSearch ¶
func (c *TokenAutoUpdateClient) UpdateSavedSearch(project string, savedSearch *SavedSearch) (err error)
type TriggerConfig ¶
Source Files ¶
- client.go
- client_alert.go
- client_consumer.go
- client_dashboard.go
- client_interface.go
- client_project.go
- client_request.go
- client_store.go
- config.go
- error_code.go
- errors.go
- etl_job.go
- etl_job_project.go
- etl_meta.go
- log.pb.go
- log_config.go
- log_config_plugin.go
- log_project.go
- log_store.go
- log_store_shiper.go
- logger.go
- machine_group.go
- model.go
- oss_shipper_config.go
- request.go
- retry.go
- signature.go
- token_auto_update_client.go