handlers

package
v0.0.0-...-c12505a Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OrchestrationIdentifier identifier string for provider orchestration
	OrchestrationIdentifier = "containerd"

	// ProviderName name of the provider
	ProviderName = "faasd"
)

Variables

This section is empty.

Functions

func ListFunctions

func ListFunctions(client *containerd.Client, namespace string) (map[string]*Function, error)

ListFunctions returns a map of all functions with running tasks on namespace

func ListNamespaces

func ListNamespaces(client *containerd.Client) []string

func MakeDeleteHandler

func MakeDeleteHandler(client *containerd.Client, cni gocni.CNI) func(w http.ResponseWriter, r *http.Request)

func MakeDeployHandler

func MakeDeployHandler(client *containerd.Client, cni gocni.CNI, secretMountPath string, alwaysPull bool) func(w http.ResponseWriter, r *http.Request)

MakeDeployHandler returns a handler to deploy a function

func MakeInfoHandler

func MakeInfoHandler(version, sha string) http.HandlerFunc

MakeInfoHandler creates handler for /system/info endpoint

func MakeMutateNamespace

func MakeMutateNamespace(client *containerd.Client) func(w http.ResponseWriter, r *http.Request)

func MakeNamespacesLister

func MakeNamespacesLister(client *containerd.Client) func(w http.ResponseWriter, r *http.Request)

func MakeReadHandler

func MakeReadHandler(client *containerd.Client) func(w http.ResponseWriter, r *http.Request)

func MakeReplicaReaderHandler

func MakeReplicaReaderHandler(client *containerd.Client) func(w http.ResponseWriter, r *http.Request)

func MakeReplicaUpdateHandler

func MakeReplicaUpdateHandler(client *containerd.Client, cni gocni.CNI) func(w http.ResponseWriter, r *http.Request)

func MakeSecretHandler

func MakeSecretHandler(store provider.Labeller, mountPath string) func(w http.ResponseWriter, r *http.Request)

func MakeUpdateHandler

func MakeUpdateHandler(client *containerd.Client, cni gocni.CNI, secretMountPath string, alwaysPull bool) func(w http.ResponseWriter, r *http.Request)

Types

type Function

type Function struct {
	IP string
	// contains filtered or unexported fields
}

func GetFunction

func GetFunction(client *containerd.Client, name string, namespace string) (Function, error)

GetFunction returns a function that matches name

type HttpError

type HttpError struct {
	Err    error
	Status int
}

func (*HttpError) Error

func (e *HttpError) Error() string

type InvokeResolver

type InvokeResolver struct {
	// contains filtered or unexported fields
}

func NewInvokeResolver

func NewInvokeResolver(client *containerd.Client) *InvokeResolver

func (*InvokeResolver) Resolve

func (i *InvokeResolver) Resolve(functionName string) (url.URL, error)

Jump to

Keyboard shortcuts

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