Documentation ¶
Index ¶
- func NewCRDBDatastore(url string, options ...CRDBOption) (datastore.Datastore, error)
- type CRDBOption
- func ConnMaxIdleTime(idle time.Duration) CRDBOption
- func ConnMaxLifetime(lifetime time.Duration) CRDBOption
- func GCWindow(window time.Duration) CRDBOption
- func MaxOpenConns(conns int) CRDBOption
- func MinOpenConns(conns int) CRDBOption
- func RevisionQuantization(bucketSize time.Duration) CRDBOption
- func SplitAtEstimatedQuerySize(splitAtEstimatedQuerySize units.Base2Bytes) CRDBOption
- func WatchBufferLength(watchBufferLength uint16) CRDBOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCRDBDatastore ¶
func NewCRDBDatastore(url string, options ...CRDBOption) (datastore.Datastore, error)
Types ¶
type CRDBOption ¶
type CRDBOption func(*crdbOptions)
func ConnMaxIdleTime ¶
func ConnMaxIdleTime(idle time.Duration) CRDBOption
ConnMaxIdleTime is the duration after which an idle connection will be automatically closed by the health check. Default: no maximum
func ConnMaxLifetime ¶
func ConnMaxLifetime(lifetime time.Duration) CRDBOption
ConnMaxLifetime is the duration since creation after which a connection will be automatically closed. Default: no maximum
func GCWindow ¶
func GCWindow(window time.Duration) CRDBOption
GCWindow is the maximum age of a passed revision that will be considered valid. Default: 24h
func MaxOpenConns ¶
func MaxOpenConns(conns int) CRDBOption
MaxOpenConns is the maximum size of the connection pool. Default: no maximum
func MinOpenConns ¶
func MinOpenConns(conns int) CRDBOption
MinOpenConns is the minimum size of the connection pool. The health check will increase the number of connections to this amount if it had dropped below. Default: 0
func RevisionQuantization ¶
func RevisionQuantization(bucketSize time.Duration) CRDBOption
RevisionQuantization is the time bucket size to which advertised revisions will be rounded. Default: 5s
func SplitAtEstimatedQuerySize ¶
func SplitAtEstimatedQuerySize(splitAtEstimatedQuerySize units.Base2Bytes) CRDBOption
SplitAtEstimatedQuerySize is the query size at which it is split into two (or more) queries. Default: common.DefaultSplitAtEstimatedQuerySize
func WatchBufferLength ¶
func WatchBufferLength(watchBufferLength uint16) CRDBOption
WatchBufferLength is the number of entries that can be stored in the watch buffer while awaiting read by the client. Default: 128