apps

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGrpcApp

func GetGrpcApp(name string)

func GetGrpcImpl

func GetGrpcImpl(name string) interface{}

func GetImpl

func GetImpl(name string) interface{}

返回对象即要注册的接口给http

func InitAllApp

func InitAllApp() error

func InitGin

func InitGin(r gin.IRouter)

func InitGrpc

func InitGrpc(server *grpc.Server)

func InitImpl

func InitImpl()

初始化注册到IOC中的所有服务

func InitRestful

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

func LoadGinApps

func LoadGinApps() (names []string)

已经加载完成的gin app有哪些

func LoadGrpcApps

func LoadGrpcApps() (names []string)

func LoadImplApps added in v0.0.4

func LoadImplApps() (names []string)

func LoadRestfulApps

func LoadRestfulApps() (names []string)

func RegistryGrpc

func RegistryGrpc(svc GrpcService)

将grpc实现类赋值给interface注册到ioc

func RegistryRestful

func RegistryRestful(svc RestfulService)

func ResitryGin

func ResitryGin(svc Ginservice)

func ResitryImpl

func ResitryImpl(svc ImplService)

将服务注册到svcs中

Types

type Ginservice

type Ginservice interface {
	Registry(r gin.IRouter)
	Name() string
	Config()
}

type GrpcService

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

type ImplService

type ImplService interface {
	Config()
	Name() string
}

定义注册服务要满足的接口

type RestfulService

type RestfulService interface {
	Name() string
	Config()
	Registry(ws *restful.WebService)
	Version() string
}

Directories

Path Synopsis
book
api
pb
api
api
api

Jump to

Keyboard shortcuts

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