xprotocol

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 21 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Init = iota
	Connecting
	Connected
)

for xprotocol

Variables

This section is empty.

Functions

func NewConnPool

func NewConnPool(ctx context.Context, host types.Host) types.ConnectionPool

NewConnPool init a connection pool

func NewKeepAlive added in v0.11.0

func NewKeepAlive(codec str.Client, proto types.ProtocolName, timeout time.Duration, thres uint32) types.KeepAlive

func NewPoolBinding added in v0.17.0

func NewPoolBinding(p *connpool) types.ConnectionPool

NewPoolBinding generates a binding connection pool the upstream connection close will trigger the downstream connection to close and vice versa

func NewPoolMultiplex added in v0.17.0

func NewPoolMultiplex(p *connpool) types.ConnectionPool

NewPoolMultiplex generates a multiplex conn pool

func NewPoolPingPong added in v0.17.0

func NewPoolPingPong(p *connpool) types.ConnectionPool

NewPoolPingPong generates a connection pool which uses p pingpong protocol

func SetIdleTimeout added in v0.11.0

func SetIdleTimeout(d time.Duration)

SetIdleTimeout calculates the idle timeout as max idle count.

Types

This section is empty.

Jump to

Keyboard shortcuts

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