utils

package
v1.0.1-0...-f351835 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HostIPEnvVar is the environment variable to override host's chosen IP address.
	HostIPEnvVar = "DAPR_HOST_IP"
)

Variables

This section is empty.

Functions

func GetConfig

func GetConfig() *rest.Config

GetConfig gets a kubernetes rest config

func GetHostAddress

func GetHostAddress() (string, error)

GetHostAddress selects a valid outbound IP address for the host.

func GetKubeClient

func GetKubeClient() *kubernetes.Clientset

GetKubeClient gets a kubernetes client

func ParseEnvString

func ParseEnvString(envStr string) []corev1.EnvVar

add env-vars from annotations. see https://github.com/dapr/dapr/issues/2508.

func StringSliceContains

func StringSliceContains(needle string, haystack []string) bool

StringSliceContains return true if an array containe the "str" string

func ToISO8601DateTimeString

func ToISO8601DateTimeString(dateTime time.Time) string

ToISO8601DateTimeString converts dateTime to ISO8601 Format ISO8601 Format: 2020-01-01T01:01:01.10101Z

Types

This section is empty.

Jump to

Keyboard shortcuts

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