github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/lib/kv/unsupported.go (about) 1 //go:build plan9 || js 2 3 // Package kv provides key/value database. 4 package kv 5 6 import ( 7 "context" 8 9 "github.com/rclone/rclone/fs" 10 ) 11 12 // DB represents a key-value database 13 type DB struct{} 14 15 // Supported returns true on supported OSes 16 func Supported() bool { return false } 17 18 // Start a key-value database 19 func Start(ctx context.Context, facility string, f fs.Fs) (*DB, error) { 20 return nil, ErrUnsupported 21 } 22 23 // Get returns database for given filesystem and facility 24 func Get(f fs.Fs, facility string) *DB { return nil } 25 26 // Path returns database path 27 func (*DB) Path() string { return "UNSUPPORTED" } 28 29 // Do submits a key-value request and waits for results 30 func (*DB) Do(write bool, op Op) error { 31 return ErrUnsupported 32 } 33 34 // Stop a database loop, optionally removing the file 35 func (*DB) Stop(remove bool) error { 36 return ErrUnsupported 37 } 38 39 // IsStopped returns true if db is already stopped 40 func (db *DB) IsStopped() bool { 41 return true 42 } 43 44 // Exit stops all databases 45 func Exit() {}