dag

package
v0.0.0-...-10ddd63 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUploaderServer

func NewUploaderServer[TLease any](
	objectUploader object.Uploader[object.GlobalReference, TLease],
	objectStoreSemaphore *semaphore.Weighted,
	tagUpdater tag.Updater[object.Namespace, TLease],
	maximumUnfinalizedDAGsCount uint32,
	maximumUnfinalizedParentsLimit object.Limit,
) dag.UploaderServer

NewUploaderServer creates a gRPC server that is capable of forwarding storage requests of the dag.Uploader API to instances of object.Uploader and tag.Updater.

Types

type ObjectContentsWalker

type ObjectContentsWalker interface {
	GetContents(ctx context.Context) (*object.Contents, []ObjectContentsWalker, error)
	Discard()
}

ObjectContentsWalker is called into by Uploader.UploadDAG() to request the contents of an object. Uploader.UploadDAG() may also discard them in case a server responds that the object already exists, or if multiple walkers for the same object exist.

var ExistingObjectContentsWalker ObjectContentsWalker = existingObjectContentsWalker{}

ExistingObjectContentsWalker is an implementation of ObjectContentsWalker that always returns an error when an attempt is made to upload. It can be used in places where we expect the underlying object to already be present in storage. The storage server should therefore never attempt to request the object's contents from the client.

func NewSimpleObjectContentsWalker

func NewSimpleObjectContentsWalker(contents *object.Contents, walkers []ObjectContentsWalker) ObjectContentsWalker

NewSimpleObjectContentsWalker creates an ObjectContentsWalker that is backed by a literal message and a list of ObjectContentsWalkers for its children. This implementation is sufficient when uploading DAGs that reside fully in memory.