asmap

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 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

	log.Logger

	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 *config.Cfg, cfgEntry *config.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 *config.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