Documentation ¶
Overview ¶
Package common includes the common functions shared between enforcer and router callbacks.
Index ¶
- func FilterByNamespaces(namespaces []string) func(object k8client.Object) bool
- func GetEnvironment(environment string) string
- func GetNodeIdentifier(request *discovery.DiscoveryRequest) string
- func GetOperatorPodNamespace() string
- func NamespacedName(obj k8client.Object) types.NamespacedName
- type NodeQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterByNamespaces ¶
FilterByNamespaces takes a list of namespaces and returns a filter function which return true if the input object is in the given namespaces list, and returns false otherwise
func GetEnvironment ¶
GetEnvironment takes the environment of the API. If the value is empty, it will return the default environment that is set in the config of the common controller.
func GetNodeIdentifier ¶
func GetNodeIdentifier(request *discovery.DiscoveryRequest) string
GetNodeIdentifier constructs the nodeIdentifier from discovery request's node property, label:<instanceIdentifierProperty>
func GetOperatorPodNamespace ¶
func GetOperatorPodNamespace() string
GetOperatorPodNamespace returns the namesapce of the operator pod
func NamespacedName ¶
func NamespacedName(obj k8client.Object) types.NamespacedName
NamespacedName generates namespaced name for Kubernetes objects
Types ¶
type NodeQueue ¶
type NodeQueue struct {
// contains filtered or unexported fields
}
NodeQueue struct is used to keep track of the nodes connected via the XDS.
func GenerateNodeQueue ¶
func GenerateNodeQueue() *NodeQueue
GenerateNodeQueue creates an instance of nodeQueue with a mutex and a string array assigned.