Documentation ¶
Index ¶
- Variables
- func AssetReferenceToDigest(ar *asset.AssetReference, instance digest.InstanceName) (digest.Digest, error)
- func NewAsset(digest *remoteexecution.Digest, expireAt *timestamppb.Timestamp) *asset.Asset
- func NewAssetReference(uris []string, qualifiers []*remoteasset.Qualifier) *asset.AssetReference
- func ProtoToDigest(pb proto.Message) (*remoteexecution.Digest, error)
- type AssetStore
Constants ¶
This section is empty.
Variables ¶
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