app

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAllApp

func InitAllApp() error

func LoadGinApp

func LoadGinApp(pathPrefix string, root gin.IRouter)

LoadGinApp 装载所有的gin app

func LoadGrpcApp

func LoadGrpcApp(server *grpc.Server)

LoadGrpcApp 加载所有的Grpc app

func LoadHttpApp

func LoadHttpApp(pathPrefix string, root router.Router)

LoadHttpApp 装载所有的http app

func LoadRESTfulApp

func LoadRESTfulApp(pathPrefix string, root *restful.Container)

LoadHttpApp 装载所有的http app

func LoadedGinApp

func LoadedGinApp() (apps []string)

LoadedGinApp 查询加载成功的服务

func LoadedGrpcApp

func LoadedGrpcApp() (apps []string)

LoadedGrpcApp 查询加载成功的服务

func LoadedHttpApp

func LoadedHttpApp() (apps []string)

LoadedHttpApp 查询加载成功的服务

func LoadedInternalApp

func LoadedInternalApp() (apps []string)

LoadedInternalApp 查询加载成功的服务

func LoadedRESTfulApp

func LoadedRESTfulApp() (apps []string)

LoadedHttpApp 查询加载成功的服务

func RegistryGinApp

func RegistryGinApp(app GinApp)

RegistryGinApp 服务实例注册

func RegistryGrpcApp

func RegistryGrpcApp(app GRPCApp)

RegistryService 服务实例注册

func RegistryHttpApp

func RegistryHttpApp(app HTTPApp)

RegistryHttpApp 服务实例注册

func RegistryInternalApp

func RegistryInternalApp(app InternalApp)

RegistryInternalApp 服务实例注册

func RegistryRESTfulApp

func RegistryRESTfulApp(app RESTfulApp)

RegistryRESTfulApp 服务实例注册

Types

type GRPCApp

type GRPCApp interface {
	InternalApp
	Registry(*grpc.Server)
}

GRPCService GRPC服务的实例

func GetGrpcApp

func GetGrpcApp(name string) GRPCApp

type GinApp

type GinApp interface {
	InternalApp
	Registry(gin.IRouter)
	Version() string
}

HTTPService Http服务的实例

func GetGinApp

func GetGinApp(name string) GinApp

type HTTPApp

type HTTPApp interface {
	InternalApp
	Registry(router.SubRouter)
}

HTTPService Http服务的实例

func GetHttpApp

func GetHttpApp(name string) HTTPApp

type InternalApp

type InternalApp interface {
	Config() error
	Name() string
}

InternalApp 内部服务实例, 不需要暴露

func GetInternalApp

func GetInternalApp(name string) InternalApp

type RESTfulApp

type RESTfulApp interface {
	InternalApp
	Registry(*restful.WebService)
	Version() string
}

HTTPService Http服务的实例

func GetRESTfulApp

func GetRESTfulApp(name string) RESTfulApp

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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