MCPcopy Create free account
hub / github.com/rilldata/rill / resourceToDriver

Function resourceToDriver

runtime/catalog_cache.go:566–577  ·  view source on GitHub ↗

resourceToDriver converts a proto resource to a drivers.Resource.

(r *runtimev1.Resource)

Source from the content-addressed store, hash-verified

564
565// resourceToDriver converts a proto resource to a drivers.Resource.
566func resourceToDriver(r *runtimev1.Resource) drivers.Resource {
567 data, err := proto.Marshal(r)
568 if err != nil {
569 panic(err)
570 }
571
572 return drivers.Resource{
573 Kind: r.Meta.Name.Kind,
574 Name: r.Meta.Name.Name,
575 Data: data,
576 }
577}

Callers 1

flushMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected