Documentation ¶
Index ¶
- func GogrpcStart(reg IgogrpcRegister)
- func InjectGogrpcClient(s *GogrpcClient)
- func InjectGogrpcServer(s *GogrpcServer)
- func LoadGogrpcClient() baseiface.ISingleton
- func LoadGogrpcServer() baseiface.ISingleton
- func Start(reg IgogrpcRegister, rpcServerDto *baseconfig.RpcServerDto)
- type GogrpcClient
- func (rpcCli *GogrpcClient) FindService() ([]*registry.Service, error)
- func (rpcCli *GogrpcClient) FindServiceOf(serverName string) ([]*registry.Service, error)
- func (rpcCli *GogrpcClient) Init() micro.Service
- func (rpcCli *GogrpcClient) NewMicroService(serverDto *baseconfig.RpcServerDto) micro.Service
- func (rpcCli *GogrpcClient) NewService(serviceFunc GorpcServiceFunc) any
- type GogrpcServer
- func (server *GogrpcServer) Init(serverDto *baseconfig.RpcServerDto) micro.Service
- func (server *GogrpcServer) ReadCfg() *baseconfig.RpcServerDto
- func (server *GogrpcServer) RegisterGrpc() IgogrpcRegister
- func (server *GogrpcServer) Run()
- func (server *GogrpcServer) RunServer(serverDto *baseconfig.RpcServerDto)
- func (server *GogrpcServer) SetRegisterGrpc(registerGrpc IgogrpcRegister)
- type GorpcServiceFunc
- type IgogrpcRegister
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 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 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 ¶
@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)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.