Documentation
¶
Index ¶
- func NewCollectors(config *config.Config, newRecord func() interface{}, ...) ([]*Service, []Collector, error)
- type Accumulator
- type BackupError
- type Batch
- type Collector
- type FMapPool
- type Option
- type Options
- type Service
- func (s *Service) Close() error
- func (s *Service) Collect(record interface{}) error
- func (s *Service) CollectAll(records ...interface{}) error
- func (s *Service) Flush(batch *Batch) error
- func (s *Service) ID() string
- func (s *Service) IsUp() bool
- func (s *Service) NotifyWatcher()
- func (s *Service) RetryFailed(ctx context.Context, onStartUp bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCollectors ¶
Types ¶
type Accumulator ¶
type Accumulator struct { Map map[interface{}]interface{} UseFastMap bool FastMap *fmap.FastMap[any] sync.RWMutex // contains filtered or unexported fields }
func NewAccumulator ¶
func NewAccumulator(fastMap *FMapPool) *Accumulator
func (*Accumulator) GetOrCreate ¶
func (a *Accumulator) GetOrCreate(key interface{}, get func() interface{}) (interface{}, bool)
func (*Accumulator) Len ¶
func (a *Accumulator) Len() int
func (*Accumulator) Put ¶
func (a *Accumulator) Put(key, value interface{}) interface{}
type BackupError ¶
func (*BackupError) Error ¶
func (b *BackupError) Error() string
type Batch ¶
type Batch struct { ID string *tconfig.Stream Accumulator *Accumulator Started time.Time PendingURL string sync.Mutex // contains filtered or unexported fields }
func (*Batch) HasPendingTransaction ¶
func (*Batch) ScheduleAt ¶
type Collector ¶
type Collector interface { Collect(record interface{}) error CollectAll(record ...interface{}) error ID() string }
Collector represents a collector
type FMapPool ¶
type FMapPool struct {
// contains filtered or unexported fields
}
func NewFMapPool ¶
NewFMapPool creates a new pool
type Option ¶
type Option func(o *Options)
func WithFastMapPool ¶
func WithInstanceId ¶
func WithStreamURLSymLinkTrg ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func NewOptions ¶
func (*Options) GetInstanceId ¶
func (*Options) GetStreamURLSymLinkTrg ¶
type Service ¶
func (*Service) CollectAll ¶
func (*Service) NotifyWatcher ¶
func (s *Service) NotifyWatcher()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.