Versions in this module Expand all Collapse all v1 v1.2.1 May 14, 2026 Changes in this version + const EnvPrefix + var ErrConnectionConfigIsNotSet = errors.New("connection config is not set") + var ErrConnectionIsNotSet = errors.New("connection is not set") + func Default(names ...string) (*fdbclient.Client, error) + func Get(name string) (*fdbclient.Client, error) + func NewConnection(config *ConnectionConfig) (*fdbclient.Client, error) + func NewConnectionFromEnv(prefix string) (*fdbclient.Client, error) + func Set(name string, client *fdbclient.Client) + type ConnectionConfig struct + ConnectionTimeout time.Duration + ErrorRateWindow time.Duration + IdleTimeout time.Duration + MaxConnsPerNode int + MaxErrorRate int + MultiplexConnsPerNode int + MultiplexMinConnsPerNode int + Multiplexing bool + PoolSizePerNode int + Seeds []string + TendInterval time.Duration + func DefaultConnectionConfig(seeds ...string) *ConnectionConfig + func GetConnectionConfigFromEnv(prefix string) (*ConnectionConfig, error) + type ConnectionRegistry struct + func NewConnectionRegistry() *ConnectionRegistry + func (r *ConnectionRegistry) Close() error + func (r *ConnectionRegistry) Default(name string, config *ConnectionConfig) (*fdbclient.Client, error) + func (r *ConnectionRegistry) Get(name string) (*fdbclient.Client, error) + func (r *ConnectionRegistry) Set(name string, client *fdbclient.Client) + type CountOptions struct + AllNodes bool + Namespace string + Set string + type Database interface + Close func() error + CountRecords func(ctx context.Context, options CountOptions) (Result, error) + DeleteRecord func(ctx context.Context, options DeleteOptions) (Result, error) + GetRecord func(ctx context.Context, options GetOptions) (RecordResult, error) + Ping func(ctx context.Context) error + PutRecord func(ctx context.Context, options PutOptions) (Result, error) + type DatabaseClient struct + func DefaultDatabase(names ...string) (*DatabaseClient, error) + func NewDatabase(config *ConnectionConfig) (*DatabaseClient, error) + func WrapClient(client *fdbclient.Client) *DatabaseClient + func (c *DatabaseClient) Client() *fdbclient.Client + func (c *DatabaseClient) Close() error + func (c *DatabaseClient) CountRecords(ctx context.Context, options CountOptions) (Result, error) + func (c *DatabaseClient) DeleteRecord(ctx context.Context, options DeleteOptions) (Result, error) + func (c *DatabaseClient) GetRecord(ctx context.Context, options GetOptions) (RecordResult, error) + func (c *DatabaseClient) Ping(ctx context.Context) error + func (c *DatabaseClient) PutRecord(ctx context.Context, options PutOptions) (Result, error) + type DeleteOptions struct + Key Key + Write WriteOptions + type GetOptions struct + BinNames []string + Key Key + type Key struct + Namespace string + Set string + Value string + type PutOptions struct + Bins map[string]any + Key Key + Write WriteOptions + type Record struct + Bins map[string]any + Generation uint32 + Key Key + type RecordResult struct + Found bool + Record Record + type Result struct + Affected int64 + Deleted bool + type WriteOptions struct + ClearTTL bool + CommitMaster bool + CreateOnly bool + Generation uint32 + MergeBins bool + PreserveTTL bool + Replace bool + ReplaceBins bool + TTLSeconds uint32