firewallapplier

package
v0.0.0-...-410f0c4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Applier

type Applier struct {
	// contains filtered or unexported fields
}

func NewApplier

func NewApplier(netSh NetShRunner, containerId string, portAllocator PortAllocator, firewall Firewall) *Applier

func (*Applier) Cleanup

func (a *Applier) Cleanup() error

func (*Applier) In

func (a *Applier) In(rule netrules.NetIn, containerIP string) (*hcsshim.NatPolicy, *hcsshim.ACLPolicy, error)

func (*Applier) OpenPort

func (a *Applier) OpenPort(port uint32) error

func (*Applier) Out

func (a *Applier) Out(rule netrules.NetOut, containerIP string) (*hcsshim.ACLPolicy, error)

type Firewall

type Firewall interface {
	CreateRule(firewall.Rule) error
	DeleteRule(string) error
	RuleExists(string) (bool, error)
}

type NetShRunner

type NetShRunner interface {
	RunContainer([]string) error
}

type PortAllocator

type PortAllocator interface {
	AllocatePort(handle string, port int) (int, error)
	ReleaseAllPorts(handle string) error
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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