Documentation
¶
Index ¶
- Variables
- type ConsensusInterface
- type KernelRoute
- type MeasureInterface
- type Node
- type RouteInterface
- type RouteTable
- type Service
- type StateTable
- func (s *StateTable) Delete(key string) error
- func (s *StateTable) Get(key string) (string, time.Time, error)
- func (s *StateTable) GetAll(namespace string) map[string]string
- func (s *StateTable) GetFromNamespace(key, namespace string) (string, time.Time, error)
- func (s *StateTable) Modify(key, value string) error
- func (s *StateTable) Set(key, value string)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoKey = fmt.Errorf("key not found")
)
Functions ¶
This section is empty.
Types ¶
type ConsensusInterface ¶
type MeasureInterface ¶
type Node ¶
type Node struct { StopCh chan struct{} WGUpdateCh chan netctl.WGInterface RTUpdateCh chan struct{} MeasureUpdateCh chan struct{} RouteTable *RouteTable StateTable *StateTable Services map[string]Service RouteService RouteInterface ConsensusService ConsensusInterface MeasureService MeasureInterface SiteID int LocalIP string Peers []int Logger logging.Logger }
type RouteInterface ¶
type RouteTable ¶
type RouteTable struct {
// contains filtered or unexported fields
}
func NewRouteTable ¶
func NewRouteTable() *RouteTable
NewRouteTable creates a new RouteTable with initialized map
func (*RouteTable) AddRoute ¶
func (rt *RouteTable) AddRoute(destination *net.IPNet, gateway net.IP)
func (*RouteTable) ClearRoutes ¶
func (rt *RouteTable) ClearRoutes()
func (*RouteTable) GetRoutes ¶
func (rt *RouteTable) GetRoutes() []KernelRoute
func (*RouteTable) Lock ¶
func (rt *RouteTable) Lock()
func (*RouteTable) MarkReady ¶
func (rt *RouteTable) MarkReady()
func (*RouteTable) Ready ¶
func (rt *RouteTable) Ready() bool
func (*RouteTable) Unlock ¶
func (rt *RouteTable) Unlock()
type StateTable ¶
type StateTable struct {
// contains filtered or unexported fields
}
func NewStateTable ¶
func NewStateTable() *StateTable
func (*StateTable) Delete ¶
func (s *StateTable) Delete(key string) error
func (*StateTable) Get ¶
Get returns the value associated with the key in the package that called this function. The second return value is the timestamp when the value was set. If the key is not found, the second return value is the zero Time.
func (*StateTable) GetFromNamespace ¶
func (*StateTable) Modify ¶
func (s *StateTable) Modify(key, value string) error
func (*StateTable) Set ¶
func (s *StateTable) Set(key, value string)
Click to show internal directories.
Click to hide internal directories.