networkpolicy

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAllow = "allow"
	DefaultDeny  = "deny"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Additions

type Additions struct {
	Allow []string `yaml:"allow,omitempty"`
	Deny  []string `yaml:"deny,omitempty"`
}

func (Additions) IsEmpty

func (a Additions) IsEmpty() bool

func (Additions) Validate

func (a Additions) Validate() error

type Policy

type Policy struct {
	Default string   `yaml:"default"`
	Allow   []string `yaml:"allow,omitempty"`
	Deny    []string `yaml:"deny,omitempty"`
}

func (Policy) Allows

func (p Policy) Allows(host string, port int) bool

func (Policy) Validate

func (p Policy) Validate() error

func (Policy) With

func (p Policy) With(additions Additions) Policy

Jump to

Keyboard shortcuts

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