gogrpc

package
v1.0.1-dev-02 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MulanPSL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GogrpcStart

func GogrpcStart(reg IgogrpcRegister)

func InjectGogrpcClient

func InjectGogrpcClient(s *GogrpcClient)

func InjectGogrpcServer

func InjectGogrpcServer(s *GogrpcServer)

func LoadGogrpcClient

func LoadGogrpcClient() baseiface.ISingleton

func LoadGogrpcServer

func LoadGogrpcServer() baseiface.ISingleton

func Start

func Start(reg IgogrpcRegister, rpcServerDto *baseconfig.RpcServerDto)

Types

type GogrpcClient

type GogrpcClient struct {
	basedto.BaseEntity
	*baseconfig.RpcServerDto
	micro.Service `json:"-"`
}

func FindBeanGogrpcClient

func FindBeanGogrpcClient() *GogrpcClient

FindBeanGogrpcClient

func NewClient

func NewClient(dto *baseconfig.RpcServerDto) *GogrpcClient

func NewGogrpcClient

func NewGogrpcClient() *GogrpcClient

func (*GogrpcClient) FindService

func (rpcCli *GogrpcClient) FindService() ([]*registry.Service, error)

func (*GogrpcClient) FindServiceOf

func (rpcCli *GogrpcClient) FindServiceOf(serverName string) ([]*registry.Service, error)

func (*GogrpcClient) Init

func (rpcCli *GogrpcClient) Init() micro.Service

func (*GogrpcClient) NewMicroService

func (rpcCli *GogrpcClient) NewMicroService(serverDto *baseconfig.RpcServerDto) micro.Service

func (*GogrpcClient) NewService

func (rpcCli *GogrpcClient) NewService(serviceFunc GorpcServiceFunc) any

type GogrpcServer

type GogrpcServer struct {
	basedto.BaseEntitySingle
	// contains filtered or unexported fields
}

func DefaultGogrpcServer

func DefaultGogrpcServer() *GogrpcServer

func FindBeanGogrpcServer

func FindBeanGogrpcServer() *GogrpcServer

FindBeanGogrpcServer

func NewGogrpcServer

func NewGogrpcServer(r IgogrpcRegister) *GogrpcServer

func (*GogrpcServer) Init

func (server *GogrpcServer) Init(serverDto *baseconfig.RpcServerDto) micro.Service

func (*GogrpcServer) ReadCfg

func (server *GogrpcServer) ReadCfg() *baseconfig.RpcServerDto

func (*GogrpcServer) RegisterGrpc

func (server *GogrpcServer) RegisterGrpc() IgogrpcRegister

func (*GogrpcServer) Run

func (server *GogrpcServer) Run()

func (*GogrpcServer) RunServer

func (server *GogrpcServer) RunServer(serverDto *baseconfig.RpcServerDto)

func (*GogrpcServer) SetRegisterGrpc

func (server *GogrpcServer) SetRegisterGrpc(registerGrpc IgogrpcRegister)

type GorpcServiceFunc

type GorpcServiceFunc func(name string, c client.Client) any

@Title 文件名称: gorpcclient.go @Description 描述: rpc客户端

@Author 作者: leijianming@163.com 时间(2024-02-18 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-18 22:38:21)

type IgogrpcRegister

type IgogrpcRegister interface {
	RegisterGrpc(service micro.Service)
}

@Title 文件名称: grpcregister.go @Description 描述: rpc业务服务注册

@Author 作者: leijianming@163.com 时间(2024-02-18 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-18 22:38:21)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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