server

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListNamespaces

func ListNamespaces(defaultNamespace string, clientset kubernetes.Interface) []string

func MakeNamespacesLister

func MakeNamespacesLister(defaultNamespace string, clusterRole bool, clientset kubernetes.Interface) http.HandlerFunc

func NewHandlerFunc added in v0.1.22

func NewHandlerFunc(config types.FaaSConfig, resolver *k8s.FunctionLookup) http.HandlerFunc

func NewProxyClient added in v0.1.22

func NewProxyClient(timeout time.Duration, maxIdleConns int, maxIdleConnsPerHost int) *http.Client

NewProxyClient creates a new http.Client designed for proxying requests, this is exposed as a convenience method for internal or advanced uses. Most people should use NewProxyClientFromConfig.

func NewProxyClientFromConfig added in v0.1.22

func NewProxyClientFromConfig(config types.FaaSConfig) *http.Client

NewProxyClientFromConfig creates a new http.Client designed for proxying requests and enforcing certain minimum configuration values.

Types

type BaseURLResolver added in v0.1.22

type BaseURLResolver interface {
	Resolve(functionName string, suffix string) (url.URL, string, error)
	Update(duration time.Duration, functionName string, podName string)
	// contains filtered or unexported methods
}

BaseURLResolver URL resolver for proxy requests

The FaaS provider implementation is responsible for providing the resolver function implementation. BaseURLResolver.Resolve will receive the function name and should return the URL of the function service.

type NamespaceResolver

type NamespaceResolver func(r *http.Request) (namspace string, err error)

func NewNamsespaceResolver

func NewNamsespaceResolver(defaultNamespace string, kube kubernetes.Interface) NamespaceResolver

type Server

type Server struct {
	BootstrapHandlers *types.FaaSHandlers
	BootstrapConfig   *types.FaaSConfig
}

func New

func New(client clientset.Interface,
	kube kubernetes.Interface,
	podInformer coreinformer.PodInformer,
	sharepodLister lister.SharePodLister,
	clusterRole bool,
	sharepodLookup *k8s.FunctionLookup,
	cfg config.BootstrapConfig) *Server

New created HTTP server struct

func (*Server) Start

func (s *Server) Start()

Jump to

Keyboard shortcuts

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