Documentation ¶
Index ¶
- Constants
- type AvoidNode
- type AvoidNodes
- type FavoriteNode
- type MeasureStorage
- func (s *MeasureStorage) AddAvoidNode(key string, val *AvoidNode)
- func (s *MeasureStorage) AddFavoriteNode(key string, val *FavoriteNode) bool
- func (s *MeasureStorage) ClearAvoidExpired() error
- func (s *MeasureStorage) ClearFavoriteExpired() error
- func (s *MeasureStorage) GetAvoidCIDR() []*net.IPNet
- func (s *MeasureStorage) Load() error
- func (s *MeasureStorage) SaveAvoidNodes() error
- func (s *MeasureStorage) SaveFavoriteNodes() error
- type Storage
Constants ¶
View Source
const ( FavoriteFileSuffix = ".favorite-node.json" AvoidFileSuffix = ".avoid-node.json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvoidNodes ¶
type FavoriteNode ¶
type MeasureStorage ¶
type MeasureStorage struct { FavoriteNodes *Storage AvoidNodes map[string]AvoidNodes // contains filtered or unexported fields }
func NewMeasureStorage ¶
func NewMeasureStorage(path, filenamePrefix string) *MeasureStorage
func (*MeasureStorage) AddAvoidNode ¶
func (s *MeasureStorage) AddAvoidNode(key string, val *AvoidNode)
func (*MeasureStorage) AddFavoriteNode ¶
func (s *MeasureStorage) AddFavoriteNode(key string, val *FavoriteNode) bool
func (*MeasureStorage) ClearAvoidExpired ¶
func (s *MeasureStorage) ClearAvoidExpired() error
func (*MeasureStorage) ClearFavoriteExpired ¶
func (s *MeasureStorage) ClearFavoriteExpired() error
func (*MeasureStorage) GetAvoidCIDR ¶
func (s *MeasureStorage) GetAvoidCIDR() []*net.IPNet
func (*MeasureStorage) Load ¶
func (s *MeasureStorage) Load() error
Load must be called before all other methods
func (*MeasureStorage) SaveAvoidNodes ¶
func (s *MeasureStorage) SaveAvoidNodes() error
func (*MeasureStorage) SaveFavoriteNodes ¶
func (s *MeasureStorage) SaveFavoriteNodes() error
type Storage ¶
func NewStorage ¶
func NewStorage() *Storage
Click to show internal directories.
Click to hide internal directories.