Documentation ¶
Overview ¶
Package prefixpool provides service for prefix managing
Index ¶
- func ExtractPrefixes(prefixes []string, requests ...*networkservice.ExtraPrefixRequest) (requested, remaining []string, err error)
- type PrefixPool
- func (impl *PrefixPool) ExcludePrefixes(excludedPrefixes []string) (removedPrefixesList []string, retErr error)
- func (impl *PrefixPool) Extract(connectionID string, family networkservice.IpFamily_Family, ...) (srcIP, dstIP *net.IPNet, requested []string, err error)
- func (impl *PrefixPool) ExtractPrefixes(connectionID string, requests ...*networkservice.ExtraPrefixRequest) (requested []string, err error)
- func (impl *PrefixPool) GetConnectionInformation(connectionID string) (ipNet string, prefixes []string, err error)
- func (impl *PrefixPool) GetPrefixes() []string
- func (impl *PrefixPool) Intersect(prefix string) (intersection bool, err error)
- func (impl *PrefixPool) Release(connectionID string) error
- func (impl *PrefixPool) ReleaseExcludedPrefixes(excludedPrefixes []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractPrefixes ¶
func ExtractPrefixes(prefixes []string, requests ...*networkservice.ExtraPrefixRequest) (requested, remaining []string, err error)
ExtractPrefixes extracts prefixes from given requests
Types ¶
type PrefixPool ¶
type PrefixPool struct {
// contains filtered or unexported fields
}
PrefixPool is a structure that contains information about prefixes
func (*PrefixPool) ExcludePrefixes ¶
func (impl *PrefixPool) ExcludePrefixes(excludedPrefixes []string) (removedPrefixesList []string, retErr error)
ExcludePrefixes excludes prefixes from the pool of available prefixes
func (*PrefixPool) Extract ¶
func (impl *PrefixPool) Extract(connectionID string, family networkservice.IpFamily_Family, requests ...*networkservice.ExtraPrefixRequest) (srcIP, dstIP *net.IPNet, requested []string, err error)
Extract extracts source and destination from the given connection
func (*PrefixPool) ExtractPrefixes ¶ added in v1.2.0
func (impl *PrefixPool) ExtractPrefixes(connectionID string, requests ...*networkservice.ExtraPrefixRequest) (requested []string, err error)
ExtractPrefixes extracts requested prefixes
func (*PrefixPool) GetConnectionInformation ¶
func (impl *PrefixPool) GetConnectionInformation(connectionID string) (ipNet string, prefixes []string, err error)
GetConnectionInformation returns information about connection
func (*PrefixPool) GetPrefixes ¶
func (impl *PrefixPool) GetPrefixes() []string
GetPrefixes returns the list of saved prefixes
func (*PrefixPool) Intersect ¶
func (impl *PrefixPool) Intersect(prefix string) (intersection bool, err error)
Intersect returns is there any intersection with existing prefixes
func (*PrefixPool) Release ¶
func (impl *PrefixPool) Release(connectionID string) error
Release releases prefixes from the connection
func (*PrefixPool) ReleaseExcludedPrefixes ¶
func (impl *PrefixPool) ReleaseExcludedPrefixes(excludedPrefixes []string) error
ReleaseExcludedPrefixes releases excluded prefixes back the pool of available ones