rtx

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnknownMethod is returned when the method is not recognized.
	ErrUnknownMethod = errors.New("unknown method")
)

Functions

This section is empty.

Types

type Error added in v0.9.0

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (*Error) Error added in v0.9.0

func (p *Error) Error() string

type M

type M = map[string]any

func Params added in v0.9.0

func Params(meta, addition M) M

type RoundTripper

type RoundTripper interface {
	RoundTrip(ctx context.Context, method string, params M) (resp M, err error)
	OnNotify(notify func(method string, params M))
	Close() error
}

type Transport added in v0.9.0

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

func New added in v0.9.0

func (*Transport) Close added in v0.9.0

func (p *Transport) Close() error

Close the connection.

func (*Transport) OnNotify added in v0.9.0

func (p *Transport) OnNotify(notify func(method string, params M))

func (*Transport) RoundTrip added in v0.9.0

func (p *Transport) RoundTrip(ctx context.Context, method string, params M) (ret M, err error)

Jump to

Keyboard shortcuts

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