functions

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Direktiv Headers
	ServiceHeaderName          = "direktiv.io/name"
	ServiceHeaderNamespaceID   = "direktiv.io/namespace-id"
	ServiceHeaderNamespaceName = "direktiv.io/namespace-name"
	ServiceHeaderWorkflowID    = "direktiv.io/workflow-id"
	ServiceHeaderPath          = "direktiv.io/path"
	ServiceHeaderRevision      = "direktiv.io/revision"
	ServiceHeaderSize          = "direktiv.io/size"
	ServiceHeaderScale         = "direktiv.io/scale"
	ServiceTemplateGeneration  = "direktiv.io/templateGeneration"
	ServiceHeaderScope         = "direktiv.io/scope"

	// Serving Headers
	ServiceKnativeHeaderName            = "serving.knative.dev/service"
	ServiceKnativeHeaderConfiguration   = "serving.knative.dev/configuration"
	ServiceKnativeHeaderGeneration      = "serving.knative.dev/configurationGeneration"
	ServiceKnativeHeaderRevision        = "serving.knative.dev/revision"
	ServiceKnativeHeaderRolloutDuration = "serving.knative.dev/rolloutDuration"

	// Extra Annotations
	ServiceKongIngressHeaderTimeoutName = "direktiv-functions-timeout"
	ServiceKongIngressHeaderTimeout     = "konghq.com/override"
)

Headers for knative services

View Source
const (
	PrefixWorkflow  = "workflow"
	PrefixNamespace = "namespace"
	PrefixGlobal    = "global"
	PrefixService   = "service" // unused, only if a one item list is requested
)

Available prefixes for different scopes

View Source
const (
	PodEnvActionID   = "DIREKTIV_ACTIONID"
	PodEnvInstanceID = "DIREKTIV_INSTANCEID"
	PodEnvStep       = "DIREKTIV_STEP"
)

Pod env vars

View Source
const FunctionsChannel = "fnsync"

Variables

This section is empty.

Functions

func AssembleWorkflowServiceName added in v0.5.5

func AssembleWorkflowServiceName(wf, svn string, hash uint64) string

AssembleWorkflowServiceName generates a knative name based on workflow details

func GenerateServiceName

func GenerateServiceName(info *igrpc.BaseInfo) (string, string, string)

GenerateServiceName generates a knative name based on workflow details

func GenerateWorkflowServiceName added in v0.5.0

func GenerateWorkflowServiceName(info *igrpc.BaseInfo) (string, string)

GenerateWorkflowServiceName generates a knative name based on workflow details

func SanitizeLabel added in v0.5.0

func SanitizeLabel(s string) string

func StartServer

func StartServer(echan chan error)

StartServer starts functions grpc server

func StopServer

func StopServer()

StopServer is stopping server gracefully

Types

type HeartbeatTuple added in v0.5.0

type HeartbeatTuple struct {
	NamespaceName      string
	NamespaceID        string
	WorkflowPath       string
	WorkflowID         string
	Revision           string
	FunctionDefinition *model.ReusableFunctionDefinition
}

Directories

Path Synopsis
ent

Jump to

Keyboard shortcuts

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