Documentation ¶
Index ¶
- func NewPiecesStorage(opts NewPoolOpts) (_ storage.ClientImplCloser, err error)
- func NewPool(opts NewPoolOpts) (_ ConnPool, _ ProviderOpts, err error)
- func NewProvider(pool ConnPool, opts ProviderOpts) (_ *provider, err error)
- func SetCapacity(conn conn, cap int64) error
- func UnlimitCapacity(conn conn) error
- type ConnPool
- type NewPoolOpts
- type ProviderOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPiecesStorage ¶ added in v1.19.0
func NewPiecesStorage(opts NewPoolOpts) (_ storage.ClientImplCloser, err error)
A convenience function that creates a connection pool, resource provider, and a pieces storage ClientImpl and returns them all with a Close attached.
func NewPool ¶ added in v1.19.0
func NewPool(opts NewPoolOpts) (_ ConnPool, _ ProviderOpts, err error)
func NewProvider ¶
func NewProvider(pool ConnPool, opts ProviderOpts) (_ *provider, err error)
Needs the ConnPool size so it can initialize all the connections with pragmas. Takes ownership of the ConnPool (since it has to initialize all the connections anyway).
func SetCapacity ¶ added in v1.19.0
Set the capacity limit to exactly this value.
func UnlimitCapacity ¶ added in v1.19.0
func UnlimitCapacity(conn conn) error
Remove any capacity limits.
Types ¶
type NewPoolOpts ¶ added in v1.19.0
type ProviderOpts ¶ added in v1.19.0
type ProviderOpts struct { NumConns int // Concurrent blob reads require WAL. ConcurrentBlobRead bool BatchWrites bool }
There's some overlap here with NewPoolOpts, and I haven't decided what needs to be done. For now, the fact that the pool opts are a superset, means our helper NewPiecesStorage can just take the top-level option type.
Click to show internal directories.
Click to hide internal directories.