fasthttp

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FastHTTPClient

type FastHTTPClient struct {
	rpc.BaseClient

	fasthttp.Client
	Header fasthttp.RequestHeader
	// contains filtered or unexported fields
}

FastHTTPClient is hprose fasthttp client

func NewFastHTTPClient

func NewFastHTTPClient(uri ...string) (client *FastHTTPClient)

NewFastHTTPClient is the constructor of FastHTTPClient

func (*FastHTTPClient) Compression

func (client *FastHTTPClient) Compression() bool

Compression returns the compression status of hprose client

func (*FastHTTPClient) KeepAlive

func (client *FastHTTPClient) KeepAlive() bool

KeepAlive returns the keepalive status of hprose client

func (*FastHTTPClient) MaxConcurrentRequests

func (client *FastHTTPClient) MaxConcurrentRequests() int

MaxConcurrentRequests returns max concurrent request count

func (*FastHTTPClient) SetCompression

func (client *FastHTTPClient) SetCompression(enable bool)

SetCompression sets the compression status of hprose client

func (*FastHTTPClient) SetKeepAlive

func (client *FastHTTPClient) SetKeepAlive(enable bool)

SetKeepAlive sets the keepalive status of hprose client

func (*FastHTTPClient) SetMaxConcurrentRequests

func (client *FastHTTPClient) SetMaxConcurrentRequests(value int)

SetMaxConcurrentRequests sets max concurrent request count

func (*FastHTTPClient) SetTLSClientConfig

func (client *FastHTTPClient) SetTLSClientConfig(config *tls.Config)

SetTLSClientConfig sets the tls.Config

func (*FastHTTPClient) SetURIList

func (client *FastHTTPClient) SetURIList(uriList []string)

SetURIList sets a list of server addresses

func (*FastHTTPClient) TLSClientConfig

func (client *FastHTTPClient) TLSClientConfig() *tls.Config

TLSClientConfig returns the tls.Config in hprose client

type FastHTTPContext

type FastHTTPContext struct {
	rpc.BaseServiceContext
	RequestCtx *fasthttp.RequestCtx
}

FastHTTPContext is the hprose fasthttp context

func (*FastHTTPContext) InitFastHTTPContext

func (context *FastHTTPContext) InitFastHTTPContext(
	service rpc.Service, ctx *fasthttp.RequestCtx)

InitFastHTTPContext initializes FastHTTPContext

type FastHTTPService

type FastHTTPService struct {
	rpc.BaseHTTPService
	// contains filtered or unexported fields
}

FastHTTPService is the hprose fasthttp service

func NewFastHTTPService

func NewFastHTTPService() (service *FastHTTPService)

NewFastHTTPService is the constructor of FastHTTPService

func (*FastHTTPService) ServeFastHTTP

func (service *FastHTTPService) ServeFastHTTP(ctx *fasthttp.RequestCtx)

ServeFastHTTP is the hprose fasthttp handler method

Jump to

Keyboard shortcuts

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