rpc

package
v3.5.5 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRPCServerDisabled = errors.New("server is disabled")
	ErrInvalidToken      = errors.New("invalid token")
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(addr string, token string, tls *tls.Config) *Client

func (*Client) Call

func (r *Client) Call(ctx context.Context, servicePath, serviceMethod string, args interface{}, reply interface{}) error

func (*Client) Client

func (r *Client) Client(servicePath string) client.XClient

func (*Client) Close

func (r *Client) Close() error

type Empty

type Empty struct{}

type Server

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

func NewServer

func NewServer(addr string, token string, tls *tls.Config) *Server

func (*Server) Close

func (r *Server) Close() error

func (*Server) Register

func (r *Server) Register(services ...interface{}) *Server

func (*Server) RegisterFuncName

func (r *Server) RegisterFuncName(servicePath, name string, service interface{}) *Server

func (*Server) RegisterName

func (r *Server) RegisterName(name string, service interface{}) *Server

func (*Server) Start

func (r *Server) Start() error

Jump to

Keyboard shortcuts

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