proxy

package
v0.0.0-...-dbb4c78 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFunction

func DeleteFunction(gateway string, functionName string) error

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 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

func ListFunctions(gateway string, tlsInsecure bool) ([]requests.Function, error)

ListFunctions list deployed functions

func MakeHTTPClient

func MakeHTTPClient(timeout *time.Duration, tlsInsecure bool) http.Client

MakeHTTPClient makes a HTTP client with good defaults for timeouts.

func SetAuth

func SetAuth(req *http.Request, gateway string)

SetAuth sets basic auth for the given gateway

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

Jump to

Keyboard shortcuts

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