storage

package
v0.0.0-...-d3fcdae Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyDigest = &remoteexecution.Digest{
	Hash:      "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
	SizeBytes: 0,
}

EmptyDigest is a REv2 Digest representing an object of size 0 hashed with SHA256

Functions

func AssetReferenceToDigest

func AssetReferenceToDigest(ar *asset.AssetReference, instance digest.InstanceName) (digest.Digest, error)

AssetReferenceToDigest converts an AssetReference into a bb-storage Digest of its wire format

func NewAsset

func NewAsset(digest *remoteexecution.Digest, expireAt *timestamppb.Timestamp) *asset.Asset

NewAsset creates a new Asset from request data.

func NewAssetReference

func NewAssetReference(uris []string, qualifiers []*remoteasset.Qualifier) *asset.AssetReference

NewAssetReference creates a new AssetReference from a URI and a list of qualifiers. Mainly this is a wrapper to ensure the qualifiers get sorted

func ProtoToDigest

func ProtoToDigest(pb proto.Message) (*remoteexecution.Digest, error)

ProtoToDigest converts an arbitrary proto to a remote execution Digest

Types

type AssetStore

type AssetStore interface {
	Get(ctx context.Context, ref *asset.AssetReference, instance digest.InstanceName) (*asset.Asset, error)
	Put(ctx context.Context, ref *asset.AssetReference, data *asset.Asset, instance digest.InstanceName) error
}

AssetStore is a wrapper around a BlobAccess to inteface well with AssetReference messages

func NewActionCacheAssetStore

func NewActionCacheAssetStore(actionCache, contentAddressableStorage blobstore.BlobAccess, maximumMessageSizeBytes int) AssetStore

NewActionCacheAssetStore creates a new AssetStore which stores it's references as ActionResults in the Action Cache.

func NewBlobAccessAssetStore

func NewBlobAccessAssetStore(ba blobstore.BlobAccess, maximumMessageSizeBytes int) AssetStore

NewBlobAccessAssetStore creates a new AssetStore from a BlobAccess

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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