httpio

package
v0.0.0-...-f902a6f Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0, MIT Imports: 15 Imported by: 0

README

This package provides param encoders / decoders for `io.Reader` which proxy
data over temporary http endpoints

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MuxRPCServerWithReader

func MuxRPCServerWithReader(rpc *jsonrpc.RPCServer, paramDecoder, resultEncoder http.HandlerFunc) http.HandlerFunc

func ReaderParamDecoder

func ReaderParamDecoder() (http.HandlerFunc, jsonrpc.ServerOption)

func ReaderParamEncoder

func ReaderParamEncoder(addr string) jsonrpc.Option

this use slog.Logger and http.Client from jsonrpc.Config. if you're using jsonrpc.WithLogger or jsonrpc.WithHTTPClient as well, make sure they're before this one. Parameters:

  • addr: the full http url that reader server is served on.
  • timeout: timeout for the whole http request. 0 for no timeout.

func ReaderResultDecoder

func ReaderResultDecoder(addr string) jsonrpc.Option

func ReaderResultEncoder

func ReaderResultEncoder() (http.HandlerFunc, jsonrpc.ServerOption)

Types

type SetContexter

type SetContexter interface {
	SetContext(context.Context)
}

Jump to

Keyboard shortcuts

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