query

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts struct {
	BufferSize int
	HTTPClient *http.Client
	QueryID    string
	Headers    map[string]string
}

Opts ...

type Request

type Request struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Request ...

func NewRequest

func NewRequest(ctx context.Context, cfg config.ClickHouse, opts Opts) (*Request, error)

New начинает отправлять запрос в КХ

func (*Request) Close

func (req *Request) Close() error

Close ...

func (*Request) Finish

func (req *Request) Finish() (*Response, error)

Finish завершает запрос и начинает вычитывать ответ

func (*Request) Write

func (req *Request) Write(p []byte) (int, error)

Write ...

func (*Request) WriteByte

func (req *Request) WriteByte(b byte) error

type Response

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

Response ...

func (*Response) Close

func (resp *Response) Close() error

Close вычитывает остатки из body

func (*Response) Read

func (resp *Response) Read(p []byte) (int, error)

Read читает данные из ответа

Jump to

Keyboard shortcuts

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