Documentation ¶
Index ¶
- func DeleteFunction(gateway string, functionName string) error
- func Deploy(spec *DeployFunctionSpec, update bool, warnInsecureGateway bool) (int, string)
- func DeployFunction(spec *DeployFunctionSpec) int
- func GetFunctionInfo(gateway string, functionName string, tlsInsecure bool) (requests.Function, error)
- func GetSystemInfo(gateway string, tlsInsecure bool) (map[string]interface{}, error)
- func InvokeFunction(gateway string, name string, bytesIn *[]byte, contentType string, ...) (*[]byte, error)
- func ListFunctions(gateway string, tlsInsecure bool) ([]requests.Function, error)
- func MakeHTTPClient(timeout *time.Duration, tlsInsecure bool) http.Client
- func MakeHTTPClientWithDisableKeepAlives(timeout *time.Duration, tlsInsecure bool, disableKeepAlives *bool) http.Client
- func SetAuth(req *http.Request, gateway string)
- type DeployFunctionSpec
- type FunctionResourceRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteFunction ¶
DeleteFunction delete a function from the FaaS server
func Deploy ¶
func Deploy(spec *DeployFunctionSpec, update bool, warnInsecureGateway bool) (int, string)
Deploy a function to an OpenFaaS gateway over REST
func DeployFunction ¶
func DeployFunction(spec *DeployFunctionSpec) int
DeployFunction first tries to deploy a function and if it exists will then attempt a rolling update. Warnings are suppressed for the second API call (if required.)
func GetFunctionInfo ¶
func GetFunctionInfo(gateway string, functionName string, tlsInsecure bool) (requests.Function, error)
GetFunctionInfo get an OpenFaaS function information
func GetSystemInfo ¶
GetSystemInfo get system information from /system/info endpoint
func InvokeFunction ¶
func InvokeFunction(gateway string, name string, bytesIn *[]byte, contentType string, query []string, headers []string, async bool, httpMethod string, tlsInsecure bool) (*[]byte, error)
InvokeFunction a function
func ListFunctions ¶
ListFunctions list deployed functions
func MakeHTTPClient ¶
MakeHTTPClient makes a HTTP client with good defaults for timeouts.
Types ¶
type DeployFunctionSpec ¶
type DeployFunctionSpec struct { FProcess string Gateway string FunctionName string Image string RegistryAuth string Language string Replace bool EnvVars map[string]string Network string Constraints []string Update bool Secrets []string Labels map[string]string Annotations map[string]string FunctionResourceRequest FunctionResourceRequest ReadOnlyRootFilesystem bool TLSInsecure bool }
DeployFunctionSpec defines the spec used when deploying a function
type FunctionResourceRequest ¶
type FunctionResourceRequest struct { Limits *stack.FunctionResources Requests *stack.FunctionResources }
FunctionResourceRequest defines a request to set function resources