zenServer

package
v0.0.0-...-21f792c Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthCheckHook

type HealthCheckHook func(ctx context.Context) (int, map[string]map[string]interface{})

type HttpErrorHandler

type HttpErrorHandler func(err error, eCtx echo.Context)

type HttpHook

type HttpHook func(ec *echo.Echo)

type HttpOption

type HttpOption interface {
	Apply(o *httpOptions)
}

func WithHttpAfterExit

func WithHttpAfterExit(hook HttpHook) HttpOption

func WithHttpAfterRun

func WithHttpAfterRun(hook HttpHook) HttpOption

func WithHttpBeforeExit

func WithHttpBeforeExit(hook HttpHook) HttpOption

func WithHttpBeforeRun

func WithHttpBeforeRun(hook HttpHook) HttpOption

func WithHttpEnable

func WithHttpEnable(enable bool) HttpOption

func WithHttpErrorHandler

func WithHttpErrorHandler(hook HttpErrorHandler) HttpOption

func WithHttpGraceFulPeriod

func WithHttpGraceFulPeriod(duration time.Duration) HttpOption

func WithHttpHealthAccessKey

func WithHttpHealthAccessKey(accessKey string) HttpOption

func WithHttpHealthCheck

func WithHttpHealthCheck(hook HealthCheckHook) HttpOption

func WithHttpPort

func WithHttpPort(port int) HttpOption

func WithHttpRegister

func WithHttpRegister(hook HttpHook) HttpOption

func WithHttpValidator

func WithHttpValidator(validator zenValidator.Validator) HttpOption

type HttpServer

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

func NewHttp

func NewHttp(serviceName, serviceVersion, basePath string, opts ...HttpOption) *HttpServer

func (*HttpServer) Serve

func (s *HttpServer) Serve(sig chan os.Signal)

func (*HttpServer) Shutdown

func (s *HttpServer) Shutdown()

Jump to

Keyboard shortcuts

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