pool

package
v0.0.0-...-0bd2a67 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartGdbTestServer

func StartGdbTestServer() *testGdbEchoServer

Types

type ConnPool

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

func NewConnPool

func NewConnPool(opt *Options) *ConnPool

func (*ConnPool) Close

func (p *ConnPool) Close()

close connection pool

func (*ConnPool) Get

func (p *ConnPool) Get() (*ConnWebSocket, error)

func (*ConnPool) Put

func (p *ConnPool) Put(cn *ConnWebSocket)

func (*ConnPool) Size

func (p *ConnPool) Size() int

Size returns total number of connections.

func (*ConnPool) String

func (p *ConnPool) String() string

type ConnWebSocket

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

func NewConnWebSocket

func NewConnWebSocket(opt *Options) (*ConnWebSocket, error)

func (*ConnWebSocket) Close

func (cn *ConnWebSocket) Close()

func (*ConnWebSocket) CreatedAt

func (cn *ConnWebSocket) CreatedAt() time.Time

func (*ConnWebSocket) String

func (cn *ConnWebSocket) String() string

func (*ConnWebSocket) SubmitRequestAsync

func (cn *ConnWebSocket) SubmitRequestAsync(request *graphsonv3.Request) (*graphsonv3.ResponseFuture, error)

func (*ConnWebSocket) UsedAt

func (cn *ConnWebSocket) UsedAt() time.Time

type Options

type Options struct {
	Dialer   func(*Options) (*ConnWebSocket, error)
	GdbUrl   string
	Username string
	Password string

	PoolSize           int
	PoolTimeout        time.Duration
	AliveCheckInterval time.Duration
	MaxConnAge         time.Duration

	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	PingInterval time.Duration

	MaxInProcessPerConn         int
	MaxSimultaneousUsagePerConn int
}

Jump to

Keyboard shortcuts

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