api

package
v0.0.11-grpc-test Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterApi

func RegisterApi(ai Initializer)

注册WEB API初始化对象

func SetupApi

func SetupApi(ai Initializer)

Types

type InitializeRegister

type InitializeRegister struct {
	Initializers []Initializer
	SetupApis    []Initializer
}

初始化注册器

func (*InitializeRegister) Register

func (i *InitializeRegister) Register(ai Initializer)

注册一个初始化对象

func (*InitializeRegister) Setup

func (i *InitializeRegister) Setup(ai Initializer)

type Initializer

type Initializer interface {
	//用于对象实例化后的初始化操作
	Init()
	Setup()
}

func GetApiInitializers

func GetApiInitializers() []Initializer

获取注册的web api初始化对象

func GetSetupApis

func GetSetupApis() []Initializer

type WebApiStarter

type WebApiStarter struct {
	infra.BaseStarter
}

func (*WebApiStarter) Setup

func (w *WebApiStarter) Setup(ctx infra.StarterContext)

Jump to

Keyboard shortcuts

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