ifstate

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteState

func DeleteState(ifID common.IFIDType)

DeleteState removes the state info for a given interface.

func Process

func Process(ifStates *path_mgmt.IFStateInfos)

Process processes Interface State updates from the beacon service.

func UpdateIfNew

func UpdateIfNew(ifID common.IFIDType, old, new *Info)

UpdateIfNew atomically updates the state info for a given ifid, if the state has not been changed in the meantime. If there is no state info, a new one will be created and the new state will be inserted.

Types

type Info

type Info struct {
	IfID         common.IFIDType
	Active       bool
	SRevInfo     *path_mgmt.SignedRevInfo
	RawSRev      common.RawBytes
	ActiveMetric prometheus.Gauge
}

Info stores state information, as well as the raw revocation info for a given interface.

func LoadState

func LoadState(ifID common.IFIDType) (*Info, bool)

LoadState returns the state info for a given interface ID or nil. The bool result indicates whether the state was found in the map.

func NewInfo

func NewInfo(ifID common.IFIDType, active bool, srev *path_mgmt.SignedRevInfo,
	rawSRev common.RawBytes) *Info

Jump to

Keyboard shortcuts

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