github.com/kubewharf/katalyst-core@v0.5.3/pkg/custom-metric/collector/collect.go (about) 1 /* 2 Copyright 2022 The Katalyst Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 // Package collector is the package that collects metric data 18 // from katalyst agents (current implement is a pulling model), 19 // and it's responsible to push those data to data stores. 20 package collector 21 22 // MetricCollector is a standard metric collector interface 23 type MetricCollector interface { 24 Name() string 25 26 // Start and Stop are both blocked functions 27 Start() error 28 Stop() error 29 } 30 31 type DummyMetricCollector struct{} 32 33 var _ MetricCollector = DummyMetricCollector{} 34 35 func (d DummyMetricCollector) Name() string { return "dummy-collector" } 36 func (d DummyMetricCollector) Start() error { return nil } 37 func (d DummyMetricCollector) Stop() error { return nil }