controlplane

package
v1.4.17 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IpsetApply   string = "IPSETAPPLY"
	IpsetRemove  string = "IPSETREMOVE"
	PolicyApply  string = "POLICYAPPLY"
	PolicyRemove string = "POLICYREMOVE"
)

Variables

This section is empty.

Functions

func DecodeNPMNetworkPolicy added in v1.4.17

func DecodeNPMNetworkPolicy(payload *bytes.Buffer) (*policies.NPMNetworkPolicy, error)

func DecodeString added in v1.4.17

func DecodeString(payload *bytes.Buffer) (string, error)

func EncodeControllerIPSet added in v1.4.17

func EncodeControllerIPSet(ipset *ControllerIPSets) (*bytes.Buffer, error)

func EncodeNPMNetworkPolicy added in v1.4.17

func EncodeNPMNetworkPolicy(netpol *policies.NPMNetworkPolicy) (*bytes.Buffer, error)

func EncodeString added in v1.4.17

func EncodeString(name string) (*bytes.Buffer, error)

Types

type ControllerIPSets

type ControllerIPSets struct {
	*ipsets.IPSetMetadata
	// IPPodMetadata is used for setMaps to store Ips and ports as keys
	// and podMetadata as value
	IPPodMetadata map[string]*dp.PodMetadata
	// MemberIPSets is used for listMaps to store child IP Sets
	MemberIPSets map[string]*ipsets.IPSetMetadata
}

ControllerIPSets is used in fan-out design for controller pod to calculate and push to daemon pod

func DecodeControllerIPSet added in v1.4.17

func DecodeControllerIPSet(payload *bytes.Buffer) (*ControllerIPSets, error)

func NewControllerIPSets

func NewControllerIPSets(metadata *ipsets.IPSetMetadata) *ControllerIPSets

func (*ControllerIPSets) GetMetadata

func (c *ControllerIPSets) GetMetadata() *ipsets.IPSetMetadata

Directories

Path Synopsis
controllers
v1
v2
Package translation converts NetworkPolicy object to policies.NPMNetworkPolicy object which contains necessary information to program dataplanes.
Package translation converts NetworkPolicy object to policies.NPMNetworkPolicy object which contains necessary information to program dataplanes.

Jump to

Keyboard shortcuts

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