jsonrpc

package
v2.8.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPHandler

func HTTPHandler(log *slog.Logger) http.HandlerFunc

func Setup

func Setup(port int)

Types

type Args

type Args struct {
	A, B int
}

Args defines the arguments for the RPC methods.

type Arith

type Arith struct {
	Logger *slog.Logger
}

Arith provides methods for arithmetic operations.

func (*Arith) Multiply

func (t *Arith) Multiply(args *Args, reply *int) error

Multiply multiplies two numbers and returns the result.

func (*Arith) Traceme

func (t *Arith) Traceme(args *Args, reply *int) error

type ReadWriteCloserWrapper

type ReadWriteCloserWrapper struct {
	io.Reader
	io.Writer
}

ReadWriteCloserWrapper wraps an io.Reader and io.Writer to implement io.ReadWriteCloser.

func (*ReadWriteCloserWrapper) Close

func (w *ReadWriteCloserWrapper) Close() error

Close is a no-op to satisfy the io.ReadWriteCloser interface.

Jump to

Keyboard shortcuts

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