filter

package
v1.4.57 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StateAssigned is a preset filter for types.Assigned.
	StateAssigned = ipConfigStatePredicate(types.Assigned)
	// StateAvailable is a preset filter for types.Available.
	StateAvailable = ipConfigStatePredicate(types.Available)
	// StatePendingProgramming is a preset filter for types.PendingProgramming.
	StatePendingProgramming = ipConfigStatePredicate(types.PendingProgramming)
	// StatePendingRelease is a preset filter for types.PendingRelease.
	StatePendingRelease = ipConfigStatePredicate(types.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 ...types.IPState) []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