routemanager

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoute

func AddRoute(username, name string, route *Route) error

func DelRoute

func DelRoute(username, name string) error

Types

type Route

type Route struct {
	Id      string
	Cidr    string
	Nexthop string
}

type RouteManager

type RouteManager struct {
	// contains filtered or unexported fields
}

func New

func New(store *etcdstorage.Etcd) *RouteManager

func (*RouteManager) AddRoute

func (m *RouteManager) AddRoute(username, name string, route *Route) error

func (*RouteManager) DelRoute

func (m *RouteManager) DelRoute(username, name string) error

func (*RouteManager) Watch

func (m *RouteManager) Watch(delfunc, putfunc func(userId string, route *Route))

Jump to

Keyboard shortcuts

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