routesum

package
v0.0.0-...-dd2a963 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package routesum summarizes a list of IPs and networks to its shortest form.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidInputErr

type InvalidInputErr struct {
	InvalidValue string
}

InvalidInputErr represents an error ingesting or validating input

func (*InvalidInputErr) Error

func (e *InvalidInputErr) Error() string

Error returns a stringified form of the error.

type RouteSum

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

RouteSum has methods supporting route summarization of networks and hosts

func NewRouteSum

func NewRouteSum() *RouteSum

NewRouteSum returns an initialized RouteSum object

func (*RouteSum) InsertFromString

func (rs *RouteSum) InsertFromString(s string) error

InsertFromString adds either a string-formatted network or IP to the summary

func (*RouteSum) SummaryStrings

func (rs *RouteSum) SummaryStrings() []string

SummaryStrings returns a summary of all received routes as a string slice.

Directories

Path Synopsis
Package bitslice provides a slice of bits
Package bitslice provides a slice of bits
Package rstrie provides a datatype that supports building a space-efficient summary of networks and IPs.
Package rstrie provides a datatype that supports building a space-efficient summary of networks and IPs.

Jump to

Keyboard shortcuts

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