Documentation ¶
Index ¶
- Variables
- func NewGRPCServer(c *Config, uc *service.UserCenterService, middlewares []middleware.Middleware) *grpc.Server
- func NewHTTPServer(c *Config, gw *service.UserCenterService, a authn.Authenticator, ...) *http.Server
- func NewMiddlewares(logger krtlog.Logger, a authn.Authenticator, v validate.IValidator) []middleware.Middleware
- func NewServers(hs *http.Server, gs *grpc.Server) []transport.Server
- func NewWhiteListMatcher() selector.MatchFunc
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewServers, NewGRPCServer, NewHTTPServer, NewMiddlewares)
ProviderSet defines a wire provider set.
Functions ¶
func NewGRPCServer ¶
func NewGRPCServer(c *Config, uc *service.UserCenterService, middlewares []middleware.Middleware) *grpc.Server
NewGRPCServer creates a new gRPC server with middleware options, and registers the UserCenterService.
func NewHTTPServer ¶
func NewHTTPServer(c *Config, gw *service.UserCenterService, a authn.Authenticator, middlewares []middleware.Middleware) *http.Server
NewHTTPServer creates a new HTTP server with middleware and handler chain.
func NewMiddlewares ¶
func NewMiddlewares(logger krtlog.Logger, a authn.Authenticator, v validate.IValidator) []middleware.Middleware
NewMiddlewares return middlewares used by grpc and http server both.
func NewServers ¶
NewServers is a wire provider function that creates and returns a slice of transport servers.
func NewWhiteListMatcher ¶
Types ¶
type Config ¶
type Config struct { HTTP genericoptions.HTTPOptions GRPC genericoptions.GRPCOptions TLS genericoptions.TLSOptions }
Config represents the configuration options for a service, including HTTP, GRPC, and TLS settings.
Click to show internal directories.
Click to hide internal directories.