transactional
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package transactional is a transactional implementation of git.Storer, itdemux the write and read operation of two separate storers, allowing to mergecontent calling Storage.Commit.
The API and functionality of this package are considered EXPERIMENTAL and isnot considered stable nor production ready.
Index¶
- type ConfigStorage
- type IndexStorage
- type ObjectStorage
- func (o *ObjectStorage) AddAlternate(remote string) error
- func (o *ObjectStorage) Commit() error
- func (o *ObjectStorage) EncodedObject(t plumbing.ObjectType, h plumbing.Hash) (plumbing.EncodedObject, error)
- func (o *ObjectStorage) EncodedObjectSize(h plumbing.Hash) (int64, error)
- func (o *ObjectStorage) HasEncodedObject(h plumbing.Hash) error
- func (o *ObjectStorage) IterEncodedObjects(t plumbing.ObjectType) (storer.EncodedObjectIter, error)
- func (o *ObjectStorage) SetEncodedObject(obj plumbing.EncodedObject) (plumbing.Hash, error)
- type ReferenceStorage
- func (r *ReferenceStorage) CheckAndSetReference(ref, old *plumbing.Reference) error
- func (r ReferenceStorage) Commit() error
- func (r ReferenceStorage) CountLooseRefs() (int, error)
- func (r ReferenceStorage) IterReferences() (storer.ReferenceIter, error)
- func (r ReferenceStorage) PackRefs() error
- func (r ReferenceStorage) Reference(n plumbing.ReferenceName) (*plumbing.Reference, error)
- func (r ReferenceStorage) RemoveReference(n plumbing.ReferenceName) error
- func (r *ReferenceStorage) SetReference(ref *plumbing.Reference) error
- type ShallowStorage
- type Storage
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeConfigStorage¶
type ConfigStorage struct {config.ConfigStorer// contains filtered or unexported fields}ConfigStorage implements the storer.ConfigStorage for the transactional package.
funcNewConfigStorage¶
func NewConfigStorage(s, temporalconfig.ConfigStorer) *ConfigStorage
NewConfigStorage returns a new ConfigStorer based on a base storer and atemporal storer.
func (*ConfigStorage)Commit¶
func (c *ConfigStorage) Commit()error
Commit it copies the config from the temporal storage into the base storage.
typeIndexStorage¶
type IndexStorage struct {storer.IndexStorer// contains filtered or unexported fields}IndexStorage implements the storer.IndexStorage for the transactional package.
funcNewIndexStorage¶
func NewIndexStorage(s, temporalstorer.IndexStorer) *IndexStorage
NewIndexStorage returns a new IndexStorer based on a base storer and atemporal storer.
func (*IndexStorage)Commit¶
func (s *IndexStorage) Commit()error
Commit it copies the index from the temporal storage into the base storage.
typeObjectStorage¶
type ObjectStorage struct {storer.EncodedObjectStorer// contains filtered or unexported fields}ObjectStorage implements the storer.EncodedObjectStorer for the transactional package.
funcNewObjectStorage¶
func NewObjectStorage(base, temporalstorer.EncodedObjectStorer) *ObjectStorage
NewObjectStorage returns a new EncodedObjectStorer based on a base storer anda temporal storer.
func (*ObjectStorage)AddAlternate¶added inv5.10.0
func (o *ObjectStorage) AddAlternate(remotestring)error
func (*ObjectStorage)Commit¶
func (o *ObjectStorage) Commit()error
Commit it copies the objects of the temporal storage into the base storage.
func (*ObjectStorage)EncodedObject¶
func (o *ObjectStorage) EncodedObject(tplumbing.ObjectType, hplumbing.Hash) (plumbing.EncodedObject,error)
EncodedObject honors the storer.EncodedObjectStorer interface.
func (*ObjectStorage)EncodedObjectSize¶
func (o *ObjectStorage) EncodedObjectSize(hplumbing.Hash) (int64,error)
EncodedObjectSize honors the storer.EncodedObjectStorer interface.
func (*ObjectStorage)HasEncodedObject¶
func (o *ObjectStorage) HasEncodedObject(hplumbing.Hash)error
HasEncodedObject honors the storer.EncodedObjectStorer interface.
func (*ObjectStorage)IterEncodedObjects¶
func (o *ObjectStorage) IterEncodedObjects(tplumbing.ObjectType) (storer.EncodedObjectIter,error)
IterEncodedObjects honors the storer.EncodedObjectStorer interface.
func (*ObjectStorage)SetEncodedObject¶
func (o *ObjectStorage) SetEncodedObject(objplumbing.EncodedObject) (plumbing.Hash,error)
SetEncodedObject honors the storer.EncodedObjectStorer interface.
typeReferenceStorage¶
type ReferenceStorage struct {storer.ReferenceStorer// contains filtered or unexported fields}ReferenceStorage implements the storer.ReferenceStorage for the transactional package.
funcNewReferenceStorage¶
func NewReferenceStorage(base, temporalstorer.ReferenceStorer) *ReferenceStorage
NewReferenceStorage returns a new ReferenceStorer based on a base storer anda temporal storer.
func (*ReferenceStorage)CheckAndSetReference¶
func (r *ReferenceStorage) CheckAndSetReference(ref, old *plumbing.Reference)error
SetReference honors the storer.ReferenceStorer interface.
func (ReferenceStorage)Commit¶
func (rReferenceStorage) Commit()error
Commit it copies the reference information of the temporal storage into thebase storage.
func (ReferenceStorage)CountLooseRefs¶
func (rReferenceStorage) CountLooseRefs() (int,error)
CountLooseRefs honors the storer.ReferenceStorer interface.
func (ReferenceStorage)IterReferences¶
func (rReferenceStorage) IterReferences() (storer.ReferenceIter,error)
IterReferences honors the storer.ReferenceStorer interface.
func (ReferenceStorage)PackRefs¶
func (rReferenceStorage) PackRefs()error
PackRefs honors the storer.ReferenceStorer interface.
func (ReferenceStorage)Reference¶
func (rReferenceStorage) Reference(nplumbing.ReferenceName) (*plumbing.Reference,error)
Reference honors the storer.ReferenceStorer interface.
func (ReferenceStorage)RemoveReference¶
func (rReferenceStorage) RemoveReference(nplumbing.ReferenceName)error
RemoveReference honors the storer.ReferenceStorer interface.
func (*ReferenceStorage)SetReference¶
func (r *ReferenceStorage) SetReference(ref *plumbing.Reference)error
SetReference honors the storer.ReferenceStorer interface.
typeShallowStorage¶
type ShallowStorage struct {storer.ShallowStorer// contains filtered or unexported fields}ShallowStorage implements the storer.ShallowStorer for the transactional package.
funcNewShallowStorage¶
func NewShallowStorage(base, temporalstorer.ShallowStorer) *ShallowStorage
NewShallowStorage returns a new ShallowStorage based on a base storer anda temporal storer.
func (*ShallowStorage)Commit¶
func (s *ShallowStorage) Commit()error
Commit it copies the shallow information of the temporal storage into thebase storage.
func (*ShallowStorage)SetShallow¶
func (s *ShallowStorage) SetShallow(commits []plumbing.Hash)error
SetShallow honors the storer.ShallowStorer interface.
typeStorage¶
Storage is a transactional implementation of git.Storer, it demux the writeand read operation of two separate storers, allowing to merge content callingStorage.Commit.
The API and functionality of this package are considered EXPERIMENTAL and isnot considered stable nor production ready.
funcNewStorage¶
NewStorage returns a new Storage based on two repositories, base is the baserepository where the read operations are read and temporal is were allthe write operations are stored.