Refactor controller metrics interface
This commit is contained in:
parent
bdd2c5e3be
commit
1542a12764
30 changed files with 1896 additions and 630 deletions
43
internal/ingress/metric/dummy.go
Normal file
43
internal/ingress/metric/dummy.go
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
Copyright 2018 The Kubernetes 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 metric
|
||||
|
||||
import "k8s.io/ingress-nginx/internal/ingress"
|
||||
|
||||
// DummyCollector dummy implementation for mocks in tests
|
||||
type DummyCollector struct{}
|
||||
|
||||
// ConfigSuccess ...
|
||||
func (dc DummyCollector) ConfigSuccess(uint64, bool) {}
|
||||
|
||||
// IncReloadCount ...
|
||||
func (dc DummyCollector) IncReloadCount() {}
|
||||
|
||||
// IncReloadErrorCount ...
|
||||
func (dc DummyCollector) IncReloadErrorCount() {}
|
||||
|
||||
// RemoveMetrics ...
|
||||
func (dc DummyCollector) RemoveMetrics(ingresses, endpoints []string) {}
|
||||
|
||||
// Start ...
|
||||
func (dc DummyCollector) Start() {}
|
||||
|
||||
// Stop ...
|
||||
func (dc DummyCollector) Stop() {}
|
||||
|
||||
// SetSSLExpireTime ...
|
||||
func (dc DummyCollector) SetSSLExpireTime([]*ingress.Server) {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue