apps

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGrpcApp

func GetGrpcApp(objName string) any

定义获取注册grpc实例的方法

func GetHttpApp

func GetHttpApp(objName string) any

定义获取注册gin实例的方法

func GetInternalApp

func GetInternalApp(objName string) any

定义获取注册实例的方法

func InitGrpcApps

func InitGrpcApps(server *grpc.Server) error

初始化配置grpc实例

func InitHttpApps

func InitHttpApps(r gin.IRouter) error

初始化配置gin实例

func InitInternalApps

func InitInternalApps() error

初始化配置内部实例

func InitRestfulApps added in v1.0.4

func InitRestfulApps(pathPrefix string, root *restful.Container) error

初始化配置restful实例

func LoadedGinApp added in v1.0.9

func LoadedGinApp() (apps []string)

LoadedGinApp 查询加载成功的服务

func LoadedGrpcApp added in v1.0.9

func LoadedGrpcApp() (apps []string)

LoadedGrpcApp 查询加载成功的服务

func LoadedInternalApp added in v1.0.9

func LoadedInternalApp() (apps []string)

LoadedInternalApp 查询加载成功的服务

func LoadedRESTfulApp added in v1.0.4

func LoadedRESTfulApp() (apps []string)

LoadedHttpApp 查询加载成功的服务

func RegistryGrpcApp

func RegistryGrpcApp(obj GrpcIocObject)

定义grpc实例注册的方法

func RegistryHttpApp

func RegistryHttpApp(obj HttpIocObject)

定义gin实例注册的方法

func RegistryInternalApp

func RegistryInternalApp(obj IocObject)

定义内部实例注册的方法

func RegistryRESTfulApp added in v1.0.4

func RegistryRESTfulApp(app RESTfulApp)

RegistryRESTfulApp 服务实例注册

Types

type GrpcIocObject

type GrpcIocObject interface {
	IocObject
	RegistryHandler(*grpc.Server)
}

定义注册和初始化grpc实例的接口

type HttpIocObject

type HttpIocObject interface {
	IocObject
	RegistryHandler(gin.IRouter)
}

定义注册和初始化gin实例的接口

type IocObject

type IocObject interface {
	Name() string
	Conf() error
}

定义注册和初始化内部实例的接口

type RESTfulApp added in v1.0.4

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

HTTPService Http服务的实例

func GetRESTfulApp added in v1.0.4

func GetRESTfulApp(name string) RESTfulApp

获取Restful App

Jump to

Keyboard shortcuts

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