MCPcopy
hub / github.com/aquasecurity/trivy / ArtifactCache

Interface ArtifactCache

pkg/cache/cache.go:24–36  ·  view source on GitHub ↗

ArtifactCache uses local or remote cache

Source from the content-addressed store, hash-verified

22
23// ArtifactCache uses local or remote cache
24type ArtifactCache interface {
25 // MissingBlobs returns missing blob IDs such as layer IDs in cache
26 MissingBlobs(ctx context.Context, artifactID string, blobIDs []string) (missingArtifact bool, missingBlobIDs []string, err error)
27
28 // PutArtifact stores artifact information such as image metadata in cache
29 PutArtifact(ctx context.Context, artifactID string, artifactInfo types.ArtifactInfo) (err error)
30
31 // PutBlob stores blob information such as layer information in local cache
32 PutBlob(ctx context.Context, blobID string, blobInfo types.BlobInfo) (err error)
33
34 // DeleteBlobs removes blobs by IDs
35 DeleteBlobs(ctx context.Context, blobIDs []string) error
36}
37
38// LocalArtifactCache always uses local cache
39type LocalArtifactCache interface {

Callers 23

MissingBlobsMethod · 0.65
InspectMethod · 0.65
InspectMethod · 0.65
hasCacheMethod · 0.65
MissingBlobsMethod · 0.65
MissingBlobsMethod · 0.65
PutArtifactMethod · 0.65
inspectConfigMethod · 0.65
PutArtifactMethod · 0.65
PutArtifactMethod · 0.65
PutBlobMethod · 0.65
inspectMethod · 0.65

Implementers 8

mockCacheServerpkg/cache/remote_test.go
RedisCachepkg/cache/redis.go
RemoteCachepkg/cache/remote.go
FSCachepkg/cache/fs.go
MemoryCachepkg/cache/memory.go
CacheServerpkg/rpc/server/server.go
cacheProtobufClientrpc/cache/service.twirp.go
cacheJSONClientrpc/cache/service.twirp.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…