Documentation
¶
Overview ¶
Package boltpersistence is a BoltDB (bbolt) persistence provider.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileProvider ¶
type FileProvider struct { // Path is the path to the BoltDB database to open or create. Path string // Mode is the file mode for the created file. // If it is zero, 0600 (owner read/write only) is used. Mode os.FileMode // Options is the BoltDB options for the database. // If it is nil, bbolt.DefaultOptions is used. Options *bbolt.Options // contains filtered or unexported fields }
FileProvider is an implementation of provider.Provider for BoltDB that opens a BoltDB database file.
func (*FileProvider) Open ¶
func (p *FileProvider) Open(ctx context.Context, k string) (persistence.DataStore, error)
Open returns a data-store for a specific application.
k is the identity key of the application.
Data stores are opened for exclusive use. If another engine instance has already opened this application's data-store, ErrDataStoreLocked is returned.
type Provider ¶
type Provider struct { // DB is the BoltDB database to use. DB *bbolt.DB // contains filtered or unexported fields }
Provider is an implementation of provider.Provider for BoltDB that uses an existing open database.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.