Documentation
¶
Index ¶
- type ClickhouseEngine
- type Config
- type Storage
- func (s *Storage) Close() error
- func (s *Storage) Delete(key string) error
- func (s *Storage) DeleteWithContext(ctx context.Context, key string) error
- func (s *Storage) Get(key string) ([]byte, error)
- func (s *Storage) GetWithContext(ctx context.Context, key string) ([]byte, error)
- func (s *Storage) Reset() error
- func (s *Storage) ResetWithContext(ctx context.Context) error
- func (s *Storage) Set(key string, value []byte, expiration time.Duration) error
- func (s *Storage) SetWithContext(ctx context.Context, key string, value []byte, expiration time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClickhouseEngine ¶
type ClickhouseEngine string
const ( Memory ClickhouseEngine = "Memory" MergeTree ClickhouseEngine = "MergeTree" StripeLog ClickhouseEngine = "StripeLog" TinyLog ClickhouseEngine = "TinyLog" Log ClickhouseEngine = "Log" )
type Config ¶
type Config struct {
// The host of the database. Ex: 127.0.0.1
Host string
// The port where the database is supposed to listen to. Ex: 9000
Port int
// The database that the connection should authenticate from
Database string
// The username to be used in the authentication
Username string
// The password to be used in the authentication
Password string
// The name of the table that will store the data
Table string
// The engine that should be used in the table
Engine ClickhouseEngine
// Should start a clean table, default false
Clean bool
// TLS configuration, default nil
TLSConfig *tls.Config
// Should the connection be in debug mode, default false
Debug bool
// The function to use with the debug config, default print function. It only works when debug is true
Debugf func(format string, v ...any)
}
Config defines configuration options for Clickhouse connection.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) DeleteWithContext ¶ added in v0.3.0
func (*Storage) GetWithContext ¶ added in v0.3.0
func (*Storage) ResetWithContext ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.