Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FactoryFunc ¶
func FactoryFunc(sp *SimpleProvider) provider.FactoryFunc
FactoryFunc is used to register the factory in a given test so we can use it to test provider calls.
Types ¶
type SimpleProvider ¶
type SimpleProvider struct { CreateFunc func(v1alpha1.MonitorTemplateSpec) (string, error) CreateCount int DeleteFunc func(string) error DeleteCount int UpdateFunc func(string, v1alpha1.MonitorTemplateSpec) (string, error) UpdateCount int }
SimpleProvider represents a provider which is useful for testing purposes.
func (*SimpleProvider) Create ¶
func (fp *SimpleProvider) Create(im v1alpha1.MonitorTemplateSpec) (string, error)
Create calls the specified CreateFunc in the SimpleProvider.
func (*SimpleProvider) Delete ¶
func (fp *SimpleProvider) Delete(id string) error
Delete calls the specified DeleteFunc in the SimpleProvider.
func (*SimpleProvider) Update ¶
func (fp *SimpleProvider) Update(id string, im v1alpha1.MonitorTemplateSpec) (string, error)
Update calls the specified UpdateFunc in the SimpleProvider.
Click to show internal directories.
Click to hide internal directories.