goradpool

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BNGPools

type BNGPools struct {
	IpPools map[string]IPPool
}

type IPPool

type IPPool struct {
	Ipv4              net.IP
	Ipv6              net.IP
	Ipv6PD            net.IP
	FreeIPsOffsets    []int
	InterimOffsets    map[string]InterimStore //AcctSessionID as identifier
	ReservedIPOffsets map[string]int          //AcctSessionID as identifier
}

type InterimStore

type InterimStore struct {
	Offset    int
	Timestamp time.Time
}

type PoolServer

type PoolServer struct {
	Config                       config.Reader
	Pools                        map[string]BNGPools
	Logger                       *logs.Logger
	LastInterimCleanup           time.Time
	TimeBetweenCleanups          time.Duration
	MaximumTimeForInterimStorage time.Duration
	LogLocation                  string
}

Maybe read the IPv6-Pool-Mask once and store them in the PoolServer struct

func (*PoolServer) GenerateAvailableIPAddresses

func (poolServer *PoolServer) GenerateAvailableIPAddresses()

func (*PoolServer) GetRequestHandler

func (poolServer *PoolServer) GetRequestHandler() func(http.ResponseWriter, *http.Request)

Jump to

Keyboard shortcuts

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