querier

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSelfNode

func GetSelfNode(isAgent bool, node string) v1.ObjectReference

GetSelfNode gets current node.

func GetSelfPod

func GetSelfPod() v1.ObjectReference

GetSelfPod gets current pod.

func GetVersion

func GetVersion() string

GetVersion gets current version.

Types

type AgentNetworkPolicyInfoQuerier

type AgentNetworkPolicyInfoQuerier interface {
	NetworkPolicyInfoQuerier
	GetControllerConnectionStatus() bool
	GetNetworkPolicies(npFilter *NetworkPolicyQueryFilter) []cpv1beta.NetworkPolicy
	GetAddressGroups() []cpv1beta.AddressGroup
	GetAppliedToGroups() []cpv1beta.AppliedToGroup
	GetAppliedNetworkPolicies(pod, namespace string, npFilter *NetworkPolicyQueryFilter) []cpv1beta.NetworkPolicy
	GetNetworkPolicyByRuleFlowID(ruleFlowID uint32) *cpv1beta.NetworkPolicyReference
	GetRuleByFlowID(ruleFlowID uint32) *types.PolicyRule
}

type ControllerNetworkPolicyInfoQuerier

type ControllerNetworkPolicyInfoQuerier interface {
	NetworkPolicyInfoQuerier
	GetConnectedAgentNum() int
}

type NetworkPolicyInfoQuerier

type NetworkPolicyInfoQuerier interface {
	GetNetworkPolicyNum() int
	GetAddressGroupNum() int
	GetAppliedToGroupNum() int
}

type NetworkPolicyQueryFilter

type NetworkPolicyQueryFilter struct {
	// The Name of the controlplane network policy. If this field is set then
	// none of the other fields can be.
	Name string
	// The Name of the original network policy.
	SourceName string
	// The namespace of the original Namespace that the internal NetworkPolicy is created for.
	Namespace string
	// Name of the pod that the network policy is applied on.
	Pod string
	// The type of the original NetworkPolicy that the internal NetworkPolicy is created for.(K8sNP, CNP, ANP)
	SourceType cpv1beta.NetworkPolicyType
}

NetworkPolicyQueryFilter is used to filter the result while retrieve network policy An empty attribute, which won't be used as a condition, means match all. e.g SourceType = "" means all type network policy will be retrieved Can have more attributes in future if more args are required

Directories

Path Synopsis
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.

Jump to

Keyboard shortcuts

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