rpc

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package rpc provides a mockable wrapper for net/rpc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) Accept

func (*Impl) Accept(lis net.Listener)

func (*Impl) Dial

func (*Impl) Dial(network string, address string) (*rpc.Client, error)

func (*Impl) DialHTTP

func (*Impl) DialHTTP(network string, address string) (*rpc.Client, error)

func (*Impl) DialHTTPPath

func (*Impl) DialHTTPPath(network string, address string, path string) (*rpc.Client, error)

func (*Impl) HandleHTTP

func (*Impl) HandleHTTP()

func (*Impl) NewClient

func (*Impl) NewClient(conn io.ReadWriteCloser) *rpc.Client

func (*Impl) NewClientWithCodec

func (*Impl) NewClientWithCodec(codec rpc.ClientCodec) *rpc.Client

func (*Impl) NewServer

func (*Impl) NewServer() *rpc.Server

func (*Impl) Register

func (*Impl) Register(rcvr any) error

func (*Impl) RegisterName

func (*Impl) RegisterName(name string, rcvr any) error

func (*Impl) ServeCodec

func (*Impl) ServeCodec(codec rpc.ServerCodec)

func (*Impl) ServeConn

func (*Impl) ServeConn(conn io.ReadWriteCloser)

func (*Impl) ServeRequest

func (*Impl) ServeRequest(codec rpc.ServerCodec) error

type Interface

type Interface interface {
	Accept(lis net.Listener)
	Dial(network string, address string) (*rpc.Client, error)
	DialHTTP(network string, address string) (*rpc.Client, error)
	DialHTTPPath(network string, address string, path string) (*rpc.Client, error)
	HandleHTTP()
	NewClient(conn io.ReadWriteCloser) *rpc.Client
	NewClientWithCodec(codec rpc.ClientCodec) *rpc.Client
	NewServer() *rpc.Server
	Register(rcvr any) error
	RegisterName(name string, rcvr any) error
	ServeCodec(codec rpc.ServerCodec)
	ServeConn(conn io.ReadWriteCloser)
	ServeRequest(codec rpc.ServerCodec) error
}

Directories

Path Synopsis
Package jsonrpc provides a mockable wrapper for net/rpc/jsonrpc.
Package jsonrpc provides a mockable wrapper for net/rpc/jsonrpc.

Jump to

Keyboard shortcuts

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