Versions in this module Expand all Collapse all v0 v0.1.90 Dec 6, 2024 Changes in this version + const Delimiter + const IllegalStateException + const TimeoutExecption + func AdjustHash(shardhash string, buckets int) (string, error) + func AdjustHashOld(shardhash string, buckets int) (string, error) + func BitCount(buckets int) (int, error) + func FillZero(x string, n int) string + func GenerateLog(logTime uint32, addLogMap map[string]string) *sls.Log + func GetLogListSize(logList []*sls.Log) int + func GetLogSizeCalculate(log *sls.Log) int + func GetTimeMs(t int64) int64 + func Md5ToBin(md5 string) string + func ToMd5(name string) string + type Attempt struct + ErrorCode string + ErrorMessage string + LastAttemptCostMs int64 + RequestId string + Success bool + TimeStampMs int64 + type CallBack interface + Fail func(result *Result) + Success func(result *Result) + type IoThreadPool struct + type IoWorker struct + type LogAccumulator struct + type LogStorePackIdGenerator struct + type Mover struct + type NullWriter struct + func (u NullWriter) Write(p []byte) (n int, err error) + type PackIdGenerator struct + func (g *PackIdGenerator) GeneratePackId(project, logstore string) string + type Producer struct + func InitProducer(producerConfig *ProducerConfig) *Producer + func NewProducer(producerConfig *ProducerConfig) (*Producer, error) + func (producer *Producer) Close(timeoutMs int64) error + func (producer *Producer) HashSendLog(project, logstore, shardHash, topic, source string, log *sls.Log) error + func (producer *Producer) HashSendLogList(project, logstore, shardHash, topic, source string, logList []*sls.Log) (err error) + func (producer *Producer) HashSendLogListWithCallBack(project, logstore, shardHash, topic, source string, logList []*sls.Log, ...) (err error) + func (producer *Producer) HashSendLogWithCallBack(project, logstore, shardHash, topic, source string, log *sls.Log, ...) error + func (producer *Producer) SafeClose() + func (producer *Producer) SendLog(project, logstore, topic, source string, log *sls.Log) error + func (producer *Producer) SendLogList(project, logstore, topic, source string, logList []*sls.Log) (err error) + func (producer *Producer) SendLogListWithCallBack(project, logstore, topic, source string, logList []*sls.Log, callback CallBack) (err error) + func (producer *Producer) SendLogWithCallBack(project, logstore, topic, source string, log *sls.Log, callback CallBack) error + func (producer *Producer) Start() + type ProducerBatch struct + type ProducerConfig struct + AccessKeyID string + AccessKeySecret string + AdjustShargHash bool + AllowLogLevel string + AuthVersion sls.AuthVersionType + BaseRetryBackoffMs int64 + Buckets int + CompressType int + CredentialsProvider sls.CredentialsProvider + Endpoint string + GeneratePackId bool + HTTPClient *http.Client + IsJsonType bool + LingerMs int64 + LogCompress bool + LogFileName string + LogMaxBackups int + LogMaxSize int + LogTags []*sls.LogTag + Logger bool + MaxBatchCount int + MaxBatchSize int64 + MaxBlockSec int + MaxIoWorkerCount int64 + MaxReservedAttempts int + MaxRetryBackoffMs int64 + NoRetryStatusCodeList []int + Region string + Retries int + StsTokenShutDown chan struct{} + TotalSizeLnBytes int64 + UpdateStsToken UpdateStsTokenFunc + UseMetricStoreURL bool + UserAgent string + func GetDefaultProducerConfig() *ProducerConfig + type Result struct + func (result *Result) GetErrorCode() string + func (result *Result) GetErrorMessage() string + func (result *Result) GetLastAttemptCostMs() int64 + func (result *Result) GetRequestId() string + func (result *Result) GetReservedAttempts() []*Attempt + func (result *Result) GetTimeStampMs() int64 + func (result *Result) IsSuccessful() bool + type RetryQueue struct + func (retryQueue *RetryQueue) Len() int + func (retryQueue *RetryQueue) Less(i, j int) bool + func (retryQueue *RetryQueue) Pop() interface{} + func (retryQueue *RetryQueue) Push(x interface{}) + func (retryQueue *RetryQueue) Swap(i, j int) + type UpdateStsTokenFunc = func() (accessKeyID, accessKeySecret, securityToken string, expireTime time.Time, ...)