mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-08 16:06:47 +00:00
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com> Test case included for default and non-default Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com> Changed Fake Labeller Implementation Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
19 lines
446 B
Go
19 lines
446 B
Go
package provider
|
|
|
|
import "context"
|
|
|
|
type Labeller interface {
|
|
Labels(ctx context.Context, namespace string) (map[string]string, error)
|
|
}
|
|
|
|
/*
|
|
* FakeLabeller can be used to fake labels applied on namespace to mark them valid/invalid for openfaas functions
|
|
*/
|
|
type FakeLabeller struct {
|
|
FakeLabels map[string]string
|
|
}
|
|
|
|
func (s *FakeLabeller) Labels(ctx context.Context, namespace string) (map[string]string, error) {
|
|
return s.FakeLabels, nil
|
|
}
|