segutil

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter added in v0.4.0

func Filter(segs seg.Segments, policy Policy, dir Direction) seg.Segments

Filter filters the given segments with the policy. Dir indicates the direction of intended usage of the segments. For example up and core segments are most often used in reverse construction dir. The direction parameter is relevant for the sequence matching of policies. Note that order of segs is not preserved. NOTE: This function should only be applied on core segments, otherwise the PS might filter segments that could still have been used in a final path, because of peering links. NOTE: policy must not be nil.

Types

type Direction added in v0.4.0

type Direction int
const (
	ReverseConsDir Direction = iota
	ConsDir
)

type Policy added in v0.4.0

type Policy interface {
	FilterOpt(pathpol.PathSet, pathpol.FilterOptions) pathpol.PathSet
}

Policy filters path sets according to a set of rules.

Directories

Path Synopsis
Package mock_segutil is a generated GoMock package.
Package mock_segutil is a generated GoMock package.

Jump to

Keyboard shortcuts

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