{"modulePath":"github.phpd.cn/openshift/origin","version":"v3.6.1+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package plugin\n\n## Constants\n\n```go\nconst (\n\tBR    = \"br0\"\n\tTUN   = \"tun0\"\n\tVXLAN = \"vxlan0\"\n\n\t// rule versioning; increment each time flow rules change\n\tVERSION = 4\n\n\tVERSION_TABLE = 253\n)\n```\n\n```go\nconst (\n\tDIG = \"dig\"\n)\n```\n\n```go\nconst VXLAN_PORT = \"4789\"\n```\n\n## Functions\n\n```go\nfunc CheckDNSResolver() error\n```\n\n```go\nfunc DeletionHandlingMetaNamespaceKeyFunc(obj interface{}) (string, error)\n```\n\n```go\nfunc NewMultiTenantPlugin() osdnPolicy\n```\n\n```go\nfunc NewNetworkPolicyPlugin() osdnPolicy\n```\n\n```go\nfunc NewOVSController(ovsif ovs.Interface, pluginId int, useConnTrack bool) *ovsController\n```\n\n```go\nfunc NewSingleTenantPlugin() osdnPolicy\n```\n\n```go\nfunc RegisterSharedInformerEventHandlers(kubeInformers kinternalinformers.SharedInformerFactory,\n\taddOrUpdateFunc func(interface{}, interface{}, watch.EventType),\n\tdelFunc func(interface{}), resourceName ResourceName)\n```\nRegisterSharedInformerEventHandlers registers addOrUpdateFunc and delFunc event handlers with kubernetes shared informers for the given resource name.\n\n```go\nfunc RunEventQueue(client kcache.Getter, resourceName ResourceName, process ProcessEventFunc)\n```\nRun event queue for the given resource. The 'process' function is called repeatedly with each available cache.Delta that describes state changes to an object. If the process function returns an error queued changes for that object are dropped but processing continues with the next available object's cache.Deltas.  The error is logged with call stack information.\n\nNOTE: this function will handle DeletedFinalStateUnknown delta objects automatically, which may not always be what you want since the now-deleted object may be stale.\n\n```go\nfunc StartMaster(networkConfig osconfigapi.MasterNetworkConfig, osClient *osclient.Client, kClient kclientset.Interface, informers kinternalinformers.SharedInformerFactory) error\n```\n\n## Types\n\n```go\ntype Chain struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DNS struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewDNS(execer kexec.Interface) *DNS\n```\n\n```go\nfunc (d *DNS) Add(dns string) error\n```\n\n```go\nfunc (d *DNS) Get(dns string) dnsValue\n```\n\n```go\nfunc (d *DNS) GetMinQueryTime() (time.Time, bool)\n```\n\n```go\nfunc (d *DNS) Size() int\n```\n\n```go\nfunc (d *DNS) Update() (error, bool)\n```\n\n```go\ntype EgressDNS struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewEgressDNS() *EgressDNS\n```\n\n```go\nfunc (e *EgressDNS) Add(policy osapi.EgressNetworkPolicy)\n```\n\n```go\nfunc (e *EgressDNS) Delete(policy osapi.EgressNetworkPolicy)\n```\n\n```go\nfunc (e *EgressDNS) GetIPs(policy osapi.EgressNetworkPolicy, dnsName string) []net.IP\n```\n\n```go\nfunc (e *EgressDNS) GetMinQueryTime() (time.Time, ktypes.UID, string, bool)\n```\n\n```go\nfunc (e *EgressDNS) GetNetCIDRs(policy osapi.EgressNetworkPolicy, dnsName string) []net.IPNet\n```\n\n```go\nfunc (e *EgressDNS) Sync()\n```\n\n```go\nfunc (e *EgressDNS) Update(policyUID ktypes.UID) (error, bool)\n```\n\n```go\ntype EgressDNSUpdate struct {\n\tUID       ktypes.UID\n\tNamespace string\n}\n```\n\n```go\ntype EventQueue struct {\n\t*cache.DeltaFIFO\n\t// contains filtered or unexported fields\n}\n```\nEventQueue is an enhanced DeltaFIFO that provides reliable Deleted deltas even if no knownObjects store is given, and compresses multiple deltas to reduce duplicate events.\n\nWithout a store, DeltaFIFO will drop Deleted deltas when its queue is empty because the deleted object is not present in the queue and DeltaFIFO tries to protect against duplicate Deleted deltas resulting from Replace().\n\nTo get reliable deletion, a store must be provided, and EventQueue provides one if the caller does not.\n\n```go\nfunc NewEventQueue(keyFunc cache.KeyFunc) *EventQueue\n```\n\n```go\nfunc NewEventQueueForStore(keyFunc cache.KeyFunc, knownObjects cache.KeyListerGetter) *EventQueue\n```\n\n```go\nfunc (queue *EventQueue) Pop(process ProcessEventFunc, expectedType interface{}) (interface{}, error)\n```\nProcess queued changes for an object.  The 'process' function is called repeatedly with each available cache.Delta that describes state changes for that object. If the process function returns an error queued changes for that object are dropped but processing continues with the next available object's cache.Deltas.  The error is logged with call stack information.\n\n```go\ntype NetworkInfo struct {\n\tClusterNetwork *net.IPNet\n\tServiceNetwork *net.IPNet\n}\n```\n\n```go\ntype NodeIPTables struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (n *NodeIPTables) Setup() error\n```\n\n```go\ntype OsdnMaster struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (master *OsdnMaster) SubnetStartMaster(clusterNetwork *net.IPNet, hostSubnetLength uint32) error\n```\n\n```go\nfunc (master *OsdnMaster) VnidStartMaster() error\n```\n\n```go\ntype OsdnNode struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewNodePlugin(pluginName string, osClient *osclient.Client, kClient kclientset.Interface, kubeInformers kinternalinformers.SharedInformerFactory,\n\thostname string, selfIP string, mtu uint32, proxyConfig componentconfig.KubeProxyConfiguration, runtimeEndpoint string) (*OsdnNode, error)\n```\nCalled by higher layers to create the plugin SDN node instance\n\n```go\nfunc (plugin *OsdnNode) AddHostSubnetRules(subnet *osapi.HostSubnet)\n```\n\n```go\nfunc (plugin *OsdnNode) AddServiceRules(service *kapi.Service, netID uint32)\n```\n\n```go\nfunc (plugin *OsdnNode) DeleteHostSubnetRules(subnet *osapi.HostSubnet)\n```\n\n```go\nfunc (plugin *OsdnNode) DeleteServiceRules(service *kapi.Service)\n```\n\n```go\nfunc (node *OsdnNode) GetLocalPods(namespace string) ([]kapi.Pod, error)\n```\n\n```go\nfunc (plugin *OsdnNode) SetupEgressNetworkPolicy() error\n```\n\n```go\nfunc (plugin *OsdnNode) SetupSDN() (bool, error)\n```\n\n```go\nfunc (node *OsdnNode) Start() error\n```\n\n```go\nfunc (node *OsdnNode) SubnetStartNode() error\n```\n\n```go\nfunc (plugin *OsdnNode) UpdateEgressNetworkPolicyVNID(namespace string, oldVnid, newVnid uint32)\n```\n\n```go\nfunc (node *OsdnNode) UpdatePod(pod kapi.Pod) error\n```\nFIXME: this should eventually go into kubelet via a CNI UPDATE/CHANGE action See [https://github.com/containernetworking/cni/issues/89](https://github.com/containernetworking/cni/issues/89)\n\n```go\ntype OsdnProxy struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewProxyPlugin(pluginName string, osClient *osclient.Client, kClient kclientset.Interface) (*OsdnProxy, error)\n```\nCalled by higher layers to create the proxy plugin instance; only used by nodes\n\n```go\nfunc (proxy *OsdnProxy) OnEndpointsUpdate(allEndpoints []*kapi.Endpoints)\n```\n\n```go\nfunc (proxy *OsdnProxy) Start(baseHandler pconfig.EndpointsConfigHandler) error\n```\n\n```go\ntype ProcessEventFunc func(delta cache.Delta) error\n```\nFunction should process one object delta, which represents a change notification for a single object. Function is passed the delta, which contains the changed object or the deleted final object state. The deleted final object state is extracted from the DeletedFinalStateUnknown passed by DeltaFIFO.\n\n```go\ntype ResourceName string\n```\n\n```go\nconst (\n\tNodes                 ResourceName = \"Nodes\"\n\tNamespaces            ResourceName = \"Namespaces\"\n\tNetNamespaces         ResourceName = \"NetNamespaces\"\n\tServices              ResourceName = \"Services\"\n\tHostSubnets           ResourceName = \"HostSubnets\"\n\tPods                  ResourceName = \"Pods\"\n\tEgressNetworkPolicies ResourceName = \"EgressNetworkPolicies\"\n\tNetworkPolicies       ResourceName = \"NetworkPolicies\"\n)\n```\n\n","path":"github.phpd.cn/openshift/origin/pkg/sdn/plugin","name":"plugin","synopsis":"","isRedistributable":true}
