hcnshim

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 2 Imported by: 0

README

hcnshim

This package provides the Golang interface for accessing Windows HCN APIs to manage entities within the Host Network Service (HNS), which serves as the server container networking component in Windows. While it is mainly utilized by the Windows Kube Proxy component in Kubernetes, it is also available for use in other projects, such as Azure CNI, Windows CNI, Calico CNI, Flannel CNI, Azure NPM, and more.

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorEmptyMacAddressList = errors.New("management mac_address list is empty")
)
View Source
var (
	HNSVersion1803 = hns.HNSVersion1803
)

Functions

func HotAttachEndpoint added in v0.0.2

func HotAttachEndpoint(containerID string, endpointID string) error

HotAttachEndpoint makes a HCS Call to attach the endpoint to the container

func HotDetachEndpoint added in v0.0.2

func HotDetachEndpoint(containerID string, endpointID string) error

HotDetachEndpoint makes a HCS Call to detach the endpoint from the container

Types

type EndpointAttachDetachRequest added in v0.0.2

type EndpointAttachDetachRequest = hns.EndpointAttachDetachRequest

EndpointAttachDetachRequest is the structure used to send request to the container to modify the system Supported resource types are Network and Request Types are Add/Remove

type EndpointResquestResponse added in v0.0.2

type EndpointResquestResponse = hns.EndpointResquestResponse

EndpointResquestResponse is object to get the endpoint request response

type HNSAclFeatures

type HNSAclFeatures = hns.HNSAclFeatures

type HNSEndpoint added in v0.0.2

type HNSEndpoint = hns.HNSEndpoint

HNSEndpoint represents a network endpoint in HNS

func GetHNSEndpointByID added in v0.0.2

func GetHNSEndpointByID(endpointID string) (*HNSEndpoint, error)

GetHNSEndpointByID get the Endpoint by ID

func GetHNSEndpointByName added in v0.0.2

func GetHNSEndpointByName(endpointName string) (*HNSEndpoint, error)

GetHNSEndpointByName gets the endpoint filtered by Name

func HNSEndpointRequest added in v0.0.2

func HNSEndpointRequest(method, path, request string) (*HNSEndpoint, error)

HNSEndpointRequest makes a HNS call to modify/query a network endpoint

func HNSListEndpointRequest added in v0.0.2

func HNSListEndpointRequest() ([]HNSEndpoint, error)

HNSListEndpointRequest makes a HNS call to query the list of available endpoints

type HNSEndpointStats added in v0.0.2

type HNSEndpointStats = hns.EndpointStats

HNSEndpointStats represent the stats for an networkendpoint in HNS

func GetHNSEndpointStats added in v0.0.2

func GetHNSEndpointStats(endpointName string) (*HNSEndpointStats, error)

GetHNSEndpointStats gets the endpoint stats by ID

type HNSGlobals

type HNSGlobals = hns.HNSGlobals

func GetHNSGlobals

func GetHNSGlobals() (*HNSGlobals, error)

type HNSNetwork added in v0.0.2

type HNSNetwork = hns.HNSNetwork

HNSNetwork represents a network in HNS

func GetHNSNetworkByID added in v0.0.2

func GetHNSNetworkByID(networkID string) (*HNSNetwork, error)

GetHNSNetworkByID

func GetHNSNetworkByName added in v0.0.2

func GetHNSNetworkByName(networkName string) (*HNSNetwork, error)

GetHNSNetworkName filtered by Name

func HNSListNetworkRequest added in v0.0.2

func HNSListNetworkRequest(method, path, request string) ([]HNSNetwork, error)

HNSListNetworkRequest makes a HNS call to query the list of available networks

func HNSNetworkRequest added in v0.0.2

func HNSNetworkRequest(method, path, request string) (*HNSNetwork, error)

HNSNetworkRequest makes a call into HNS to update/query a single network

type HNSNnvManagementMacAddress

type HNSNnvManagementMacAddress = hns.HNSNnvManagementMacAddress

HNSNnvManagementMacAddress represents management mac address which needs to be excluded from VF reassignment

type HNSNnvManagementMacList

type HNSNnvManagementMacList = hns.HNSNnvManagementMacList

HNSNnvManagementMacList represents a list of management mac addresses for exclusion from VF reassignment

func DeleteNnvManagementMacAddresses

func DeleteNnvManagementMacAddresses() (*HNSNnvManagementMacList, error)

DeleteNnvManagementMacAddresses delete list of management mac addresses in hns which are excluded from VF reassignment.

func GetNnvManagementMacAddresses

func GetNnvManagementMacAddresses() (*HNSNnvManagementMacList, error)

GetNnvManagementMacAddresses retrieves a list of management mac addresses in hns for exclusion from VF reassignment.

func SetNnvManagementMacAddresses

func SetNnvManagementMacAddresses(managementMacAddresses []string) (*HNSNnvManagementMacList, error)

SetNnvManagementMacAddresses sets a list of management mac addresses in hns for exclusion from VF reassignment.

type HNSSupportedFeatures

type HNSSupportedFeatures = hns.HNSSupportedFeatures

func GetHNSSupportedFeatures

func GetHNSSupportedFeatures() HNSSupportedFeatures

type HNSVersion

type HNSVersion = hns.HNSVersion

type MacPool added in v0.0.2

type MacPool = hns.MacPool

MacPool is associated with a network and represents a list of macaddresses available to the network

type Namespace added in v0.0.2

type Namespace = hns.Namespace

Namespace represents a Compartment.

type Subnet added in v0.0.2

type Subnet = hns.Subnet

Subnet is associated with a network and represents a list of subnets available to the network

type SystemType added in v0.0.2

type SystemType string

SystemType represents the type of the system on which actions are done

const (
	ContainerType      SystemType = "Container"
	VirtualMachineType SystemType = "VirtualMachine"
	HostType           SystemType = "Host"
)

SystemType const

Directories

Path Synopsis
Package hcn is a shim for the Host Compute Networking (HCN) service, which manages networking for Windows Server containers and Hyper-V containers.
Package hcn is a shim for the Host Compute Networking (HCN) service, which manages networking for Windows Server containers and Hyper-V containers.
internal
cni
hns
log
oc

Jump to

Keyboard shortcuts

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