fetcher

package
v0.0.0-...-e0af2a1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataManager

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

func NewDataManager

func NewDataManager(fetcher Fetcher, name string, interval time.Duration) *DataManager

func (*DataManager) GetLastChanges

func (m *DataManager) GetLastChanges() time.Time

func (*DataManager) Lock

func (m *DataManager) Lock()

func (*DataManager) RLock

func (m *DataManager) RLock()

func (*DataManager) RUnlock

func (m *DataManager) RUnlock()

func (*DataManager) Start

func (m *DataManager) Start(stopCh <-chan struct{}, changesCh chan<- struct{}) error

func (*DataManager) Unlock

func (m *DataManager) Unlock()

type Fetcher

type Fetcher interface {
	GetData() (interface{}, error)
	ProcessData(interface{}) error
	GetLastChanges() time.Time
	GetCheckSum(interface{}) string
}

Jump to

Keyboard shortcuts

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