Rename Runtime to PlatformRuntime
This renames the runtime interface to PlatformRuntime to denote the layer at which the runtime is being abstracted. This should be used to abstract different platforms that vary greatly and do not have full compat with OCI based binary runtimes. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -79,14 +79,14 @@ func initFunc(ic *plugin.InitContext) (interface{}, error) {
|
||||
return nil, err
|
||||
}
|
||||
cs := m.(*metadata.DB).ContentStore()
|
||||
runtimes := make(map[string]runtime.Runtime)
|
||||
runtimes := make(map[string]runtime.PlatformRuntime)
|
||||
for _, rr := range rt {
|
||||
ri, err := rr.Instance()
|
||||
if err != nil {
|
||||
log.G(ic.Context).WithError(err).Warn("could not load runtime instance due to initialization error")
|
||||
continue
|
||||
}
|
||||
r := ri.(runtime.Runtime)
|
||||
r := ri.(runtime.PlatformRuntime)
|
||||
runtimes[r.ID()] = r
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ func initFunc(ic *plugin.InitContext) (interface{}, error) {
|
||||
}
|
||||
|
||||
type local struct {
|
||||
runtimes map[string]runtime.Runtime
|
||||
runtimes map[string]runtime.PlatformRuntime
|
||||
db *metadata.DB
|
||||
store content.Store
|
||||
publisher events.Publisher
|
||||
@@ -625,7 +625,7 @@ func (l *local) getTaskFromContainer(ctx context.Context, container *containers.
|
||||
return t, nil
|
||||
}
|
||||
|
||||
func (l *local) getRuntime(name string) (runtime.Runtime, error) {
|
||||
func (l *local) getRuntime(name string) (runtime.PlatformRuntime, error) {
|
||||
runtime, ok := l.runtimes[name]
|
||||
if !ok {
|
||||
return nil, status.Errorf(codes.NotFound, "unknown runtime %q", name)
|
||||
|
||||
Reference in New Issue
Block a user