From 1f4192daf48150b2552a47c7a00f733bd4fdadad Mon Sep 17 00:00:00 2001 From: Samuel Karp Date: Fri, 11 Dec 2020 22:21:26 -0800 Subject: [PATCH] freebsd: exclude v1 runtimes Signed-off-by: Samuel Karp --- services/tasks/local_freebsd.go | 35 +++++++++++++++++++++++++++++++++ services/tasks/local_unix.go | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 services/tasks/local_freebsd.go diff --git a/services/tasks/local_freebsd.go b/services/tasks/local_freebsd.go new file mode 100644 index 000000000..d206b8f25 --- /dev/null +++ b/services/tasks/local_freebsd.go @@ -0,0 +1,35 @@ +// +build freebsd + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package tasks + +import ( + "github.com/containerd/containerd/plugin" + "github.com/containerd/containerd/runtime" +) + +var tasksServiceRequires = []plugin.Type{ + plugin.RuntimePluginV2, + plugin.MetadataPlugin, + plugin.TaskMonitorPlugin, +} + +// loadV1Runtimes on FreeBSD returns an empty map. There are no v1 runtimes +func loadV1Runtimes(ic *plugin.InitContext) (map[string]runtime.PlatformRuntime, error) { + return make(map[string]runtime.PlatformRuntime), nil +} diff --git a/services/tasks/local_unix.go b/services/tasks/local_unix.go index 3818e9282..2879df0c4 100644 --- a/services/tasks/local_unix.go +++ b/services/tasks/local_unix.go @@ -1,4 +1,4 @@ -// +build !windows +// +build !windows,!freebsd /* Copyright The containerd Authors.