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.GlobalReference, 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.
func UploadDAG ¶
func UploadDAG(ctx context.Context, client dag_pb.UploaderClient, rootReference object.GlobalReference, rootObjectContentsWalker ObjectContentsWalker, objectContentsWalkerSemaphore *semaphore.Weighted, maximumUnfinalizedParentsLimit object.Limit) error
UploadDAG uploads a single DAG of objects to a server via gRPC.
Types ¶
type ObjectContentsWalker ¶
type ObjectContentsWalker interface { GetContents(ctx context.Context) (*object.Contents, []ObjectContentsWalker, error) Discard() }
ObjectContentsWalker is called into by UploadDAG to request the contents of an object. 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{}
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.