import "go.chromium.org/goma/server/remoteexec/digest"
Package digest handles content digest for remote executon API, https://github.com/bazelbuild/remote-apis/blob/c1c1ad2c97ed18943adb55f06657440daa60d833/build/bazel/remote/execution/v2/remote_execution.proto#L633
digest.go digest_cache.go digest_store.go
var ( DefaultViews = []*view.View{ { Name: "go.chromium.org/goma/server/remoteexec/digest.cache-entries", Description: `number of digest cache entries`, Measure: cacheStats, Aggregation: view.Sum(), }, { Name: "go.chromium.org/goma/server/remoteexec/digest.cache-ops", Description: `digest cache operations`, Measure: cacheStats, TagKeys: []tag.Key{ opKey, fileExtKey, }, Aggregation: view.Count(), }, } )
type Cache struct {
// contains filtered or unexported fields
}
Cache caches file's digest data.
func NewCache(c cachepb.CacheServiceClient, maxEntries int) *Cache
NewCache creates new cache for digest data.
Get gets source's digest.
Data is data identified by digest.
Bytes creates data for bytes.
FromSource creates digests from source.
New creates digest data from source, which digest is d.
Proto creates data for proto message.
Source accesses data source for the digest.
type Store struct {
// contains filtered or unexported fields
}
Store works as local content addressable storage.
NewStore creates new local content addressable storage.
Get gets data from store.
GetSource gets source from store.
List lists known digests in cas.
Set sets data in store.
Package digest imports 20 packages (graph) and is imported by 6 packages. Updated 2020-10-27. Refresh now. Tools for package owners.