npm

package
v1.4.16 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 20 Imported by: 1

Documentation

Overview

Package npm Copyright 2018 Microsoft. All rights reserved. MIT License

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheEncoder

func CacheEncoder(nodeName string) json.Marshaler

CacheEncoder is used only for unit tests to test encoding and decoding Cache.

func GetAIMetadata

func GetAIMetadata() string

GetAIMetadata returns ai metadata number

func GetNodeName added in v1.4.15

func GetNodeName() string

Types

type CacheKey added in v1.4.13

type CacheKey string
const (
	NodeName    CacheKey = "NodeName"
	NsMap       CacheKey = "NsMap"
	PodMap      CacheKey = "PodMap"
	ListMap     CacheKey = "ListMap"
	SetMap      CacheKey = "SetMap"
	EnvNodeName          = "HOSTNAME"
)

NPMCache Key Contract for Json marshal and unmarshal

type NetworkPolicyManager

type NetworkPolicyManager struct {
	NodeName string

	TelemetryEnabled bool
	// contains filtered or unexported fields
}

NetworkPolicyManager contains informers for pod, namespace and networkpolicy.

func NewNetworkPolicyManager

func NewNetworkPolicyManager(config npmconfig.Config,
	informerFactory informers.SharedInformerFactory,
	dp dataplane.GenericDataplane,
	exec utilexec.Interface,
	npmVersion string,
	k8sServerVersion *version.Info) *NetworkPolicyManager

NewNetworkPolicyManager creates a NetworkPolicyManager

func (*NetworkPolicyManager) GetAppVersion

func (npMgr *NetworkPolicyManager) GetAppVersion() string

GetAppVersion returns network policy manager app version

func (*NetworkPolicyManager) MarshalJSON

func (npMgr *NetworkPolicyManager) MarshalJSON() ([]byte, error)

func (*NetworkPolicyManager) Start

func (npMgr *NetworkPolicyManager) Start(config npmconfig.Config, stopCh <-chan struct{}) error

Start starts shared informers and waits for the shared informer cache to sync.

Directories

Path Synopsis
http
api
Package ipsm focus on ip set operation Copyright 2018 Microsoft.
Package ipsm focus on ip set operation Copyright 2018 Microsoft.
pkg
controlplane/translation
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.
dataplane/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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