LoadBundle loads an existing bundle from disk
(ctx context.Context, root, id string)
| 32 | |
| 33 | // LoadBundle loads an existing bundle from disk |
| 34 | func LoadBundle(ctx context.Context, root, id string) (*Bundle, error) { |
| 35 | ns, err := namespaces.NamespaceRequired(ctx) |
| 36 | if err != nil { |
| 37 | return nil, err |
| 38 | } |
| 39 | return &Bundle{ |
| 40 | ID: id, |
| 41 | Path: filepath.Join(root, ns, id), |
| 42 | Namespace: ns, |
| 43 | }, nil |
| 44 | } |
| 45 | |
| 46 | // NewBundle returns a new bundle on disk |
| 47 | func NewBundle(ctx context.Context, root, state, id string, spec typeurl.Any) (b *Bundle, err error) { |
no test coverage detected
searching dependent graphs…