server

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package server is a package that holds the http or grpc service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCServer

func NewGRPCServer(addr string, opts ...GrpcOption) app.IServer

NewGRPCServer creates a new grpc server

func NewHTTPServer

func NewHTTPServer(addr string, opts ...HTTPOption) app.IServer

NewHTTPServer creates a new http server

func NewHTTPServer_pbExample

func NewHTTPServer_pbExample(addr string, opts ...HTTPOption) app.IServer

NewHTTPServer_pbExample creates a new web server

Types

type GrpcOption

type GrpcOption func(*grpcOptions)

GrpcOption grpc settings

func WithGrpcRegistry

func WithGrpcRegistry(iRegistry registry.Registry, instance *registry.ServiceInstance) GrpcOption

WithGrpcRegistry registration services

type HTTPOption

type HTTPOption func(*httpOptions)

HTTPOption setting up http

func WithHTTPHandler

func WithHTTPHandler(handler http.Handler) HTTPOption

WithHTTPHandler supplies the application handler.

func WithHTTPIsProd

func WithHTTPIsProd(isProd bool) HTTPOption

WithHTTPIsProd setting up production environment markers

func WithHTTPRegistry

func WithHTTPRegistry(iRegistry registry.Registry, instance *registry.ServiceInstance) HTTPOption

WithHTTPRegistry registration services

func WithHTTPTLS

func WithHTTPTLS(tls config.TLS) HTTPOption

WithHTTPTLS setting up tls

Jump to

Keyboard shortcuts

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