asmap

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package asmap contains the tables for remote SIGs, ASes and their prefixes.

Index

Constants

This section is empty.

Variables

View Source
var Map = &ASMap{}

Functions

This section is empty.

Types

type ASEntry

type ASEntry struct {
	sync.RWMutex
	Nets     map[string]*net.IPNet
	IA       addr.IA
	IAString string

	Session *session.Session
	// contains filtered or unexported fields
}

ASEntry contains all of the information required to interact with a remote AS.

func (*ASEntry) Cleanup

func (ae *ASEntry) Cleanup() error

func (*ASEntry) ReloadConfig

func (ae *ASEntry) ReloadConfig(cfg *sigjson.Cfg, cfgEntry *sigjson.ASEntry) bool

type ASMap

type ASMap sync.Map

ASMap is not concurrency safe against multiple writers.

func (*ASMap) ASEntry

func (am *ASMap) ASEntry(ia addr.IA) *ASEntry

ASEntry returns the entry for the specified remote IA, or nil if not present.

func (*ASMap) AddIA

func (am *ASMap) AddIA(ia addr.IA) (*ASEntry, error)

AddIA idempotently adds an entry for a remote IA.

func (*ASMap) DelIA

func (am *ASMap) DelIA(ia addr.IA) error

DelIA removes an entry for a remote IA.

func (*ASMap) Delete

func (am *ASMap) Delete(key addr.IAInt)

func (*ASMap) Load

func (am *ASMap) Load(key addr.IAInt) (*ASEntry, bool)

func (*ASMap) LoadOrStore

func (am *ASMap) LoadOrStore(key addr.IAInt, value *ASEntry) (*ASEntry, bool)

func (*ASMap) Range

func (am *ASMap) Range(f func(key addr.IAInt, value *ASEntry) bool)

func (*ASMap) ReloadConfig

func (am *ASMap) ReloadConfig(cfg *sigjson.Cfg) bool

func (*ASMap) Store

func (am *ASMap) Store(key addr.IAInt, value *ASEntry)

Jump to

Keyboard shortcuts

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