Documentation ¶
Index ¶
- func AllInOneServer(configFilePath string, configOpts []configutil.Option, ...) (*kratos.App, func(), error)
- func GetApp(serverManager ServerManager) (*kratos.App, error)
- func GetGRPCServer(serverManager ServerManager) (*grpc.Server, error)
- func GetHTTPServer(serverManager ServerManager) (*http.Server, error)
- func NewApp(launcherManager setuputil.LauncherManager, hs *http.Server, gs *grpc.Server) (*kratos.App, error)
- func NewGRPCServer(launcherManager setuputil.LauncherManager, ...) (*grpc.Server, error)
- func NewHTTPServer(launcherManager setuputil.LauncherManager, ...) (*http.Server, error)
- func RunServer(app *kratos.App, cleanup func())
- type ServerManager
- type ServiceExporter
- type ServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllInOneServer ¶ added in v0.0.9
func AllInOneServer( configFilePath string, configOpts []configutil.Option, services []ServiceExporter, authWhitelist []map[string]middlewareutil.TransportServiceKind, ) (*kratos.App, func(), error)
func GetApp ¶
func GetApp(serverManager ServerManager) (*kratos.App, error)
func GetGRPCServer ¶
func GetGRPCServer(serverManager ServerManager) (*grpc.Server, error)
func GetHTTPServer ¶
func GetHTTPServer(serverManager ServerManager) (*http.Server, error)
func NewApp ¶
func NewApp(launcherManager setuputil.LauncherManager, hs *http.Server, gs *grpc.Server) (*kratos.App, error)
NewApp .
func NewGRPCServer ¶
func NewGRPCServer( launcherManager setuputil.LauncherManager, authWhiteList map[string]middlewareutil.TransportServiceKind, ) (*grpc.Server, error)
NewGRPCServer new a gRPC server.
func NewHTTPServer ¶
func NewHTTPServer( launcherManager setuputil.LauncherManager, authWhiteList map[string]middlewareutil.TransportServiceKind, ) (*http.Server, error)
NewHTTPServer new HTTP server.
Types ¶
type ServerManager ¶
type ServerManager interface { GetApp() (*kratos.App, error) GetHTTPServer() (*http.Server, error) GetGRPCServer() (*grpc.Server, error) }
func NewServerManager ¶
func NewServerManager(launcherManager setuputil.LauncherManager, authWhiteList map[string]middlewareutil.TransportServiceKind) (ServerManager, error)
type ServiceExporter ¶ added in v0.0.8
type ServiceExporter func(launcherManager setuputil.LauncherManager, serverManager ServerManager) (ServiceInterface, error)
type ServiceInterface ¶ added in v0.0.8
type ServiceInterface interface { // GetServices 暂时没有想好应用场景 GetServices() []interface{} // GetCleanup 关闭 GetCleanup() func() }
func NewServiceInterface ¶ added in v0.0.8
func NewServiceInterface(cleanup func(), services ...interface{}) ServiceInterface
Click to show internal directories.
Click to hide internal directories.