networkpolicy

package
Version: v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

This whole file is from https://github.com/digitalocean/go-openvswitch/blob/master/ovs/portrange.go

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidPortRange is returned when there's a port range that invalid.
	ErrInvalidPortRange = errors.New("invalid port range")
)

Functions

This section is empty.

Types

type BitRange

type BitRange struct {
	Value uint16
	Mask  uint16
}

A BitRange is a representation of a range of values from base value with a bitmask applied.

type PortRange

type PortRange struct {
	Start uint16
	End   uint16
}

An PortRange represents a range of ports expressed in 16 bit integers. The start and end values of this range are inclusive.

func (*PortRange) BitwiseMatch

func (r *PortRange) BitwiseMatch() ([]BitRange, error)

BitwiseMatch returns an array of BitRanges that represent the range of integers in the PortRange.

Source Files

Jump to

Keyboard shortcuts

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