filter

package
v1.4.12 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StateAllocated is a preset filter for cns.Allocated.
	StateAllocated = ipConfigStatePredicate(cns.Allocated)
	// StateAvailable is a preset filter for cns.Available.
	StateAvailable = ipConfigStatePredicate(cns.Available)
	// StatePendingProgramming is a preset filter for cns.PendingProgramming.
	StatePendingProgramming = ipConfigStatePredicate(cns.PendingProgramming)
	// StatePendingRelease is a preset filter for cns.PendingRelease.
	StatePendingRelease = ipConfigStatePredicate(cns.PendingRelease)
)

Functions

func MatchAnyIPConfigState

func MatchAnyIPConfigState(in map[string]cns.IPConfigurationStatus, predicates ...IPConfigStatePredicate) []cns.IPConfigurationStatus

MatchAnyIPConfigState filters the passed IPConfigurationStatus map according to the passed predicates and returns the matching values.

Types

type IPConfigStatePredicate

type IPConfigStatePredicate func(ipconfig cns.IPConfigurationStatus) bool

func PredicatesForStates

func PredicatesForStates(states ...cns.IPConfigState) []IPConfigStatePredicate

PredicatesForStates returns a slice of IPConfigStatePredicates matches that map to the input IPConfigStates.

Jump to

Keyboard shortcuts

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