handshake

package
v1.39.2-cluster Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedConn

type BufferedConn struct {
	net.Conn
	// contains filtered or unexported fields
}

BufferedConn is a net.Conn with Flush suport.

func VMInsertClient

func VMInsertClient(c net.Conn, compressionLevel int) (*BufferedConn, error)

VMInsertClient performs client-side handshake for vminsert protocol.

compressionLevel is the level used for compression of the data sent to the server. compressionLevel <= 0 means 'no compression'

func VMInsertServer

func VMInsertServer(c net.Conn, compressionLevel int) (*BufferedConn, error)

VMInsertServer performs server-side handshake for vminsert protocol.

compressionLevel is the level used for compression of the data sent to the client. compressionLevel <= 0 means 'no compression'

func VMSelectClient

func VMSelectClient(c net.Conn, compressionLevel int) (*BufferedConn, error)

VMSelectClient performs client-side handshake for vmselect protocol.

compressionLevel is the level used for compression of the data sent to the server. compressionLevel <= 0 means 'no compression'

func VMSelectServer

func VMSelectServer(c net.Conn, compressionLevel int) (*BufferedConn, error)

VMSelectServer performs server-side handshake for vmselect protocol.

compressionLevel is the level used for compression of the data sent to the client. compressionLevel <= 0 means 'no compression'

func (*BufferedConn) Close

func (bc *BufferedConn) Close() error

Close closes bc.

func (*BufferedConn) Flush

func (bc *BufferedConn) Flush() error

Flush flushes internal write buffers to the underlying conn.

func (*BufferedConn) Read

func (bc *BufferedConn) Read(p []byte) (int, error)

Read reads up to len(p) from bc to p.

func (*BufferedConn) Write

func (bc *BufferedConn) Write(p []byte) (int, error)

Write writes p to bc.

Do not forget to call Flush if needed.

type Func

type Func func(c net.Conn, compressionLevel int) (*BufferedConn, error)

Func must perform handshake on the given c using the given compressionLevel.

It must return BufferedConn wrapper for c on successful handshake.

Jump to

Keyboard shortcuts

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