util

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SPEC_IGNORE_FILE    = ".specignore"
	COMMIT_LABEL        = "commit"
	FISSION_AUTH_URI    = "/auth/login"
	FISSION_AUTH_TOKEN  = "FISSION_AUTH_TOKEN"
	FISSION_STORAGE_URI = "/v1/archive"
)

fission-cli options

View Source
const (
	ENV_FISSION_NAMESPACE  string = "FISSION_NAMESPACE"
	ENV_FISSION_URL        string = "FISSION_URL"
	ENV_FISSION_AUTH_TOKEN string = "FISSION_AUTH_TOKEN"
)
View Source
const (
	ENV_FUNCTION_NAMESPACE string = "FUNCTION_NAMESPACE"
)

Variables

This section is empty.

Functions

func ApplyLabelsAndAnnotations added in v1.14.1

func ApplyLabelsAndAnnotations(input cli.Input, objectMeta *metav1.ObjectMeta) error

func CheckFunctionExistence

func CheckFunctionExistence(ctx context.Context, client cmd.Client, functions []string, fnNamespace string) (err error)

given a list of functions, this checks if the functions actually exist on the cluster

func CheckHTTPTriggerDuplicates added in v1.18.0

func CheckHTTPTriggerDuplicates(ctx context.Context, client cmd.Client, t *fv1.HTTPTrigger) error

CheckHTTPTriggerDuplicates checks whether the tuple (Method, Host, URL) is duplicate or not.

func ConfigMapExists added in v1.18.0

func ConfigMapExists(ctx context.Context, m *metav1.ObjectMeta, kClient kubernetes.Interface) error

func FunctionPodLogs added in v1.18.0

func FunctionPodLogs(ctx context.Context, fnName, ns string, client cmd.Client) (err error)

FunctionPodLogs : Get logs for a function directly from pod

func GetApplicationUrl

func GetApplicationUrl(ctx context.Context, client cmd.Client, selector string) (string, error)

func GetEnvVarFromStringSlice added in v1.16.0

func GetEnvVarFromStringSlice(params []string) []v1.EnvVar

GetEnvVarFromStringSlice parses key, val from "key=val" string array and updates passed []v1.EnvVar

func GetFissionNamespace

func GetFissionNamespace() string

func GetResourceReqs added in v1.7.0

func GetResourceReqs(input cli.Input, resReqs *v1.ResourceRequirements) (*v1.ResourceRequirements, error)

func GetRouterURL added in v1.20.0

func GetRouterURL(ctx context.Context, cmdClient cmd.Client) (serverURL *url.URL, err error)

func GetServerInfo added in v1.18.0

func GetServerInfo(input cli.Input, cmdClient cmd.Client) *info.ServerInfo

func GetSpecDir added in v1.7.0

func GetSpecDir(input cli.Input) string

func GetSpecIgnore added in v1.15.0

func GetSpecIgnore(input cli.Input) string

func GetSpecIgnoreParser added in v1.15.0

func GetSpecIgnoreParser(specDir, specIgnore string) (ignore.IgnoreParser, error)

GetSpecIgnoreParser reads the specignore file and returns the ignore.IgnoreParser if the specignore file does not exist it returns empty ignore.IgnoreParser

func GetStorageURL added in v1.17.0

func GetStorageURL(ctx context.Context, client cmd.Client) (*url.URL, error)

func GetValidationFlag added in v1.12.0

func GetValidationFlag(input cli.Input) bool

func GetVersion

func GetVersion(ctx context.Context, input cli.Input, cmdClient cmd.Client) info.Versions

func IsNotFound added in v1.16.0

func IsNotFound(err error) bool

func KubifyName

func KubifyName(old string) string

KubifyName make a kubernetes compliant name out of an arbitrary string

func ParseAnnotations added in v1.14.1

func ParseAnnotations(annotations []string) (map[string]string, error)

func ResolveFunctionNS added in v1.18.0

func ResolveFunctionNS(namespace string) string

func SecretExists added in v1.18.0

func SecretExists(ctx context.Context, m *metav1.ObjectMeta, kClient kubernetes.Interface) error

func SetupPortForward

func SetupPortForward(ctx context.Context, client cmd.Client, namespace, labelSelector string) (string, error)

Port forward a free local port to a pod on the cluster. The pod is found in the specified namespace by labelSelector. The pod's port is found by looking for a service in the same namespace and using its targetPort. Once the port forward is started, wait for it to start accepting connections before returning.

func UpdateMapFromStringSlice added in v1.11.0

func UpdateMapFromStringSlice(dataMap *map[string]string, params []string) bool

UpdateMapFromStringSlice parses key, val from "key=val" string array and updates passed map

func UrlForFunction added in v1.13.0

func UrlForFunction(name, namespace string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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