server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructFunction

func ConstructFunction(function *restclient.Function) (*model.Function, error)

func LoadConfigFromEnv

func LoadConfigFromEnv() *common.Config

func LoadStandaloneConfigFromEnv

func LoadStandaloneConfigFromEnv() *common.Config

Types

type Server

type Server struct {
	Manager *fs.FunctionManager
	// contains filtered or unexported fields
}

func NewDefaultServer

func NewDefaultServer() (*Server, error)

func NewServer

func NewServer(opts ...ServerOption) (*Server, error)

func NewServerWithConfig

func NewServerWithConfig(config *common.Config) (*Server, error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) Run

func (s *Server) Run(context context.Context)

func (*Server) WaitForReady

func (s *Server) WaitForReady(ctx context.Context) <-chan struct{}

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

func WithFunctionManager

func WithFunctionManager(opts ...fs.ManagerOption) ServerOption

WithFunctionManager sets the function Manager for the server.

func WithHttpListener

func WithHttpListener(listener net.Listener) ServerOption

WithHttpListener sets the listener for the HTTP server. If not set, the server will listen on the Config.ListenAddr.

func WithHttpTubeFactory

func WithHttpTubeFactory(factory *contube.HttpTubeFactory) ServerOption

WithHttpTubeFactory sets the factory for the HTTP tube. If not set, the server will use the default HTTP tube factory.

Jump to

Keyboard shortcuts

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