node

package
v1.0.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Boundbox

func Boundbox(points [][]float64) []float64

Boundbox returns a rectangle which created according to the points of the polygon given

func CompareIPAddresses

func CompareIPAddresses(oldObj *corev1.Node, newObj *corev1.Node) bool

CompareIPAddresses makes a comparison between old and new objects of the node to return the information of the match

func CreateJoinToken

func CreateJoinToken(ttl string, hostname string) string

CreateJoinToken generates token to be used on adding a node onto the cluster

func GeoFence

func GeoFence(boundbox []float64, polygon [][]float64, y float64, x float64) bool

GeoFence function determines whether the point is inside a polygon by using the crossing number method. This method counts the number of times a ray starting at a point crosses a polygon boundary edge. The even numbers mean the point is outside and the odd ones mean the point is inside.

func GetConditionReadyStatus

func GetConditionReadyStatus(node *corev1.Node) string

GetConditionReadyStatus picks the ready status of node

func GetGeolocationByIP

func GetGeolocationByIP(hostname string, ipStr string) bool

GetGeolocationByIP return geolabels by taking advantage of GeoLite database

func GetList

func GetList() []string

GetList uses clientset to get node list of the cluster

func GetNodeIPAddresses

func GetNodeIPAddresses(obj *corev1.Node) (string, string)

GetNodeIPAddresses picks up the internal and external IP addresses of the Node

func GetStatusList

func GetStatusList() []byte

GetStatusList uses clientset to get node list of the cluster that contains Ready State info

func SetHostname

func SetHostname(hostRecord namecheap.DomainDNSHost) (bool, string)

SetHostname generates token to be used on adding a node onto the cluster

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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