cmder

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: AGPL-3.0 Imports: 1 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Has

func Has(name string) bool

func Register

func Register(name string, cmder Cmder)

func Unregister

func Unregister(name string)

Types

type Cmder

type Cmder interface {
	Boot() error // 服务自身的启动逻辑
	Control      // 控制操作
}

func Get

func Get(name string) Cmder

type Control added in v5.1.0

type Control interface {
	StopHistory(...string) error       // 停止已启动服务
	Start(writer ...io.Writer) error   // 启动服务
	Stop() error                       // 停止服务
	Reload() error                     // 重载服务
	Restart(writer ...io.Writer) error // 重启服务
}

type RestartBy

type RestartBy interface {
	RestartBy(id string, writer ...io.Writer) error // 重启“服务中指定 ID 所指向的项“
}

type Simple

type Simple struct {
}

func NewSimple

func NewSimple() *Simple

func (*Simple) Boot added in v5.1.0

func (s *Simple) Boot() error

func (*Simple) Reload

func (s *Simple) Reload() error

func (*Simple) Restart

func (s *Simple) Restart(writer ...io.Writer) error

func (*Simple) Start

func (s *Simple) Start(writer ...io.Writer) error

func (*Simple) Stop

func (s *Simple) Stop() error

func (*Simple) StopHistory

func (s *Simple) StopHistory(...string) error

type StartBy

type StartBy interface {
	StartBy(id string, writer ...io.Writer) error // 启动”服务中指定 ID 所指向的项“
}

type StopBy

type StopBy interface {
	StopBy(id string) error // 停止”服务中指定 ID 所指向的项“
}

Jump to

Keyboard shortcuts

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