fdbstore

package
v0.0.0-...-0b56352 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const ObjectChunkSize = 10000

Variables

View Source
var ErrUnsupportedObjectType = fmt.Errorf("unsupported object type")

Functions

This section is empty.

Types

type FDBStore

type FDBStore struct {
	memory.ModuleStorage
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(log logrus.FieldLogger, db fdb.Database, ns, url string) (*FDBStore, error)

func (*FDBStore) CheckAndSetReference

func (s *FDBStore) CheckAndSetReference(r, old *plumbing.Reference) error

func (*FDBStore) Config

func (s *FDBStore) Config() (*config.Config, error)

func (*FDBStore) CountLooseRefs

func (s *FDBStore) CountLooseRefs() (int, error)

func (*FDBStore) DeleteLooseObject

func (s *FDBStore) DeleteLooseObject(plumbing.Hash) error

func (*FDBStore) DeleteOldObjectPackAndIndex

func (s *FDBStore) DeleteOldObjectPackAndIndex(plumbing.Hash, time.Time) error

func (*FDBStore) EncodedObject

func (*FDBStore) EncodedObjectSize

func (s *FDBStore) EncodedObjectSize(h plumbing.Hash) (size int64, err error)

func (*FDBStore) HasEncodedObject

func (s *FDBStore) HasEncodedObject(h plumbing.Hash) error

func (*FDBStore) Index

func (s *FDBStore) Index() (*index.Index, error)

func (*FDBStore) IterEncodedObjects

func (s *FDBStore) IterEncodedObjects(t plumbing.ObjectType) (storer.EncodedObjectIter, error)

TODO: optimize, this is functional but slow and wasteful

func (*FDBStore) IterReferences

func (s *FDBStore) IterReferences() (storer.ReferenceIter, error)

func (*FDBStore) LooseObjectTime

func (s *FDBStore) LooseObjectTime(hash plumbing.Hash) (time.Time, error)

func (*FDBStore) NewEncodedObject

func (s *FDBStore) NewEncodedObject() plumbing.EncodedObject

Temporarily uses a plumbing.MemoryObject, but should be replaced with a with a bespoke EncodedObject implementation later.

func (*FDBStore) ObjectPacks

func (s *FDBStore) ObjectPacks() ([]plumbing.Hash, error)

func (*FDBStore) PackRefs

func (s *FDBStore) PackRefs() error

func (*FDBStore) Reference

func (s *FDBStore) Reference(n plumbing.ReferenceName) (*plumbing.Reference, error)

func (*FDBStore) Remove

func (s *FDBStore) Remove() error

func (*FDBStore) RemoveReference

func (s *FDBStore) RemoveReference(n plumbing.ReferenceName) error

func (*FDBStore) SetConfig

func (s *FDBStore) SetConfig(r *config.Config) error

func (*FDBStore) SetEncodedObject

func (s *FDBStore) SetEncodedObject(o plumbing.EncodedObject) (plumbing.Hash, error)

Store an EncodedObject in the FDBStore returning the Hash of the object and an error if any.

func (*FDBStore) SetIndex

func (s *FDBStore) SetIndex(i *index.Index) error

func (*FDBStore) SetReference

func (s *FDBStore) SetReference(r *plumbing.Reference) error

func (*FDBStore) SetShallow

func (s *FDBStore) SetShallow(hash []plumbing.Hash) error

func (*FDBStore) Shallow

func (s *FDBStore) Shallow() ([]plumbing.Hash, error)

type ObjectHeader

type ObjectHeader struct {
	Type plumbing.ObjectType
	Size int64
}

type SlowRef

type SlowRef struct {
	Name   string
	Target string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL