Help us shape the future of Go! Take the 2026 Go Developer Survey

rpc

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendJSONRequest

func SendJSONRequest(
	ctx context.Context,
	uri *url.URL,
	method string,
	params interface{},
	reply interface{},
	options ...Option,
) error

Types

type EndpointRequester

type EndpointRequester interface {
	SendRequest(ctx context.Context, method string, params interface{}, reply interface{}, options ...Option) error
}

func NewEndpointRequester

func NewEndpointRequester(uri string) EndpointRequester

type Option

type Option func(*Options)

func WithHeader

func WithHeader(key, val string) Option

func WithQueryParam

func WithQueryParam(key, val string) Option

type Options

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

func NewOptions

func NewOptions(ops []Option) *Options

func (*Options) Headers

func (o *Options) Headers() http.Header

func (*Options) QueryParams

func (o *Options) QueryParams() url.Values

Jump to

Keyboard shortcuts

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