Documentation ¶
Index ¶
- Constants
- Variables
- func NewStore(dbURLString string) (db storage.KeyValueStore, err error)
- type Config
- type Service
- func (s *Service) Delete(path string) (err error)
- func (s *Service) Get(path string) (pointer *pb.Pointer, err error)
- func (s *Service) Iterate(prefix string, first string, recurse bool, reverse bool, ...) (err error)
- func (s *Service) List(prefix string, startAfter string, endBefore string, recursive bool, ...) (items []*pb.ListResponse_Item, more bool, err error)
- func (s *Service) Put(path string, pointer *pb.Pointer) (err error)
Constants ¶
View Source
const (
// BoltPointerBucket is the string representing the bucket used for `PointerEntries` in BoltDB
BoltPointerBucket = "pointers"
)
Variables ¶
View Source
var Error = errs.Class("pointerdb error")
Error is the default boltdb errs class
Functions ¶
Types ¶
type Config ¶
type Config struct { DatabaseURL string `help:"the database connection string to use" default:"bolt://$CONFDIR/pointerdb.db"` MinRemoteSegmentSize memory.Size `default:"1240" help:"minimum remote segment size"` MaxInlineSegmentSize memory.Size `default:"8000" help:"maximum inline segment size"` Overlay bool `default:"true" help:"toggle flag if overlay is enabled"` BwExpiration int `default:"45" help:"lifespan of bandwidth agreements in days"` }
Config is a configuration struct that is everything you need to start a PointerDB responsibility
type Service ¶
type Service struct { DB storage.KeyValueStore // contains filtered or unexported fields }
Service structure
func NewService ¶
func NewService(logger *zap.Logger, db storage.KeyValueStore) *Service
NewService creates new pointerdb service
func (*Service) Iterate ¶
func (s *Service) Iterate(prefix string, first string, recurse bool, reverse bool, f func(it storage.Iterator) error) (err error)
Iterate iterates over items in db
Click to show internal directories.
Click to hide internal directories.