common

package
v3.10.36-1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package common contains the OpenShift SDN code that is shared between master, node, and proxy

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterNetworkListContains

func ClusterNetworkListContains(clusterNetworks []ClusterNetwork, ipaddr net.IP) (*net.IPNet, bool)

func ClusterNetworkToString

func ClusterNetworkToString(n *networkapi.ClusterNetwork) string

func HostSubnetToString

func HostSubnetToString(subnet *networkapi.HostSubnet) string

func InformerFuncs

func InformerFuncs(objType runtime.Object, addOrUpdateFunc InformerAddOrUpdateFunc, deleteFunc InformerDeleteFunc) kcache.ResourceEventHandlerFuncs

Types

type ClusterNetwork

type ClusterNetwork struct {
	ClusterCIDR      *net.IPNet
	HostSubnetLength uint32
}

type DNS

type DNS struct {
	// contains filtered or unexported fields
}

func NewDNS

func NewDNS(resolverConfigFile string) (*DNS, error)

func (*DNS) Add

func (d *DNS) Add(dns string) error

func (*DNS) Get

func (d *DNS) Get(dns string) dnsValue

func (*DNS) GetMinQueryTime

func (d *DNS) GetMinQueryTime() (time.Time, bool)

func (*DNS) Size

func (d *DNS) Size() int

func (*DNS) Update

func (d *DNS) Update() (error, bool)

type EgressDNS

type EgressDNS struct {

	// Report changes when there are dns updates
	Updates chan EgressDNSUpdate
	// contains filtered or unexported fields
}

func NewEgressDNS

func NewEgressDNS() *EgressDNS

func (*EgressDNS) Add

func (e *EgressDNS) Add(policy networkapi.EgressNetworkPolicy)

func (*EgressDNS) Delete

func (e *EgressDNS) Delete(policy networkapi.EgressNetworkPolicy)

func (*EgressDNS) GetIPs

func (e *EgressDNS) GetIPs(policy networkapi.EgressNetworkPolicy, dnsName string) []net.IP

func (*EgressDNS) GetMinQueryTime

func (e *EgressDNS) GetMinQueryTime() (time.Time, ktypes.UID, string, bool)

func (*EgressDNS) GetNetCIDRs

func (e *EgressDNS) GetNetCIDRs(policy networkapi.EgressNetworkPolicy, dnsName string) []net.IPNet

func (*EgressDNS) Sync

func (e *EgressDNS) Sync()

func (*EgressDNS) Update

func (e *EgressDNS) Update(policyUID ktypes.UID) (error, bool)

type EgressDNSUpdate

type EgressDNSUpdate struct {
	UID       ktypes.UID
	Namespace string
}

type InformerAddOrUpdateFunc

type InformerAddOrUpdateFunc func(interface{}, interface{}, watch.EventType)

type InformerDeleteFunc

type InformerDeleteFunc func(interface{})

type NetworkInfo

type NetworkInfo struct {
	ClusterNetworks []ClusterNetwork
	ServiceNetwork  *net.IPNet
}

func GetNetworkInfo

func GetNetworkInfo(networkClient networkclient.Interface) (*NetworkInfo, error)

func ParseNetworkInfo

func ParseNetworkInfo(clusterNetwork []networkapi.ClusterNetworkEntry, serviceNetwork string) (*NetworkInfo, error)

func (*NetworkInfo) CheckClusterObjects

func (ni *NetworkInfo) CheckClusterObjects(subnets []networkapi.HostSubnet, pods []kapi.Pod, services []kapi.Service) error

func (*NetworkInfo) CheckHostNetworks

func (ni *NetworkInfo) CheckHostNetworks(hostIPNets []*net.IPNet) error

func (*NetworkInfo) ValidateNodeIP

func (ni *NetworkInfo) ValidateNodeIP(nodeIP string) error

Jump to

Keyboard shortcuts

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