common

package
v0.0.0-...-ff4890a Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicGrpc

type BasicGrpc struct {
	GCtx *gin.Context
	Name string
}

func (*BasicGrpc) Call

func (bg *BasicGrpc) Call(handle func(*bootstrap.IdleConn, context.Context) error)

func (*BasicGrpc) CheckGrpcError

func (bg *BasicGrpc) CheckGrpcError(err error)

CheckGrpcError TODO error wrap

func (*BasicGrpc) GetConn

func (bg *BasicGrpc) GetConn() (*bootstrap.IdleConn, context.Context)

func (*BasicGrpc) GetGCtx

func (bg *BasicGrpc) GetGCtx() *gin.Context

func (*BasicGrpc) GetName

func (bg *BasicGrpc) GetName() string

func (*BasicGrpc) PutConn

func (bg *BasicGrpc) PutConn(conn *bootstrap.IdleConn, name string)

PutConn 接池释放,放回连接池

func (*BasicGrpc) SetGCtx

func (bg *BasicGrpc) SetGCtx(ctx *gin.Context)

func (*BasicGrpc) SetName

func (bg *BasicGrpc) SetName(name string)

type IGrpc

type IGrpc interface {
	SetGCtx(ctx *gin.Context)
	SetName(name string)
	GetGCtx() *gin.Context
	GetName() string
}

IGrpc 定义GRPC接口

Jump to

Keyboard shortcuts

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