Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlackListedItem ¶
BlackListedItem is the regex that expresses the devices that are blacklisted and the reason why.
func (BlackListedItem) TableName ¶
func (BlackListedItem) TableName() string
TableName sets BlackListedItem's table name to be "blacklist"; for the GORM driver.
type List ¶
List is for checking if a device id is in the blacklist.
func NewListRefresher ¶
func NewListRefresher(config RefresherConfig, updater Updater, stop chan struct{}) List
NewListRefresher takes the given values and uses them to create a new listRefresher
type RefresherConfig ¶
RefresherConfig is the configuration specifying how often to update the list and what logger to use when logging.
type SyncList ¶
type SyncList struct {
// contains filtered or unexported fields
}
SyncList is an implemention of the List interface that works synchronously.
func NewEmptySyncList ¶
func NewEmptySyncList() SyncList
NewEmptySyncList creates a new SyncList that holds no information.
func (*SyncList) InList ¶
InList returns whether or not a device is on the blacklist and why, if it's on the list.
func (*SyncList) UpdateList ¶
func (m *SyncList) UpdateList(data []BlackListedItem)
UpdateList takes the data given and overwrites the blacklist with the new information.
type Updater ¶
type Updater interface {
GetBlacklist() ([]BlackListedItem, error)
}
Updater is for getting the blacklist.