kapp

package
v0.0.0-...-df7806a Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppBase

type AppBase struct {
	Executor  IExecutor       // App所属的执行器
	Context   context.Context // App专属上下文
	AppConfig *AppConfig      // App相关的配置
}

type AppConfig

type AppConfig struct {
	*gcfg.Config
}

AppConfig 配置文件对象

type AppContainer

type AppContainer struct {
	App       IApp
	StartTime *gtime.Time         // APP启动时间
	StopTime  *gtime.Time         // APP关闭时间
	State     processes.ProcState // APP的运行状态,用进程状态表示
}

type IApp

type IApp interface {
	AppName() string // 获取应用名称
	Execute() error  // 启动应用,其中包装有微服务应用的业务逻辑
	Exit() error     // 关闭应用,关闭微服务应用
}

IApp 应用接口,对应于每个微服务应用,可以是RPC或者HTTP

type IExecutor

type IExecutor interface {
	SearchApp(name string) (IApp, bool)
}

Jump to

Keyboard shortcuts

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