server

package
v0.0.0-...-01b96be Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ProviderSet is server providers.
	ProviderSet = wire.NewSet(
		NewRateLimiter,
		NewMux,
		NewTLS,
		NewMiddlewares,
		NewGRPCServer,
		NewHTTPServer,
	)
)

Functions

func NewGRPCServer

func NewGRPCServer(
	c *config.Config,
	srv *service.GenDataService,
	mws []middleware.Middleware,
	mux cmux.CMux,
	logger log.Logger,
	tlsCfg *tls.Config,
) *tgrpc.Server

NewGRPCServer new a gRPC server.

func NewHTTPServer

func NewHTTPServer(
	c *config.Config,
	srv *service.GenDataService,
	mws []middleware.Middleware,
	mux cmux.CMux,
	logger log.Logger,
	tlsCfg *tls.Config,
) *thttp.Server

NewHTTPServer new as HTTP server.

func NewMiddlewares

func NewMiddlewares(
	c *config.Config,
	logger log.Logger,
	limiter ratelimit.Limiter,
) []middleware.Middleware

func NewMux

func NewMux(c *config.Config) cmux.CMux

func NewRateLimiter

func NewRateLimiter(c *config.Config) ratelimit.Limiter

func NewTLS

func NewTLS(c *config.Config) *tls.Config

Types

This section is empty.

Jump to

Keyboard shortcuts

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