Versions in this module Expand all Collapse all v0 v0.0.9 Nov 27, 2019 Changes in this version + const DynInc + const Dynamic + const Increment + const Static + func BSearch(records []*IncRecord, progress int64) int + type BaseInfo struct + Data map[container.MapKey]interface{} + DataVersion int + Name string + Progress int64 + type BaseReq struct + Name string + Progress int64 + Space string + type BaseRes struct + BaseInfo *BaseInfo + Status Status + type BiFrostStreamerCfg struct + BaseFilePath string + Interval int + IsOnline bool + IsSync bool + Logger log.BiLogger + Name string + NameSpace string + URI string + UserData interface{} + Version int + WriteFile bool + type BifrostService struct + StreamerManager *StreamerProviderManager + func NewBifrostServer(streamerManager *StreamerProviderManager) *BifrostService + func (bs *BifrostService) GetBase(ctx context.Context, req *BaseReq, res *BaseRes) error + func (bs *BifrostService) GetInc(ctx context.Context, req *IncReq, res *IncRes) error + type BifrostStreamer struct + func NewBiFrostStreamer(cfg *BiFrostStreamerCfg) *BifrostStreamer + func (bs *BifrostStreamer) GetContainer() container.Container + func (bs *BifrostStreamer) GetSchedInfo() *SchedInfo + func (bs *BifrostStreamer) HasNext() bool + func (bs *BifrostStreamer) Next() (container.DataMode, container.MapKey, interface{}, error) + func (bs *BifrostStreamer) SetContainer(container container.Container) + func (bs *BifrostStreamer) UpdateData(ctx context.Context) error + func (fs *BifrostStreamer) InfoStatus(s string) + func (fs *BifrostStreamer) WarnStatus(s string) + type DataParser interface + Parse func([]byte, interface{}) []ParserResult + type DefaultTextParser struct + func (*DefaultTextParser) Parse(data []byte, userData interface{}) []ParserResult + type GobCodec struct + func (c *GobCodec) Decode(data []byte, i interface{}) error + func (c *GobCodec) Encode(i interface{}) ([]byte, error) + type IncRecord struct + DataMode container.DataMode + MapKey container.MapKey + Progress int64 + Value interface{} + type IncReq struct + Batch int + Name string + Progress int64 + Space string + type IncRes struct + IncRecords []*IncRecord + Status Status + type LocalFileStreamer struct + func NewFileStreamer(cfg *LocalFileStreamerCfg) *LocalFileStreamer + func (fs *LocalFileStreamer) GetContainer() container.Container + func (fs *LocalFileStreamer) GetSchedInfo() *SchedInfo + func (fs *LocalFileStreamer) HasNext() bool + func (fs *LocalFileStreamer) Next() (container.DataMode, container.MapKey, interface{}, error) + func (fs *LocalFileStreamer) SetContainer(container container.Container) + func (fs *LocalFileStreamer) UpdateData(ctx context.Context) error + func (ms *LocalFileStreamer) InfoStatus(s string) + func (ms *LocalFileStreamer) WarnStatus(s string) + type LocalFileStreamerCfg struct + DataParser DataParser + Interval int + IsSync bool + Logger log.BiLogger + Name string + Path string + UpdatMode UpdatMode + UserData interface{} + type MongoStreamer struct + func NewMongoStreamer(mongoConfig *MongoStreamerCfg) (*MongoStreamer, error) + func (ms *MongoStreamer) GetContainer() container.Container + func (ms *MongoStreamer) GetSchedInfo() *SchedInfo + func (ms *MongoStreamer) HasNext() bool + func (ms *MongoStreamer) InfoStatus(s string) + func (ms *MongoStreamer) Next() (container.DataMode, container.MapKey, interface{}, error) + func (ms *MongoStreamer) SetContainer(container container.Container) + func (ms *MongoStreamer) UpdateData(ctx context.Context) error + func (ms *MongoStreamer) WarnStatus(s string) + type MongoStreamerCfg struct + BaseParser DataParser + BaseQuery interface{} + Collection string + ConnectTimeout int + DB string + FindOpt *options.FindOptions + IncInterval int + IncParser DataParser + IncQuery interface{} + IsSync bool + Logger log.BiLogger + Name string + OnBeforeBase func(interface{}) interface{} + OnBeforeInc func(interface{}) interface{} + ReadTimeout int + URI string + UpdatMode UpdatMode + UserData interface{} + type ParserResult struct + DataMode container.DataMode + Err error + Key container.MapKey + Value interface{} + type Sched []*SchedUnit + func (s *Sched) AddStreamer(name string, dataStreamer Streamer) + func (s *Sched) Pop() interface{} + func (s *Sched) Push(x interface{}) + func (s *Sched) Schedule(ctx context.Context) + func (s *Sched) Top() *SchedUnit + func (s Sched) Len() int + func (s Sched) Less(i, j int) bool + func (s Sched) Swap(i, j int) + type SchedInfo struct + TimeInterval int + type SchedUnit struct + type Status int + const Error + const Ok + type Streamer interface + GetContainer func() container.Container + GetSchedInfo func() *SchedInfo + SetContainer func(container.Container) + UpdateData func(ctx context.Context) error + type StreamerProvider struct + BaseInfo *BaseInfo + Cached []*IncRecord + Cfg *StreamerProviderCfg + func NewStreamerProvider(cfg *StreamerProviderCfg) *StreamerProvider + func (sp *StreamerProvider) AddInc(incs []*IncRecord) + func (sp *StreamerProvider) GetBase() *BaseInfo + func (sp *StreamerProvider) GetInc(progress int64, size int) ([]*IncRecord, error) + func (sp *StreamerProvider) SetBase(baseInfo *BaseInfo) + type StreamerProviderCfg struct + ExpireTime int64 + Logger log.BiLogger + Name string + type StreamerProviderManager struct + StreamerProviders map[string]*StreamerProvider + func NewStreamerProviderManager() *StreamerProviderManager + func (spm *StreamerProviderManager) GetProvider(name string, progress int64) *StreamerProvider + func (spm *StreamerProviderManager) RegiterProvider(name string, provider *StreamerProvider) error + type UpdatMode int64