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 ¶ added in v1.2.2
func ConvertDatas(ins []map[string]interface{}) []Data
func ConvertDatasBack ¶ added in v1.2.2
func ConvertDatasBack(ins []Data) []map[string]interface{}
func RegisterConstructor ¶ added in v1.5.0
func RegisterConstructor(typ string, c Constructor)
RegisterConstructor adds a new constructor for a given type of reader.
func SplitDataWithSplitSize ¶ added in v1.5.4
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 ¶ added in v1.5.1
type Registry ¶ added in v1.5.0
type Registry struct {
// contains filtered or unexported fields
}
SenderRegistry sender 的工厂类。可以注册自定义sender
func NewRegistry ¶ added in v1.5.0
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 ¶ added in v1.5.1
type SkipDeepCopySender interface { // SkipDeepCopy 需要返回值是因为如果一个 sender 封装了其它 sender,需要根据实际封装的类型返回是否忽略深度拷贝 SkipDeepCopy() bool }
SkipDeepCopySender 表示该 sender 不会对传入数据进行污染,凡是有次保证的 sender 需要实现该接口提升发送效率
type StatsSender ¶ added in v1.3.0
type TokenRefreshable ¶ added in v1.4.4
Click to show internal directories.
Click to hide internal directories.