Documentation ¶
Index ¶
- Constants
- func GenerateLog(logTime int64, addLogMap map[string]string) *pb.Log
- func GetLogListSize(logList []*pb.Log) int
- func GetLogSize(log *pb.Log) int
- func GetTimeMs(t int64) int64
- func WithRecover(fn func())
- type Attempt
- type Batch
- type BatchKey
- type BatchLog
- type CallBack
- type Config
- type Dispatcher
- type Producer
- type Result
- type RetryQueue
- type Sender
- type ThreadPool
Constants ¶
View Source
const (
TimeoutException = "TimeoutException"
)
Variables ¶
This section is empty.
Functions ¶
func GetLogListSize ¶
func GetLogSize ¶
func WithRecover ¶
func WithRecover(fn func())
Types ¶
type Config ¶
type Config struct { TotalSizeLnBytes int64 MaxSenderCount int64 MaxBlockSec int MaxBatchSize int64 MaxBatchCount int LingerTime time.Duration Retries int MaxReservedAttempts int BaseRetryBackoffMs int64 MaxRetryBackoffMs int64 AdjustShardHashFlag bool ShardCount int NoRetryStatusCodeList []int common.LoggerConfig common.ClientConfig }
func GetDefaultProducerConfig ¶
func GetDefaultProducerConfig() *Config
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func (*Dispatcher) IsShutDown ¶ added in v1.0.158
func (dispatcher *Dispatcher) IsShutDown() bool
func (*Dispatcher) RetryQueueElegantQuit ¶
func (dispatcher *Dispatcher) RetryQueueElegantQuit()
type Producer ¶
type Producer interface { SendLog(shardHash, topic, source, filename string, log *pb.Log, callBack CallBack) error SendLogs(shardHash, topic, source, filename string, logs *pb.LogGroup, callBack CallBack) error ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string) Start() Close() ForceClose() }
func NewProducer ¶
type RetryQueue ¶
type RetryQueue struct {
// contains filtered or unexported fields
}
func (*RetryQueue) Len ¶
func (q *RetryQueue) Len() int
func (*RetryQueue) Less ¶
func (q *RetryQueue) Less(i, j int) bool
func (*RetryQueue) Pop ¶
func (q *RetryQueue) Pop() interface{}
func (*RetryQueue) Push ¶
func (q *RetryQueue) Push(x interface{})
func (*RetryQueue) Swap ¶
func (q *RetryQueue) Swap(i, j int)
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
func (*Sender) FailedCallback ¶
func (*Sender) IsShutDown ¶
type ThreadPool ¶
type ThreadPool struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.