worker

package
v0.0.0-...-e66b27f Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorUninitialized           = errors.New("Uninitialized Error.")
	ErrorInvalidConfigQueuesNum  = errors.New("Invalid Config QueuesNum.")
	ErrorInvalidConfigStoreCycle = errors.New("Invalid Config StoreCycle.")
	ErrorInvalidPackPointsSize   = errors.New("Invalid Config PackPointsSize.")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	StoreQueuesNum int
	StoreInterval  time.Duration
	PackPointsSize int
}

type StoreQueues

type StoreQueues struct {
	// contains filtered or unexported fields
}

func NewStoreQueues

func NewStoreQueues(num int) *StoreQueues

func (*StoreQueues) Get

func (s *StoreQueues) Get(index int) *lane.Deque

func (*StoreQueues) Set

func (s *StoreQueues) Set(index int, value interface{})

type StoreWorker

type StoreWorker struct {
	// contains filtered or unexported fields
}

func NewDelayer

func NewDelayer(conf *Config, batchConf client.BatchPointsConfig, client client.Client) *StoreWorker

func (*StoreWorker) AsyncStoreSharePoint

func (s *StoreWorker) AsyncStoreSharePoint(point *client.Point) error

func (*StoreWorker) Init

func (s *StoreWorker) Init() error

func (*StoreWorker) Loop

func (s *StoreWorker) Loop() error

func (*StoreWorker) Stop

func (s *StoreWorker) Stop()

func (*StoreWorker) SyncStoreSharePoint

func (s *StoreWorker) SyncStoreSharePoint(point *client.Point) error

Jump to

Keyboard shortcuts

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