rpc

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNewHandler

func MustNewHandler(apis map[string]interface{}) http.Handler

MustNewHandler creates a http.Handler for the specified RPC apis.

func MustServe

func MustServe(endpoint string, apis map[string]interface{})

MustServe starts RPC service until shutdown.

func Start

func Start(endpoint string, handler http.Handler)

Start starts a HTTP service util shutdown.

Types

type Client

type Client struct {
	*providers.MiddlewarableProvider
	// contains filtered or unexported fields
}

Client is a base class of any RPC client.

func NewClient

func NewClient(url string, option ...providers.Option) (*Client, error)

NewClient creates a new client instance.

func (*Client) URL

func (c *Client) URL() string

URL Get the RPC server URL the client connected to.

Jump to

Keyboard shortcuts

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