From 72afaf352b49ac7ebfb9f5a3cbca2740d91f2edf Mon Sep 17 00:00:00 2001 From: Robin Lu Date: Wed, 10 Apr 2024 12:46:42 +0800 Subject: [PATCH] io: adding fake functions for other platforms Signed-off-by: Robin Lu --- .../io/handlers/iocost/iocost_unsupported.go | 34 +++++++++++++++++++ .../handlers/ioweight/ioweight_unsupported.go | 32 +++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 pkg/agent/qrm-plugins/io/handlers/iocost/iocost_unsupported.go create mode 100644 pkg/agent/qrm-plugins/io/handlers/ioweight/ioweight_unsupported.go diff --git a/pkg/agent/qrm-plugins/io/handlers/iocost/iocost_unsupported.go b/pkg/agent/qrm-plugins/io/handlers/iocost/iocost_unsupported.go new file mode 100644 index 000000000..fec5d4772 --- /dev/null +++ b/pkg/agent/qrm-plugins/io/handlers/iocost/iocost_unsupported.go @@ -0,0 +1,34 @@ +//go:build !linux +// +build !linux + +/* +Copyright 2022 The Katalyst 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 iocost + +import ( + coreconfig "github.com/kubewharf/katalyst-core/pkg/config" + dynamicconfig "github.com/kubewharf/katalyst-core/pkg/config/agent/dynamic" + "github.com/kubewharf/katalyst-core/pkg/metaserver" + "github.com/kubewharf/katalyst-core/pkg/metrics" +) + +func SetIOCost(conf *coreconfig.Configuration, + _ interface{}, + _ *dynamicconfig.DynamicAgentConfiguration, + emitter metrics.MetricEmitter, + metaServer *metaserver.MetaServer) { +} diff --git a/pkg/agent/qrm-plugins/io/handlers/ioweight/ioweight_unsupported.go b/pkg/agent/qrm-plugins/io/handlers/ioweight/ioweight_unsupported.go new file mode 100644 index 000000000..3d4d71032 --- /dev/null +++ b/pkg/agent/qrm-plugins/io/handlers/ioweight/ioweight_unsupported.go @@ -0,0 +1,32 @@ +//go:build !linux +// +build !linux + +/* +Copyright 2022 The Katalyst 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 ioweight + +import ( + coreconfig "github.com/kubewharf/katalyst-core/pkg/config" + dynamicconfig "github.com/kubewharf/katalyst-core/pkg/config/agent/dynamic" + "github.com/kubewharf/katalyst-core/pkg/metaserver" + "github.com/kubewharf/katalyst-core/pkg/metrics" +) + +func IOWeightTaskFunc(conf *coreconfig.Configuration, + _ interface{}, _ *dynamicconfig.DynamicAgentConfiguration, + emitter metrics.MetricEmitter, metaServer *metaserver.MetaServer) { +}