mongodb

package
v1.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSender

func NewSender(conf conf.MapConf) (mongodbSender sender.Sender, err error)

NewMongodbAccSender mongodb accumulate sender constructor

Types

type Sender

type Sender struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

mongo sender Mongodb 根据UpdateKey 做对AccumulateKey $inc 累加的Sender

func (*Sender) Close

func (s *Sender) Close() error

func (*Sender) Name

func (s *Sender) Name() string

func (*Sender) Send

func (s *Sender) Send(datas []Data) (se error)

Send 依次尝试发送数据到mongodb,返回错误中包含所有写失败的数据 如果要保证每次send的原子性,必须保证datas长度为1,否则当程序宕机 总会出现丢失数据的问题

func (*Sender) SkipDeepCopy added in v1.5.1

func (*Sender) SkipDeepCopy() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL