app

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlwaysEnabled

type AlwaysEnabled struct{}

AlwaysEnabled 可用于嵌入,标识总是启用的应用

func (*AlwaysEnabled) IsEnabled

func (a *AlwaysEnabled) IsEnabled() bool

type App

type App interface {
	Start() error    // 应用的启动入口,包含初始化流程
	IsEnabled() bool // 应用启动的检测条件,例如 consumer 的环境变量开关是否开启等
}

App 可部署的应用接口

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager() Manager

func (*Manager) RegisterApp

func (m *Manager) RegisterApp(app App)

RegisterApp 注册一个 App 实例

func (*Manager) RegisterInfra

func (m *Manager) RegisterInfra(i infra.Infra)

RegisterInfra 注册一个 Infra 实例

func (*Manager) Run

func (m *Manager) Run(cleanup func()) (err error)

Run 执行所有Enabled App

Directories

Path Synopsis
looper package provides utilities for looper job management.
looper package provides utilities for looper job management.
server

Jump to

Keyboard shortcuts

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