apigrpc

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGRpcApi

func RegisterGRpcApi(ai GRpcInitializer)

注册WEB API初始化对象

func SetupGRpcApi

func SetupGRpcApi(ai GRpcInitializer)

Types

type GRpcApiStarter

type GRpcApiStarter struct {
	infra.BaseStarter
}

func (*GRpcApiStarter) Start

func (w *GRpcApiStarter) Start(ctx infra.StarterContext)

type GRpcInitializeRegister

type GRpcInitializeRegister struct {
	Initializers []GRpcInitializer
	SetupApis    []GRpcInitializer
}

初始化注册器

func (*GRpcInitializeRegister) Register

func (i *GRpcInitializeRegister) Register(ai GRpcInitializer)

注册一个初始化对象

func (*GRpcInitializeRegister) Setup

type GRpcInitializer

type GRpcInitializer interface {
	//用于对象实例化后的初始化操作
	Init(grpcName, grpcPort string)
	Setup(grpcName, grpcPort string)
}

func GetGRpcApiInitializers

func GetGRpcApiInitializers() []GRpcInitializer

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

func GetGRpcSetupApis

func GetGRpcSetupApis() []GRpcInitializer

Jump to

Keyboard shortcuts

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