nexus

package
v0.0.0-...-854a178 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartServer

func StartServer(port int, serviceInfos ...ServiceInfo) error

Types

type MethodInfo

type MethodInfo struct {
	Method   reflect.Method
	ParType  reflect.Type
	RelyType reflect.Type
}

type RpcClient

type RpcClient struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(address string, poolMaxNum int) *RpcClient

func (*RpcClient) Invoke

func (client *RpcClient) Invoke(args any, serviceName string, methodName string, reply any) error

func (*RpcClient) SendReq

func (client *RpcClient) SendReq(request *common.RpcRequest) (resp *common.RpcResponse, err error)

type RpcServer

type RpcServer struct {
	// contains filtered or unexported fields
}

func (*RpcServer) Registry

func (s *RpcServer) Registry(sr ServiceInfo)

type ServiceInfo

type ServiceInfo struct {
	Name    string
	Value   reflect.Value
	Methods map[string]*MethodInfo
}

Directories

Path Synopsis
test

Jump to

Keyboard shortcuts

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