rpc

package
v1.240.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle[Req any, Res any](path string, handler nh.Handler[Req, Res])

Handler for HTTP.

func NewClient

func NewClient[Req any, Res any](url, contentType string, client *http.Client, mar *marshaller.Map) nh.Client[Req, Res]

NewClient for HTTP.

func Register

func Register(mu *http.ServeMux, ma *marshaller.Map)

Register for HTTP.

Types

type Client

type Client[Req any, Res any] struct {
	// contains filtered or unexported fields
}

Client for HTTP.

func (*Client[Req, Res]) Call

func (c *Client[Req, Res]) Call(ctx context.Context, req *Req) (res *Res, err error)

Call for HTTP.

Jump to

Keyboard shortcuts

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