Documentation ¶
Index ¶
- Constants
- Variables
- func Escape(txt string) string
- func Flush(dst *destination.Setting, table string, body []byte, rowBinary bool) error
- func GetDestinationSetting(tableName string) *destination.Setting
- func Init()
- func IsSyntaxError(err error) bool
- func QueryDeadline(deadline time.Time, query string) (httpCode int, res []byte, err error)
- func RunReverseProxy(listenAddr, chAddr string) error
- func UpdateDestinationsConfig(m destination.Map)
Constants ¶
View Source
const ( FlagRowBinary = 1 << iota FlagLZ4 )
Variables ¶
View Source
var ( // ErrMustBeSelect means that you sent something that is probably not a SELECT query. // We do not support other queries because we do not know where to send query without a table name. ErrMustBeSelect = errors.New("Query must be in form 'SELECT ... FROM table'") // ErrTooBigResult means that daemon would probably exceed maximum response size if full result is sent. ErrTooBigResult = fmt.Errorf("Result exceeds %d MiB", maxResultSize/(1<<20)) // ErrTooBigResponse means that ClickHouse server was going to send too big of a response to INSERT ErrTooBigResponse = fmt.Errorf("Too big response from server") ErrTemporarilyUnavailable = errors.New("No servers available") )
Functions ¶
func GetDestinationSetting ¶
func GetDestinationSetting(tableName string) *destination.Setting
GetDestinationSetting returns setting for specified table name
func IsSyntaxError ¶
IsSyntaxError returns whether or not error was caused by wrong syntax in a query
func QueryDeadline ¶
QueryDeadline performs supplied query at appropriate server. There is no limit on number of concurrent queries, so use this method with care.
func RunReverseProxy ¶
RunReverseProxy starts a web server that proxies INSERTs and SELECTs to ClickHouse. INSERTs are grouped by query text in URL.
listenAddr is in form "0.0.0.0:1234" chAddr is the address of ClickHouse and must be in form "127.0.0.1:2345" as well
func UpdateDestinationsConfig ¶
func UpdateDestinationsConfig(m destination.Map)
UpdateDestinationsConfig is used for QueryDeadline to determine where to send query.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.