Documentation ¶
Overview ¶
Package config is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NotFoundError = errors.New("not found config")
Functions ¶
This section is empty.
Types ¶
type Configer ¶
type Configer interface { Start(<-chan struct{}) Get(key string, result interface{}) error GetString(key string) (string, error) GetData() (map[string]string, error) }
Configer loads config somewhere.
type KubeConfiger ¶
type KubeConfiger struct {
// contains filtered or unexported fields
}
KubeConfiger parse configs in 1 ConfigMap
func (*KubeConfiger) Get ¶
func (c *KubeConfiger) Get(key string, result interface{}) error
Get gets a config in ConfigMap.
func (*KubeConfiger) GetData ¶
func (c *KubeConfiger) GetData() (map[string]string, error)
GetData return all datas
func (*KubeConfiger) GetString ¶
func (c *KubeConfiger) GetString(key string) (string, error)
GetVal get string value from configmap
func (*KubeConfiger) Start ¶
func (c *KubeConfiger) Start(<-chan struct{})
Start starts the configer
type KubeConfigerFactory ¶
type KubeConfigerFactory struct {
// contains filtered or unexported fields
}
KubeConfigerFactory creates KubeConfiger
func NewKubeConfigerFactory ¶
func NewKubeConfigerFactory(client kubeclientset.Interface, namespace string, selectorKv map[string]string) *KubeConfigerFactory
NewKubeConfigerFactory creates a kubenetes configer factory.
func NewKubeConfigerFactoryFromLister ¶
func NewKubeConfigerFactoryFromLister(lister listerv1.ConfigMapLister, namespace string) *KubeConfigerFactory
NewKubeConfigerFactory creates a kubenetes configer factory from configmap lister.
func (*KubeConfigerFactory) Configer ¶
func (f *KubeConfigerFactory) Configer(name string) Configer
Configer gets a kube configer.
func (*KubeConfigerFactory) Start ¶
func (f *KubeConfigerFactory) Start(stopCh <-chan struct{})
Start starts the configer factory.
type MockConfiger ¶
type MockConfiger struct {
// contains filtered or unexported fields
}
MockConfiger is a mock of Configer interface.
func NewMockConfiger ¶
func NewMockConfiger(ctrl *gomock.Controller) *MockConfiger
NewMockConfiger creates a new mock instance.
func (*MockConfiger) EXPECT ¶
func (m *MockConfiger) EXPECT() *MockConfigerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockConfiger) Get ¶
func (m *MockConfiger) Get(key string, result interface{}) error
Get mocks base method.
func (*MockConfiger) GetData ¶
func (m *MockConfiger) GetData() (map[string]string, error)
GetData mocks base method.
func (*MockConfiger) GetString ¶
func (m *MockConfiger) GetString(key string) (string, error)
GetString mocks base method.
func (*MockConfiger) Start ¶
func (m *MockConfiger) Start(arg0 <-chan struct{})
Start mocks base method.
type MockConfigerMockRecorder ¶
type MockConfigerMockRecorder struct {
// contains filtered or unexported fields
}
MockConfigerMockRecorder is the mock recorder for MockConfiger.
func (*MockConfigerMockRecorder) Get ¶
func (mr *MockConfigerMockRecorder) Get(key, result interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockConfigerMockRecorder) GetData ¶
func (mr *MockConfigerMockRecorder) GetData() *gomock.Call
GetData indicates an expected call of GetData.
func (*MockConfigerMockRecorder) GetString ¶
func (mr *MockConfigerMockRecorder) GetString(key interface{}) *gomock.Call
GetString indicates an expected call of GetString.
func (*MockConfigerMockRecorder) Start ¶
func (mr *MockConfigerMockRecorder) Start(arg0 interface{}) *gomock.Call
Start indicates an expected call of Start.