containerd/runtime/typeurl.go
Kenfe-Mickael Laventure 674b460d5a
Move typeurl registrations to runtime package
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-07-21 18:19:51 +02:00

18 lines
627 B
Go

package runtime
import (
"strconv"
"github.com/containerd/containerd/typeurl"
specs "github.com/opencontainers/runtime-spec/specs-go"
)
func init() {
// register TypeUrls for commonly marshaled external types
major := strconv.Itoa(specs.VersionMajor)
typeurl.Register(&specs.Spec{}, "opencontainers/runtime-spec", major, "Spec")
typeurl.Register(&specs.Process{}, "opencontainers/runtime-spec", major, "Process")
typeurl.Register(&specs.LinuxResources{}, "opencontainers/runtime-spec", major, "LinuxResources")
typeurl.Register(&specs.WindowsResources{}, "opencontainers/runtime-spec", major, "WindowsResources")
}