2017-09-06 02:48:10 +00:00
|
|
|
/*
|
|
|
|
Copyright 2017 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 panic_fake
|
|
|
|
|
2018-06-21 16:02:30 +00:00
|
|
|
import "github.com/kubernetes-incubator/node-feature-discovery/source"
|
|
|
|
|
2017-09-06 02:48:10 +00:00
|
|
|
// Source implements FeatureSource.
|
|
|
|
type Source struct{}
|
|
|
|
|
2018-03-05 15:51:47 +00:00
|
|
|
// Name returns an identifier string for this feature source.
|
2017-09-06 02:48:10 +00:00
|
|
|
func (s Source) Name() string { return "panic_fake" }
|
|
|
|
|
2018-03-05 15:51:47 +00:00
|
|
|
// Discover calls panic().
|
2018-06-21 16:02:30 +00:00
|
|
|
func (s Source) Discover() (source.Features, error) {
|
2018-03-01 18:49:57 +00:00
|
|
|
panic("fake panic error")
|
2017-09-06 02:48:10 +00:00
|
|
|
}
|