Documentation ¶
Index ¶
- func GetWorkerName(deviceType DeviceType, workerNum int) string
- func OnExit(ctx context.Context, cerr chan<- errs.Error, prefixMsg string, fn func())
- func ProtoUserAppsBuilder() interface{}
- func Run(ctx context.Context, runners ...Runner) <-chan struct{}
- type DBufferStats
- type DTBufferStats
- type DTParserStats
- type DTSaverStats
- type DeviceRecord
- type DeviceType
- type DeviceTypeDBuffer
- type DeviceTypeDBufferStats
- type DeviceTypeParserStats
- type DeviceTypeSaverStats
- type Loader
- type LoaderStats
- type Parser
- type ParserStats
- type Pipeline
- type Pipeliner
- type ProtoUserApps
- type Runner
- type Saver
- type SaverStats
- type StatProducer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetWorkerName ¶
func GetWorkerName(deviceType DeviceType, workerNum int) string
func ProtoUserAppsBuilder ¶
func ProtoUserAppsBuilder() interface{}
Types ¶
type DTBufferStats ¶
type DTBufferStats map[string]*DBufferStats
func (DTBufferStats) SortByDeviceType ¶
func (m DTBufferStats) SortByDeviceType() []string
type DTParserStats ¶
type DTParserStats map[DeviceType]ParserStats
func (DTParserStats) SortByDeviceType ¶
func (m DTParserStats) SortByDeviceType() []DeviceType
type DTSaverStats ¶
type DTSaverStats map[DeviceType]*SaverStats
func (DTSaverStats) SortByDeviceType ¶
func (m DTSaverStats) SortByDeviceType() []DeviceType
type DeviceRecord ¶
type DeviceRecord struct { DeviceType string ProtoDeviceUserApps ProtoUserApps }
type DeviceType ¶
type DeviceType string
type DeviceTypeDBuffer ¶
type DeviceTypeDBuffer interface { Run(context.Context) <-chan struct{} ResChs() map[DeviceType]chan *ProtoUserApps ErrCh() <-chan errs.Error Stats() interface{} }
func NewDTDBuffer ¶
func NewDTDBuffer(ctx context.Context, dtInputChs map[DeviceType]chan *ProtoUserApps, workersCount int, dirPath string, itemsPerSegment int, resume bool, turbo bool, statsOn bool) (DeviceTypeDBuffer, error)
type DeviceTypeDBufferStats ¶
type DeviceTypeDBufferStats struct { StartTime time.Time DTInputStats map[string]*DBufferStats DTOutputStats map[string]*DBufferStats }
type DeviceTypeParserStats ¶
type DeviceTypeParserStats struct { DTStats map[DeviceType]ParserStats StartTime, EndTime time.Time }
type DeviceTypeSaverStats ¶
type DeviceTypeSaverStats struct { DTStats map[DeviceType]*SaverStats StartTime, FinishTime time.Time }
type Loader ¶
type LoaderStats ¶
type Parser ¶
type Parser interface { Run(ctx context.Context) <-chan struct{} ResChs() map[DeviceType]chan *ProtoUserApps // <-chan *DeviceRecord ErrCh() <-chan errs.Error Stats() interface{} }
type ParserStats ¶
type Pipeline ¶
type Pipeline []Pipeliner
func (Pipeline) StatProducers ¶
func (pl Pipeline) StatProducers() []StatProducer
type Pipeliner ¶
type Pipeliner interface { Runner StatProducer }
type ProtoUserApps ¶
func (ProtoUserApps) Size ¶
func (d ProtoUserApps) Size() int
type Saver ¶
type Saver interface { Run(ctx context.Context) <-chan struct{} ErrCh() <-chan errs.Error Stats() interface{} }
func NewMemcSaver ¶
func NewMemcSaver(ctx context.Context, dtInputs map[DeviceType]chan *ProtoUserApps, addrs map[string]string, dry bool, timeout time.Duration, maxRetries int, retryTimeout time.Duration, statsOn bool) (Saver, errs.Error)
todo: as option - to improve performance 1) add workers per deviceType or/and 2) use memcache connections pool (if client has one ...)
type SaverStats ¶
type StatProducer ¶
type StatProducer interface {
Stats() interface{}
}
Click to show internal directories.
Click to hide internal directories.