go项目脚手架
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sorbet/pkg/app/service.go

21 lines
388 B

package app
import "github.com/labstack/echo/v4"
type Service interface {
// Name 服务名称
Name() string
// Priority 优先级,用于启动和销毁的执行顺序
Priority() int
// Init 初始化服务
Init(ctx *Context) error
// Bootstrap 启动服务
Bootstrap() error
// Destroy 销毁服务
Destroy() error
}
type Routable interface {
InitRoutes(r *echo.Group)
}