gardener: github.com/gardener/gardener/pkg/utils/validation/cidr Index | Files

package cidr

import "github.com/gardener/gardener/pkg/utils/validation/cidr"

Index

Package Files

cidr.go disjoint.go helper.go

func NetworksIntersect Uses

func NetworksIntersect(cidr1, cidr2 string) bool

NetworksIntersect returns true if the given network CIDRs intersect.

func ValidateCIDRIsCanonical Uses

func ValidateCIDRIsCanonical(fldPath *field.Path, cidrToValidate string) field.ErrorList

ValidateCIDRIsCanonical validates that the provided CIDR is in canonical form.

func ValidateCIDROverlap Uses

func ValidateCIDROverlap(leftPaths, rightPaths []CIDR, overlap bool) (allErrs field.ErrorList)

ValidateCIDROverlap validates that the provided CIDRs do not overlap.

func ValidateCIDRParse Uses

func ValidateCIDRParse(cidrPaths ...CIDR) (allErrs field.ErrorList)

ValidateCIDRParse validates that all the given CIDRs can be parsed successfully.

func ValidateNetworkDisjointedness Uses

func ValidateNetworkDisjointedness(fldPath *field.Path, shootNodes, shootPods, shootServices, seedNodes *string, seedPods, seedServices string) field.ErrorList

ValidateNetworkDisjointedness validates that the given <seedNetworks> and <k8sNetworks> are disjoint.

type CIDR Uses

type CIDR interface {
    // GetCIDR returns the provided CIDR
    GetCIDR() string
    // GetFieldPath returns the fieldpath
    GetFieldPath() *field.Path
    // GetIPNet optionally returns the IPNet of the CIDR
    GetIPNet() *net.IPNet
    // Parse checks if CIDR parses
    Parse() bool
    // ValidateNotSubset returns errors if subsets is a subset.
    ValidateNotSubset(subsets ...CIDR) field.ErrorList
    // ValidateParse returns errors CIDR can't be parsed.
    ValidateParse() field.ErrorList
    // ValidateSubset returns errors if subsets is not a subset.
    ValidateSubset(subsets ...CIDR) field.ErrorList
}

CIDR contains CIDR and Path information

func NewCIDR Uses

func NewCIDR(c string, f *field.Path) CIDR

NewCIDR creates a new instance of cidrPath

Package cidr imports 3 packages (graph) and is imported by 5 packages. Updated 2020-02-18. Refresh now. Tools for package owners.