fasthttp

package
v0.0.0-...-69458bf Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XServiceRequestID = "X-Request-Id"
	XServiceTimeout   = "X-Service-Timeout"
)

Header constants

Variables

This section is empty.

Functions

func BorrowReuest

func BorrowReuest() xrpc.Request

BorrowReuest from pool

func NewClient

func NewClient(hostname string, client ...*fasthttp.HostClient) xrpc.Client

NewClient object connector

func NewServer

func NewServer(service xrpc.Service) xrpc.Server

NewServer default configurated server

func ReturnRequest

func ReturnRequest(req xrpc.Request)

ReturnRequest to pool

Types

type Client

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

Client implementation

func (*Client) Send

func (c *Client) Send(msg xrpc.Message) xrpc.Response

Send message to service

type Response

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

Response wrapper

func (Response) Bind

func (r Response) Bind(target interface{}) error

Bind message to object or structure

func (*Response) Error

func (r *Response) Error() error

Error response

func (Response) Source

func (r Response) Source() interface{}

Source of request used for processing this methods

Jump to

Keyboard shortcuts

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