executor

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecMulSerProgram

func ExecMulSerProgram(ex MulServicesProgram)

ExecMulSerProgram 执行多服务程序

Types

type LierCmd

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

func NewLierCmd added in v1.0.2

func NewLierCmd(option Option) *LierCmd

NewLierCmd 初始化生成LierCmd

func (*LierCmd) ServicesRegistration

func (cmd *LierCmd) ServicesRegistration() []Service

ServicesRegistration 服务注册

func (*LierCmd) SetService

func (cmd *LierCmd) SetService(service ...Service)

func (*LierCmd) Start

func (cmd *LierCmd) Start() error

Start 启动

func (*LierCmd) Stop

func (cmd *LierCmd) Stop()

Stop 停止

type MulServices

type MulServices interface {
	ServicesRegistration() []Service
}

MulServices 多服务程序的注册

type MulServicesProgram

type MulServicesProgram interface {
	Starter
	Stopper
	MulServices
}

MulServicesProgram 支持多服务启动及关闭的程序接口

type Option added in v1.0.2

type Option struct {
	// AppName 应用名称
	AppName string
	// CmdName 命令名称
	CmdName string
	// Version 版本号
	Version string
	// Desc 描述
	Desc string
	// Author 作者
	Author string
}

Option 选项

type Program

type Program interface {
	Starter
	Stopper
}

Program 完整程序的接口

type Service

type Service interface {
	Starter
	Stopper
}

Service 完整的服务接口

type Starter

type Starter interface {
	Start() error
}

Starter 开始方法的接口

type Stopper

type Stopper interface {
	Stop()
}

Stopper 结束方法的接口

Jump to

Keyboard shortcuts

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