app

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAllApp

func InitAllApp() error

func LoadGrpcApp

func LoadGrpcApp(server *grpc.Server)

LoadGrpcApp 加载所有的Grpc app

func LoadHttpApp

func LoadHttpApp(pathPrefix string, root router.Router)

LoadHttpApp 装载所有的http app

func LoadedGrpcApp

func LoadedGrpcApp() (apps []string)

LoadedGrpcApp 查询加载成功的服务

func LoadedHttpApp

func LoadedHttpApp() (apps []string)

LoadedHttpApp 查询加载成功的服务

func LoadedInternalApp

func LoadedInternalApp() (apps []string)

LoadedInternalApp 查询加载成功的服务

func RegistryGrpcApp

func RegistryGrpcApp(app GRPCApp)

RegistryService 服务实例注册

func RegistryHttpApp

func RegistryHttpApp(app HTTPApp)

RegistryHttpApp 服务实例注册

func RegistryInternalApp

func RegistryInternalApp(app InternalApp)

RegistryInternalApp 服务实例注册

Types

type GRPCApp

type GRPCApp interface {
	Registry(*grpc.Server)
	Config() error
	Name() string
}

GRPCService GRPC服务的实例

func GetGrpcApp

func GetGrpcApp(name string) GRPCApp

type HTTPApp

type HTTPApp interface {
	Registry(router.SubRouter)
	Config() error
	Name() string
}

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

Jump to

Keyboard shortcuts

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