common

package
v0.0.0-...-cdf8e41 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//service定义时使用
	ServiceAnnotationInternalSlbId = "service.beta.kubernetes.io/inspur-load-balancer-slbid"
	//Listener forwardRule
	ServiceAnnotationLBForwardRule = "loadbalancer.inspur.com/forward-rule"
	//Listener isHealthCheck
	ServiceAnnotationLBHealthCheck = "loadbalancer.inspur.com/is-healthcheck"
	//Listener typeHealthCheck
	ServiceAnnotationLBtypeHealthCheck = "loadbalancer.inspur.com/healthcheck-type"
	//Listener portHealthCheck
	ServiceAnnotationLBportHealthCheck = "loadbalancer.inspur.com/healthcheck-port"
	//Listener periodHealthCheck
	ServiceAnnotationLBperiodHealthCheck = "loadbalancer.inspur.com/healthcheck-period"
	//Listener timeoutHealthCheck
	ServiceAnnotationLBtimeoutHealthCheck = "loadbalancer.inspur.com/healthcheck-timeout"
	//Listener maxHealthCheck
	ServiceAnnotationLBmaxHealthCheck = "loadbalancer.inspur.com/healthcheck-max"
	//Listener domainHealthCheck
	ServiceAnnotationLBdomainHealthCheck = "loadbalancer.inspur.com/healthcheck-domain"
	//Listener pathHealthCheck
	ServiceAnnotationLBpathHealthCheck = "loadbalancer.inspur.com/healthcheck-path"

	NodeAnnotationInstanceID = "node.beta.kubernetes.io/instance-id"
)

Variables

This section is empty.

Functions

func GetFirstUID

func GetFirstUID(uid string) string

func GetNodePort

func GetNodePort(service *v1.Service, port int32, protocol v1.Protocol) (nodePort int32, found bool)

func GetPortsOfService

func GetPortsOfService(service *v1.Service) ([]int, []int)

GetPortsOfService return service ports and nodeports

func IntIndex

func IntIndex(vs []int, t int) int

func StringIndex

func StringIndex(vs []string, t string) int

func TwoArrayEqual

func TwoArrayEqual(a []int, b []int) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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