apps

package
v0.0.0-...-19fd678 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 调整
	HostService   host.HostService
	ServerService server.ServerService

	//需要开启的服务
	SupportedServices []AppService

	// 维护服务列表
	ImplApps = map[string]ImplService{}
)

HttpService gin

type HttpService interface {
	Name() string
	Registry(r gin.IRouter) //注册路由
}

Functions

func InitHttp

func InitHttp(r gin.IRouter)

func InitImpl

func InitImpl()

InitImpl 遍历初始化所有的服务

func RegistryImpl

func RegistryImpl(obj ImplService)

RegistryImpl 传入一个实现过初始化和命名的东西, 第一次判断这个obj是否实现了Config和Name

Types

type AppService

type AppService interface {
	ServiceName() string
}

type AppServices

type AppServices struct {
}

type ImplService

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

ImplService IOC 容器层 管理所有服务的实例

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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