hns

package
v0.0.0-...-21cfbab Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Allow ActionType = "Allow"
	Block ActionType = "Block"

	In  DirectionType = "In"
	Out DirectionType = "Out"

	Host   RuleType = "Host"
	Switch RuleType = "Switch"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLPolicy

type ACLPolicy struct {
	Type            PolicyType
	Id              string
	Protocol        uint16
	Protocols       string
	InternalPort    uint16
	Action          ActionType
	Direction       DirectionType
	LocalAddresses  string
	RemoteAddresses string
	LocalPorts      string
	LocalPort       uint16
	RemotePorts     string
	RemotePort      uint16
	RuleType        RuleType
	Priority        uint16
	ServiceName     string
}

type API

type API struct{}

func (API) GetAttachedContainerIDs

func (_ API) GetAttachedContainerIDs(endpoint *HNSEndpoint) ([]string, error)

func (API) GetHNSSupportedFeatures

func (a API) GetHNSSupportedFeatures() HNSSupportedFeatures

func (API) HNSListEndpointRequest

func (a API) HNSListEndpointRequest() ([]HNSEndpoint, error)

type ActionType

type ActionType string

type DirectionType

type DirectionType string

type HNSAclFeatures

type HNSAclFeatures struct {
	AclAddressLists       bool
	AclNoHostRulePriority bool
	AclPortRanges         bool
	AclRuleId             bool
}

type HNSEndpoint

type HNSEndpoint struct {
	Id                 string
	Name               string
	VirtualNetwork     string
	VirtualNetworkName string
	Policies           []json.RawMessage
	MacAddress         string
	IPAddress          net.IP
	DNSSuffix          string
	DNSServerList      string
	GatewayAddress     string
	EnableInternalDNS  bool
	DisableICC         bool
	PrefixLength       uint8
	IsRemoteEndpoint   bool
}

HNSEndpoint represents a network endpoint in HNS

func (*HNSEndpoint) ApplyACLPolicy

func (endpoint *HNSEndpoint) ApplyACLPolicy(policies ...*ACLPolicy) error

ApplyACLPolicy applies a set of ACL Policies on the Endpoint

type HNSSupportedFeatures

type HNSSupportedFeatures struct {
	Acl HNSAclFeatures
}

type Policy

type Policy struct {
}

type PolicyType

type PolicyType string

Type of Request Support in ModifySystem

const (
	Nat                  PolicyType = "Nat"
	ACL                  PolicyType = "ACL"
	PA                   PolicyType = "PA"
	VLAN                 PolicyType = "VLAN"
	VSID                 PolicyType = "VSID"
	VNet                 PolicyType = "VNet"
	L2Driver             PolicyType = "L2Driver"
	Isolation            PolicyType = "Isolation"
	QOS                  PolicyType = "QOS"
	OutboundNat          PolicyType = "OutboundNat"
	ExternalLoadBalancer PolicyType = "ExternalLoadBalancer"
	Route                PolicyType = "Route"
)

RequestType const

type RuleType

type RuleType string

Jump to

Keyboard shortcuts

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