boot

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseInstance

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

BaseInstance 基础实例结构

func (*BaseInstance) Init

func (b *BaseInstance) Init() error

Init 初始化

type BaseServcie

type BaseServcie struct {
	BaseInstance

	Prefix string // 服务前缀
	Name   string // 服务名称
	// contains filtered or unexported fields
}

func (*BaseServcie) Init

func (s *BaseServcie) Init() error

func (*BaseServcie) Start

func (s *BaseServcie) Start() error

func (*BaseServcie) Stop

func (s *BaseServcie) Stop()

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