server

package
v1.56.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder added in v1.5.0

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

Builder is a new builder for Servers.

func NewBuilder added in v1.5.0

func NewBuilder() *Builder

NewBuilder creates a new builder object for servers.

func (*Builder) Build added in v1.5.0

func (b *Builder) Build(log logr.Logger) *Server

Build builds a Server object.

func (*Builder) WithBindAddress added in v1.5.0

func (b *Builder) WithBindAddress(bindAddress string) *Builder

WithBindAddress sets the bind address.

func (*Builder) WithHandler added in v1.5.0

func (b *Builder) WithHandler(pattern string, handler http.Handler) *Builder

WithHandler adds a specific handler.

func (*Builder) WithHandlerFunc added in v1.5.0

func (b *Builder) WithHandlerFunc(pattern string, handlerFunc http.HandlerFunc) *Builder

WithHandlerFunc adds a specific handlerFunc.

func (*Builder) WithHandlerFuncs added in v1.5.0

func (b *Builder) WithHandlerFuncs(handlerFuncs map[string]http.HandlerFunc) *Builder

WithHandlerFuncs sets the handlerFuncs list.

func (*Builder) WithHandlers added in v1.5.0

func (b *Builder) WithHandlers(handlers map[string]http.Handler) *Builder

WithHandlers sets the handlers list.

func (*Builder) WithPort added in v1.5.0

func (b *Builder) WithPort(port int) *Builder

WithPort sets the port.

func (*Builder) WithTLS added in v1.5.0

func (b *Builder) WithTLS(certPath, keyPath string) *Builder

WithTLS sets the paths for the TLS certificate and key. If they are set then a HTTPS server will be built.

type Server added in v1.5.0

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

Server is a HTTP(S) server.

func (*Server) Start added in v1.5.0

func (s *Server) Start(ctx context.Context)

Start starts the server. If the TLS cert and key paths are provided then it will start it as HTTPS server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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