Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConnNotFound = errors.New("no connection in context")
Functions ¶
func Close ¶
func Close()
Close closes a connection to the clickhouse database (if one exists). It panics if any error occurs.
func FromContext ¶
func FromContext(ctx context.Context) (clickhouse.Conn, error)
FromContext extracts the clickhouse connection instance from the given context.
Returns the connection and an error if one does not exist.
func Initialize ¶
func Initialize() error
func Middleware ¶
Middleware to auto-inject the clickhouse connection instance in a request's context.
Ensure Initialize has been called before using this middleware.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.