MCPcopy Create free account
hub / github.com/containers/common / RuntimeFromStore

Function RuntimeFromStore

libimage/runtime.go:94–115  ·  view source on GitHub ↗

RuntimeFromStore returns a Runtime for the specified store.

(store storage.Store, options *RuntimeOptions)

Source from the content-addressed store, hash-verified

92
93// RuntimeFromStore returns a Runtime for the specified store.
94func RuntimeFromStore(store storage.Store, options *RuntimeOptions) (*Runtime, error) {
95 if options == nil {
96 options = &RuntimeOptions{}
97 }
98
99 var systemContext types.SystemContext
100 if options.SystemContext != nil {
101 systemContext = *options.SystemContext
102 } else {
103 systemContext = types.SystemContext{}
104 }
105 if systemContext.BigFilesTemporaryDir == "" {
106 systemContext.BigFilesTemporaryDir = tmpdir()
107 }
108
109 setRegistriesConfPath(&systemContext)
110
111 return &Runtime{
112 store: store,
113 systemContext: systemContext,
114 }, nil
115}
116
117// RuntimeFromStoreOptions returns a return for the specified store options.
118func RuntimeFromStoreOptions(runtimeOptions *RuntimeOptions, storeOptions *storage.StoreOptions) (*Runtime, error) {

Callers 1

RuntimeFromStoreOptionsFunction · 0.85

Calls 2

tmpdirFunction · 0.85
setRegistriesConfPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…