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 web 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 WithGrpcReadTimeout ¶
func WithGrpcReadTimeout(timeout time.Duration) GrpcOption
WithGrpcReadTimeout setting up read timeout
func WithGrpcRegistry ¶
func WithGrpcRegistry(iRegistry registry.Registry, instance *registry.ServiceInstance) GrpcOption
WithGrpcRegistry registration services
func WithGrpcWriteTimeout ¶
func WithGrpcWriteTimeout(timeout time.Duration) GrpcOption
WithGrpcWriteTimeout setting up writer timeout
type HTTPOption ¶
type HTTPOption func(*httpOptions)
HTTPOption setting up http
func WithHTTPIsProd ¶
func WithHTTPIsProd(isProd bool) HTTPOption
WithHTTPIsProd setting up production environment markers
func WithHTTPReadTimeout ¶
func WithHTTPReadTimeout(timeout time.Duration) HTTPOption
WithHTTPReadTimeout setting up read timeout
func WithHTTPRegistry ¶
func WithHTTPRegistry(iRegistry registry.Registry, instance *registry.ServiceInstance) HTTPOption
WithHTTPRegistry registration services
func WithHTTPWriteTimeout ¶
func WithHTTPWriteTimeout(timeout time.Duration) HTTPOption
WithHTTPWriteTimeout setting up writer timeout
Click to show internal directories.
Click to hide internal directories.