boot

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootServe added in v0.0.3

func BootServe(instance Instance) error

BootServe 启动服务

Types

type BaseInstance

type BaseInstance struct {
	Name      string // 实例名
	Config    *viper.Viper
	Addr      string // 监听地址
	IntanceID int64  // 实例ID
}

BaseInstance 基础实例结构

func (*BaseInstance) Init

func (b *BaseInstance) Init() error

Init 初始化

type Instance

type Instance interface {
	// Start 开启方法
	Start() error

	// 初始化
	Init() error

	// Stop 结束方法
	Stop()
}

Instance 定义一个实例

Jump to

Keyboard shortcuts

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