Documentation
¶
Index ¶
- Constants
- func CreateProductLogstore(region, project, logstore, product, lang string, hotTTL int) error
- func GetAnnotationByError(projectInfo map[string]string, customError *CustomError) map[string]string
- func GetAnnotationByObject(config *AliyunLogConfigSpec, project, logstore, product, configName string, ...) map[string]string
- func PKCS5UnPadding(origData []byte) []byte
- func UpdateTokenFunction() (accessKeyID, accessKeySecret, securityToken string, expireTime time.Time, ...)
- type AKInfo
- type AliyunLogConfigDetail
- type AliyunLogConfigSpec
- type CustomError
- type Manager
- type SDKError
- type SecurityTokenResult
Constants ¶
View Source
const ( AddOnTokenConfigPathEnv = "ALIYUN_LOG_ADDON_TOKEN_PATH" //nolint:gosec DefaultAddOnTokenConfigPath = "/var/addon/token-config" //nolint:gosec )
View Source
const ( QueryMode string = "query" StandardMode string = "standard" NoneTelemetryType string = "None" MetricsTelemetryType string = "Metrics" TagLogtailConfig string = "logtailconfig" TagMachinegroup string = "machinegroup" SlsLogtailChannalKey string = "sls.logtail.channel" SlsLogtailChannalEnv string = "ENV" SlsMachinegroupDeployModeKey string = "sls.machinegroup.deploy_mode" SlsMachinegroupDeployModeDeamonset string = "deamonset" )
Variables ¶
This section is empty.
Functions ¶
func CreateProductLogstore ¶
CreateProductLogstore create product logstore
"cn-hangzhou" "test-hangzhou-project" "audit-logstore" "k8s-audit" "cn"
func GetAnnotationByError ¶ added in v1.1.2
func GetAnnotationByError(projectInfo map[string]string, customError *CustomError) map[string]string
func GetAnnotationByObject ¶ added in v1.1.2
func GetAnnotationByObject(config *AliyunLogConfigSpec, project, logstore, product, configName string, rawConfig bool) map[string]string
func PKCS5UnPadding ¶
Types ¶
type AKInfo ¶
type AKInfo struct {
AccessKeyID string `json:"access.key.id"`
AccessKeySecret string `json:"access.key.secret"`
SecurityToken string `json:"security.token"`
Expiration string `json:"expiration"`
Keyring string `json:"keyring"`
}
AKInfo ...
type AliyunLogConfigDetail ¶
type AliyunLogConfigDetail struct {
ConfigName string `json:"configName"`
InputType string `json:"inputType"`
LogtailConfig map[string]interface{} `json:"inputDetail"`
}
AliyunLogConfigDetail logtail config detail
func (*AliyunLogConfigDetail) InitFromDockerInfo ¶
func (alcs *AliyunLogConfigDetail) InitFromDockerInfo(dockerInfo *helper.DockerInfoDetail, config string, configKeys []string, configValues []string) error
InitFromDockerInfo init AliyunLogConfigDetail from docker info with specific config name
type AliyunLogConfigSpec ¶
type AliyunLogConfigSpec struct {
Project string `json:"project"`
Logstore string `json:"logstore"`
ShardCount *int32 `json:"shardCount"`
LifeCycle *int32 `json:"lifeCycle"`
MachineGroups []string `json:"machineGroups"`
LogtailConfig AliyunLogConfigDetail `json:"logtailConfig"`
ContainerName string `json:"containerName"`
HashCode []byte `json:"hashCode"`
ErrorCount int `json:"errorCount"`
NextTryTime int64 `json:"nextTryTime"`
SimpleConfig bool `json:"simpleConfig"`
LastFetchTime int64 `json:"lastFetchTime"`
ProductCode string `json:"productCode"`
ProductLang string `json:"productLang"`
LogstoreMode string `json:"logstoreMode"`
LogstoreHotTTL *int32 `json:"logstoreHotTTL"`
LogstoreTelemetryType string `json:"logstoreTelemetryType"`
LogstoreAppendMeta bool `json:"logstoreAppendMeta"`
LogstoreMaxSplitShard *int32 `json:"logstoreMaxSplitShard"`
LogstoreEnableTracking bool `json:"logstoreEnableTracking"`
LogstoreAutoSplit bool `json:"logstoreAutoSplit"`
LogstoreEncryptConf aliyunlog.EncryptConf `json:"logstoreEncryptConf"`
ConfigTags map[string]string `json:"configTags"`
}
AliyunLogConfigSpec logtail config struct for wrapper
func (*AliyunLogConfigSpec) Key ¶
func (alcs *AliyunLogConfigSpec) Key() string
Key return the unique key
type CustomError ¶ added in v1.1.2
func CustomErrorFromPopError ¶ added in v1.1.2
func CustomErrorFromPopError(popError error) *CustomError
func CustomErrorFromSlsSDKError ¶ added in v1.1.2
func CustomErrorFromSlsSDKError(slsSDKError error) *CustomError
func CustomErrorNew ¶ added in v1.1.2
func CustomErrorNew(code string, requestID string, msg string) *CustomError
func (*CustomError) CustomError ¶ added in v1.1.2
func (e *CustomError) CustomError() string
type Manager ¶
type Manager struct {
AllConfigMap map[string]*AliyunLogConfigSpec
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.