rpc

package
v3.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrClosed represents a error.
	ErrClosed = core.ErrClosed
	// ErrRequestEntityTooLarge represents a error.
	ErrRequestEntityTooLarge = core.ErrRequestEntityTooLarge
	// ErrTimeout represents a error.
	ErrTimeout = core.ErrTimeout
	// IsTemporaryError returns true if err is a temporary error.
	IsTemporaryError = core.IsTemporaryError
	// IsTimeoutError returns true if err is a timeout error.
	IsTimeoutError = core.IsTimeoutError
	// RegisterHandler for Service.
	RegisterHandler = core.RegisterHandler
	// RegisterTransport for Client.
	RegisterTransport = core.RegisterTransport
	// WithContext returns a copy of the parent context and associates it with a rpc.Context.
	WithContext = core.WithContext
	// GetClientContext returns the *rpc.ClientContext bound to the context.
	GetClientContext = core.GetClientContext
	// NewClientContext returns a rpc.ClientContext.
	NewClientContext = core.NewClientContext
	// GetServiceContext returns the *rpc.ServiceContext bound to the context.
	GetServiceContext = core.GetServiceContext
	// NewServiceContext returns a rpc.ServiceContext.
	NewServiceContext = core.NewServiceContext
	// FromContext returns the rpc.Context bound to the context.
	FromContext = core.FromContext
	// NewContext returns a rpc.Context.
	NewContext = core.NewContext
	// NewPanicError return a panic error.
	NewPanicError = core.NewPanicError
	// MissingMethod returns a missing Method object.
	MissingMethod = core.MissingMethod
	// NewMethod returns a Method object.
	NewMethod = core.NewMethod
	// NewClientCodec returns the ClientCodec.
	NewClientCodec = core.NewClientCodec
	// NewServiceCodec returns the ServiceCodec.
	NewServiceCodec = core.NewServiceCodec
	// WithDebug returns a debug Option for clientCodec & serviceCodec.
	WithDebug = core.WithDebug
	// WithSimple returns a simple Option for clientCodec & serviceCodec.
	WithSimple = core.WithSimple
	// WithLongType returns a longType Option for clientCodec & serviceCodec.
	WithLongType = core.WithLongType
	// WithRealType returns a realType Option for clientCodec & serviceCodec.
	WithRealType = core.WithRealType
	// WithMapType returns a mapType Option for clientCodec & serviceCodec.
	WithMapType = core.WithMapType
	// WithStructType returns a structType Option for clientCodec & serviceCodec.
	WithStructType = core.WithStructType
	// WithListType returns a listType Option for clientCodec & serviceCodec.
	WithListType = core.WithListType
)
View Source
var NewClient = core.NewClient

NewClient returns an instance of Client.

View Source
var NewService = core.NewService

NewService returns an instance of Service.

Functions

func FastHTTPTransport added in v3.0.6

func FastHTTPTransport(client *Client) *fasthttp.Transport

FastHTTPTransport returns fasthttp.Transport of Client.

func HTTPHandler

func HTTPHandler(service *Service) *http.Handler

HTTPHandler returns http.Handler of Service.

func HTTPTransport

func HTTPTransport(client *Client) *http.Transport

HTTPTransport returns http.Transport of Client.

func SocketHandler

func SocketHandler(service *Service) *socket.Handler

SocketHandler returns socket.Handler of Service.

func SocketTransport

func SocketTransport(client *Client) *socket.Transport

SocketTransport returns socket.Transport of Client.

func UDPHandler

func UDPHandler(service *Service) *udp.Handler

UDPHandler returns udp.Handler of Service.

func UDPTransport

func UDPTransport(client *Client) *udp.Transport

UDPTransport returns udp.Transport of Client.

func WebSocketHandler

func WebSocketHandler(service *Service) *websocket.Handler

WebSocketHandler returns websocket.Handler of Service.

func WebSocketTransport

func WebSocketTransport(client *Client) *websocket.Transport

WebSocketTransport returns websocket.Transport of Client.

Types

type Client

type Client = core.Client

Client for RPC.

type ClientCodec

type ClientCodec = core.ClientCodec

ClientCodec for RPC.

type ClientContext

type ClientContext = core.ClientContext

ClientContext for RPC.

type CodecOption

type CodecOption = core.CodecOption

CodecOption for clientCodec & serviceCodec.

type Context

type Context = core.Context

Context for RPC.

type InvalidRequestError

type InvalidRequestError = core.InvalidRequestError

InvalidRequestError represents a error.

type InvalidResponseError

type InvalidResponseError = core.InvalidResponseError

InvalidResponseError represents a error.

type Method

type Method = core.Method

Method for RPC.

type NextIOHandler

type NextIOHandler = core.NextIOHandler

NextIOHandler for RPC.

type NextInvokeHandler

type NextInvokeHandler = core.NextInvokeHandler

NextInvokeHandler for RPC.

type PanicError

type PanicError = core.PanicError

PanicError represents a panic error.

type Service

type Service = core.Service

Service for RPC.

type ServiceCodec

type ServiceCodec = core.ServiceCodec

ServiceCodec for RPC.

type ServiceContext

type ServiceContext = core.ServiceContext

ServiceContext for RPC.

type UnsupportedProtocolError

type UnsupportedProtocolError = core.UnsupportedProtocolError

UnsupportedProtocolError represents a error.

type UnsupportedServerTypeError

type UnsupportedServerTypeError = core.UnsupportedServerTypeError

UnsupportedServerTypeError represents a error.

type WorkerPool added in v3.0.11

type WorkerPool = core.WorkerPool

WorkerPool interface

Directories

Path Synopsis
codec
plugins
log

Jump to

Keyboard shortcuts

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