2017-09-06 10:48:10 +08: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 fake
|
|
|
|
|
|
|
|
// Source implements FeatureSource.
|
|
|
|
type Source struct{}
|
|
|
|
|
2018-03-05 17:51:47 +02:00
|
|
|
// Name returns an identifier string for this feature source.
|
2017-09-06 10:48:10 +08:00
|
|
|
func (s Source) Name() string { return "fake" }
|
|
|
|
|
2018-03-05 17:51:47 +02:00
|
|
|
// Discover returns feature names for some fake features.
|
2017-09-06 10:48:10 +08:00
|
|
|
func (s Source) Discover() ([]string, error) {
|
|
|
|
features := []string{}
|
|
|
|
|
|
|
|
// Adding three fake features.
|
|
|
|
features = append(features, "fakefeature1", "fakefeature2", "fakefeature3")
|
|
|
|
|
|
|
|
return features, nil
|
2018-03-05 17:51:47 +02:00
|
|
|
}
|