util

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSubnetTooSmall = errors.New("subnet too smal")
)

Functions

func GetDNSIP

func GetDNSIP(svcSubnet string) (net.IP, error)

GetDNSIP returns a dnsIP, which is 10th IP in svcSubnet CIDR range

func GetIndexedIP

func GetIndexedIP(subnet *net.IPNet, index int) (net.IP, error)

GetIndexedIP returns a net.IP that is subnet.IP + index in the contiguous IP space. Has been copied from the source to reduce number of dependencies. src: https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/core/service/ipallocator/allocator.go#L280

func GetKubernetesDefaultSvcIP

func GetKubernetesDefaultSvcIP(svcSubnet string) (net.IP, error)

TODO: move to the separate package? GetDNSIP returns a dnsIP, which is 10th IP in svcSubnet CIDR range

Types

This section is empty.

Jump to

Keyboard shortcuts

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