rpc

package
v0.0.0-...-8faa328 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: CC0-1.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const HelloServiceName = "path/to/pkg.HelloService"

Variables

This section is empty.

Functions

func RegisterHelloService

func RegisterHelloService(server *rpc.Server, svc HelloServiceInterface) error

Types

type HelloService

type HelloService struct{}

func (*HelloService) Hello

func (h *HelloService) Hello(request string, reply *string) error

type HelloServiceInterface

type HelloServiceInterface interface {
	Hello(string, *string) error
}

func NewHelloServiceClient

func NewHelloServiceClient(cc *rpc.Client) HelloServiceInterface

type ServerCloser

type ServerCloser func()

func StartGobRpcServer

func StartGobRpcServer(addr string) (ServerCloser, error)

func StartHttpJsonRpcServer

func StartHttpJsonRpcServer(addr string) (ServerCloser, error)

func StartJsonRpcServer

func StartJsonRpcServer(addr string) (ServerCloser, error)

func StartRawHttpJsonRpcServer

func StartRawHttpJsonRpcServer(addr string) (ServerCloser, error)