server

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSinglePageApp added in v0.0.20

func NewSinglePageApp(staticPath string, indexPath string) http.Handler

NewSinglePageApp return the handler for a Single Page App

Types

type BootstrapperFunc added in v1.0.12

type BootstrapperFunc func(config interface{}, serverSetter *ServerSetter)

type GrpcDefinitionsFunc added in v1.0.12

type GrpcDefinitionsFunc func(grpcServer *grpc.Server)

type Listener added in v1.0.12

type Listener interface {
	Start() chan ListenerError
	Stop()
}

type ListenerBuilder added in v1.0.12

type ListenerBuilder interface {
	SetBootstrapper(bootstrapperFunc BootstrapperFunc) ListenerBuilder
	SetGrpcDefinitions(setProtobufFunc GrpcDefinitionsFunc) ListenerBuilder
	GetListener() Listener
}

ListenerBuilder defines a object responsible to builds listeners

func NewListenerBuilder added in v1.0.12

func NewListenerBuilder(configHandler configuration.ConfigHandler, logger logs.Logger, errorCatcher errors.ErrorCatcher, errorDefer errors.ErrorDefer) ListenerBuilder

NewListenerBuilder returns a ListenerBuilder

type ListenerBuilderError added in v1.0.12

type ListenerBuilderError interface {
	errors.CustomError
	GetErrorType() ListenerBuilderErrorType
}

ListenerBuilderError is the errors of ListenerBuilder

type ListenerBuilderErrorType added in v1.0.12

type ListenerBuilderErrorType uint8
const (
	UnexpectedBuilderError ListenerBuilderErrorType = iota
	NilBootstraperError
	NilGrpcDefinitionsError
)

type ListenerError added in v1.0.12

type ListenerError interface {
	errors.CustomError
	GetErrorType() ListenerErrorType
}

type ListenerErrorType added in v1.0.12

type ListenerErrorType uint8
const (
	UnexpectedError ListenerErrorType = iota
	AddressNotConfigured
)

type ServerSetter

type ServerSetter struct {
	Name         string
	Addr         string
	Handler      http.Handler
	TLSConfig    *tls.Config
	TLSNextProto map[string]func(*http.Server, *tls.Conn, http.Handler)
	ServerType   ServerType
	IsChecking   bool
}

type ServerType

type ServerType uint8
const (
	HttpServer ServerType = iota
	GRpcSever
)

type State added in v1.0.12

type State uint8

Directories

Path Synopsis
ioc

Jump to

Keyboard shortcuts

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