Documentation ¶
Index ¶
- Constants
- func ConvertDatas(ins []map[string]interface{}) []Data
- func ConvertDatasBack(ins []Data) []map[string]interface{}
- func RegisterConstructor(typ string, c Constructor)
- func SplitData(data string) (valArray []string)
- func SplitDataWithSplitSize(data string, splitSize int64) (valArray []string)
- type Constructor
- type FtOption
- type FtSender
- func (ft *FtSender) Close() error
- func (ft *FtSender) Name() string
- func (ft *FtSender) RawSend(datas []string) error
- func (ft *FtSender) Reset() error
- func (ft *FtSender) Restore(info *StatsInfo)
- func (ft *FtSender) Send(datas []Data) error
- func (ft *FtSender) SkipDeepCopy() bool
- func (ft *FtSender) Stats() StatsInfo
- func (ft *FtSender) TokenRefresh(mapConf conf.MapConf) (err error)
- type RawSender
- type Registry
- type Sender
- type SkipDeepCopySender
- type StatsSender
- type TokenRefreshable
Constants ¶
View Source
const ( DefaultSplitSize = 64 * 1024 // 默认分割为 64 kb // TypeMarshalError 表示marshal出错 TypeMarshalError = reqerr.SendErrorType("Data Marshal failed") )
Variables ¶
This section is empty.
Functions ¶
func ConvertDatas ¶
func ConvertDatas(ins []map[string]interface{}) []Data
func ConvertDatasBack ¶
func ConvertDatasBack(ins []Data) []map[string]interface{}
func RegisterConstructor ¶
func RegisterConstructor(typ string, c Constructor)
RegisterConstructor adds a new constructor for a given type of reader.
func SplitDataWithSplitSize ¶
Types ¶
type FtSender ¶
type FtSender struct { BackupQueue queue.BackendQueue // contains filtered or unexported fields }
FtSender fault tolerance sender wrapper
func NewFtSender ¶
NewFtSender Fault tolerant sender constructor
func (*FtSender) SkipDeepCopy ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
SenderRegistry sender 的工厂类。可以注册自定义sender
func NewRegistry ¶
func NewRegistry() *Registry
type Sender ¶
type Sender interface { Name() string // send data, error if failed Send([]Data) error Close() error }
Sender send data to pandora, prometheus such different destinations
type SkipDeepCopySender ¶
type SkipDeepCopySender interface { // SkipDeepCopy 需要返回值是因为如果一个 sender 封装了其它 sender,需要根据实际封装的类型返回是否忽略深度拷贝 SkipDeepCopy() bool }
SkipDeepCopySender 表示该 sender 不会对传入数据进行污染,凡是有次保证的 sender 需要实现该接口提升发送效率
type StatsSender ¶
type TokenRefreshable ¶
Click to show internal directories.
Click to hide internal directories.