binary

package
v0.0.0-...-3cea427 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {

	// server response
	Server   click.Agent
	TimeZone string

	// client request
	Client click.Agent

	Credentials click.Credentials
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, conn net.Conn) *Client

func (*Client) CancelQuery

func (c *Client) CancelQuery(ctx context.Context) (err error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Conn

func (c *Client) Conn() net.Conn

func (*Client) Flush

func (c *Client) Flush() error

func (*Client) Hello

func (c *Client) Hello(ctx context.Context) (err error)

func (*Client) NextPacket

func (c *Client) NextPacket(ctx context.Context) (tp click.ServerPacket, err error)

func (*Client) RecvBlock

func (c *Client) RecvBlock(ctx context.Context, compr bool) (b *click.Block, err error)

func (*Client) RecvException

func (c *Client) RecvException(ctx context.Context) (err error)

func (*Client) RecvProfileInfo

func (c *Client) RecvProfileInfo(context.Context) (p click.ProfileInfo, err error)

func (*Client) RecvProgress

func (c *Client) RecvProgress(context.Context) (p click.Progress, err error)

func (*Client) SendBlock

func (c *Client) SendBlock(ctx context.Context, b *click.Block, compr bool) (err error)

func (*Client) SendPing

func (c *Client) SendPing(ctx context.Context) (err error)

func (*Client) SendQuery

func (c *Client) SendQuery(ctx context.Context, q *click.Query) (_ click.QueryMeta, err error)

type Decoder

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

func NewDecoder

func NewDecoder(ctx context.Context, r io.Reader) *Decoder

func (*Decoder) Bool

func (d *Decoder) Bool() (x bool, err error)

func (*Decoder) Bytes

func (d *Decoder) Bytes() (x []byte, err error)

func (*Decoder) Int8

func (d *Decoder) Int8() (x int8, err error)

func (*Decoder) Int16

func (d *Decoder) Int16() (x int16, err error)

func (*Decoder) Int32

func (d *Decoder) Int32() (x int32, err error)

func (*Decoder) Int64

func (d *Decoder) Int64() (x int64, err error)

func (*Decoder) Read

func (d *Decoder) Read(p []byte) (int, error)

func (*Decoder) ReadByte

func (d *Decoder) ReadByte() (b byte, err error)

func (*Decoder) ReadFixed

func (d *Decoder) ReadFixed(n int) (x []byte, err error)

func (*Decoder) ReadFull

func (d *Decoder) ReadFull(p []byte) (int, error)

func (*Decoder) ReadString

func (d *Decoder) ReadString() (x []byte, err error)

func (*Decoder) ReadUvarint

func (d *Decoder) ReadUvarint() (x []byte, err error)

func (*Decoder) SetCompressed

func (d *Decoder) SetCompressed(c bool)

func (*Decoder) String

func (d *Decoder) String() (x string, err error)

func (*Decoder) UInt8

func (d *Decoder) UInt8() (x uint8, err error)

func (*Decoder) UInt16

func (d *Decoder) UInt16() (x uint16, err error)

func (*Decoder) UInt32

func (d *Decoder) UInt32() (x uint32, err error)

func (*Decoder) UInt64

func (d *Decoder) UInt64() (x uint64, err error)

func (*Decoder) Uvarint

func (d *Decoder) Uvarint() (_ int, err error)

func (*Decoder) Uvarint64

func (d *Decoder) Uvarint64() (_ uint64, err error)

type DumpConn

type DumpConn struct {
	io.Reader
	io.Writer
	io.Closer
	Flusher

	net.Conn

	tlog.Span
	Callers int
}

func NewDumpConn

func NewDumpConn(c interface{}, tr tlog.Span) *DumpConn

func (*DumpConn) Close

func (c *DumpConn) Close() (err error)

func (*DumpConn) Flush

func (c *DumpConn) Flush() (err error)

func (*DumpConn) Read

func (c *DumpConn) Read(p []byte) (n int, err error)

func (*DumpConn) Write

func (c *DumpConn) Write(p []byte) (n int, err error)

type Encoder

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

func NewEncoder

func NewEncoder(ctx context.Context, w io.Writer) *Encoder

func (*Encoder) Bool

func (e *Encoder) Bool(x bool) (err error)

func (*Encoder) Flush

func (e *Encoder) Flush() error

func (*Encoder) Int8

func (e *Encoder) Int8(x int8) (err error)

func (*Encoder) Int16

func (e *Encoder) Int16(x int16) (err error)

func (*Encoder) Int32

func (e *Encoder) Int32(x int32) (err error)

func (*Encoder) Int64

func (e *Encoder) Int64(x int64) (err error)

func (*Encoder) RawString

func (e *Encoder) RawString(x []byte) (err error)

func (*Encoder) SetCompressed

func (e *Encoder) SetCompressed(c bool) (err error)

func (*Encoder) String

func (e *Encoder) String(x string) (err error)

func (*Encoder) UInt8

func (e *Encoder) UInt8(x uint8) (err error)

func (*Encoder) UInt16

func (e *Encoder) UInt16(x uint16) (err error)

func (*Encoder) UInt32

func (e *Encoder) UInt32(x uint32) (err error)

func (*Encoder) UInt64

func (e *Encoder) UInt64(x uint64) (err error)

func (*Encoder) Uvarint

func (e *Encoder) Uvarint(x int) (err error)

func (*Encoder) Uvarint64

func (e *Encoder) Uvarint64(x uint64) (err error)

func (*Encoder) Write

func (e *Encoder) Write(p []byte) (int, error)

type Flusher

type Flusher interface {
	Flush() error
}

type Server

type Server struct {
	Auth func(context.Context, *Server) error

	// server response
	Server   click.Agent
	TimeZone string

	// client request
	Client click.Agent

	Credentials click.Credentials
	// contains filtered or unexported fields
}

func NewServerConn

func NewServerConn(ctx context.Context, conn net.Conn) *Server

func (*Server) Close

func (c *Server) Close() error

func (*Server) Conn

func (c *Server) Conn() net.Conn

func (*Server) Flush

func (c *Server) Flush() error

func (*Server) Hello

func (c *Server) Hello(ctx context.Context) error

func (*Server) NextPacket

func (c *Server) NextPacket(ctx context.Context) (pk click.ClientPacket, err error)

func (*Server) RecvBlock

func (c *Server) RecvBlock(ctx context.Context, compr bool) (b *click.Block, err error)

func (*Server) RecvQuery

func (c *Server) RecvQuery(ctx context.Context) (q *click.Query, err error)

func (*Server) SendBlock

func (c *Server) SendBlock(ctx context.Context, b *click.Block, compr bool) (err error)

func (*Server) SendEndOfStream

func (c *Server) SendEndOfStream(ctx context.Context) (err error)

func (*Server) SendException

func (c *Server) SendException(ctx context.Context, exc error) (err error)

func (*Server) SendProfileInfo

func (c *Server) SendProfileInfo(ctx context.Context, p click.ProfileInfo) (err error)

func (*Server) SendProgress

func (c *Server) SendProgress(ctx context.Context, p click.Progress) (err error)

func (*Server) SendQueryMeta

func (c *Server) SendQueryMeta(ctx context.Context, meta click.QueryMeta, compr bool) (err error)

Jump to

Keyboard shortcuts

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