MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Discover

Method Discover

pkg/policies/engine/builtins/discover.go:36–46  ·  view source on GitHub ↗

Discover calls the DiscoverPrivate gRPC endpoint to get artifact graph data

(ctx context.Context, digest, kind string)

Source from the content-addressed store, hash-verified

34
35// Discover calls the DiscoverPrivate gRPC endpoint to get artifact graph data
36func (s *DiscoverService) Discover(ctx context.Context, digest, kind string) (*v1.ReferrerServiceDiscoverPrivateResponse, error) {
37 if s.conn == nil {
38 return nil, nil
39 }
40
41 client := v1.NewReferrerServiceClient(s.conn)
42 return client.DiscoverPrivate(ctx, &v1.ReferrerServiceDiscoverPrivateRequest{
43 Digest: digest,
44 Kind: kind,
45 })
46}

Callers 5

getDiscoverRegoImplFunction · 0.95
ExecuteFunction · 0.80
loadMethod · 0.80
LoadPluginsMethod · 0.80

Calls 2

DiscoverPrivateMethod · 0.95
NewReferrerServiceClientFunction · 0.92

Tested by

no test coverage detected