Documentation ¶
Index ¶
- Constants
- func DecodeNPMNetworkPolicies(payload *bytes.Buffer) ([]*policies.NPMNetworkPolicy, error)
- func DecodeStrings(payload *bytes.Buffer) ([]string, error)
- func EncodeControllerIPSets(ipsets []*ControllerIPSets) (*bytes.Buffer, error)
- func EncodeNPMNetworkPolicies(netpols []*policies.NPMNetworkPolicy) (*bytes.Buffer, error)
- func EncodeStrings(names []string) (*bytes.Buffer, error)
- type ControllerIPSets
- func (c *ControllerIPSets) AddReference(referenceName, referenceType string)
- func (c *ControllerIPSets) CanDelete() bool
- func (c *ControllerIPSets) DeleteReference(referenceName, referenceType string)
- func (c *ControllerIPSets) GetMetadata() *ipsets.IPSetMetadata
- func (c *ControllerIPSets) HasReferences() bool
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func DecodeNPMNetworkPolicies ¶
func DecodeNPMNetworkPolicies(payload *bytes.Buffer) ([]*policies.NPMNetworkPolicy, error)
func EncodeControllerIPSets ¶
func EncodeControllerIPSets(ipsets []*ControllerIPSets) (*bytes.Buffer, error)
func EncodeNPMNetworkPolicies ¶
func EncodeNPMNetworkPolicies(netpols []*policies.NPMNetworkPolicy) (*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 // NetPolReference holds networkpolicy names where this IPSet // is being referred as part of rules // NetpolReference is not used currently, depending on testing we may decide to keep it // or delete it NetPolReference map[string]struct{} // contains filtered or unexported fields }
ControllerIPSets is used in fan-out design for controller pod to calculate and push to daemon pod
func DecodeControllerIPSets ¶
func DecodeControllerIPSets(payload *bytes.Buffer) ([]*ControllerIPSets, error)
func NewControllerIPSets ¶
func NewControllerIPSets(metadata *ipsets.IPSetMetadata) *ControllerIPSets
func (*ControllerIPSets) AddReference ¶
func (c *ControllerIPSets) AddReference(referenceName, referenceType string)
func (*ControllerIPSets) CanDelete ¶
func (c *ControllerIPSets) CanDelete() bool
CanDelete checks for references and members
func (*ControllerIPSets) DeleteReference ¶
func (c *ControllerIPSets) DeleteReference(referenceName, referenceType string)
func (*ControllerIPSets) GetMetadata ¶
func (c *ControllerIPSets) GetMetadata() *ipsets.IPSetMetadata
GetMetadata returns the metadata of the ipset
func (*ControllerIPSets) HasReferences ¶
func (c *ControllerIPSets) HasReferences() bool
HasReferences checks if an ipset has references
Directories ¶
Path | Synopsis |
---|---|
controllers
|
|
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. |
Click to show internal directories.
Click to hide internal directories.