Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDriveState ¶
func SetDriveState(storeID string, state *DriveState)
SetDriveState create a new state
Types ¶
type DriveScrapper ¶
type DriveScrapper interface {
LoadDriveState(config StoreConfig) (hasChanged bool, err error)
}
DriveScrapper interface that defines func to get drive state
type DriveState ¶
DriveState struct to represent a store state
func GetDriveState ¶
func GetDriveState(storeID string) *DriveState
GetDriveState get the state of a drive
type Retail ¶
type Retail struct { Name string StoreScrapper }
Retail struct to wrapp function of a drive
type Store ¶
type Store struct { ID string Name string DriveScrapper }
Store struct to represent a store data
func (Store) LoadIntervalDriveState ¶
func (s Store) LoadIntervalDriveState(config StoreConfig, tick *time.Ticker, done chan bool)
LoadIntervalDriveState fetch each tick the drive state config
func (Store) NewDriveHandler ¶
func (s Store) NewDriveHandler()
NewDriveHandler add a new drive handler
type StoreConfig ¶
type StoreConfig struct { StoreID string State *DriveState }
StoreConfig struct reprsent a Store config
func NewStoreConfig ¶
func NewStoreConfig(storeID string) StoreConfig
NewStoreConfig Create a new Store config with storeID
Click to show internal directories.
Click to hide internal directories.