Documentation ¶
Index ¶
- func DefaultDate() time.Time
- func GetExampleCACert(id int) []byte
- func GetRunnables[T manager.Runnable](f *FakeManager) []T
- func IsEqualCert(cert1 *x509.CertPool, cert2 []byte) bool
- func NewTime(h, m, s int) time.Time
- func NewTimeNowStub(h, m, s int) func() time.Time
- type FakeManager
- func (f *FakeManager) Add(r manager.Runnable) error
- func (f *FakeManager) AddHealthzCheck(_ string, _ healthz.Checker) error
- func (f *FakeManager) AddMetricsExtraHandler(_ string, _ http.Handler) error
- func (f *FakeManager) AddReadyzCheck(_ string, _ healthz.Checker) error
- func (f *FakeManager) Elected() <-chan struct{}
- func (f *FakeManager) GetAPIReader() client.Reader
- func (f *FakeManager) GetCache() cache.Cache
- func (f *FakeManager) GetClient() client.Client
- func (f *FakeManager) GetConfig() *rest.Config
- func (f *FakeManager) GetControllerOptions() v1alpha1.ControllerConfigurationSpec
- func (f *FakeManager) GetEventRecorderFor(_ string) record.EventRecorder
- func (f *FakeManager) GetFieldIndexer() client.FieldIndexer
- func (f *FakeManager) GetLogger() logr.Logger
- func (f *FakeManager) GetRESTMapper() meta.RESTMapper
- func (f *FakeManager) GetScheme() *runtime.Scheme
- func (f *FakeManager) GetWebhookServer() *webhook.Server
- func (f *FakeManager) SetFields(_ interface{}) error
- func (f *FakeManager) Start(_ context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDate ¶
DefaultDate returns the default date used by other functions in this package
func GetExampleCACert ¶
GetExampleCACert returns one of several available sample CA certificates
func GetRunnables ¶
func GetRunnables[T manager.Runnable](f *FakeManager) []T
GetRunnables returns the subset of FakeManagers' runnables, which are assertable to the specified type
func IsEqualCert ¶
IsEqualCert compares two certs, one represented as pool, the other - as a byte array
func NewTimeNowStub ¶
NewTimeNowStub creates test stub for the time.Now functions, using the specified values, and DefaultDate
Types ¶
type FakeManager ¶
type FakeManager struct { Scheme *runtime.Scheme Client client.Client // contains filtered or unexported fields }
func NewFakeManager ¶
func NewFakeManager() *FakeManager
func (*FakeManager) AddHealthzCheck ¶
func (f *FakeManager) AddHealthzCheck(_ string, _ healthz.Checker) error
func (*FakeManager) AddMetricsExtraHandler ¶
func (f *FakeManager) AddMetricsExtraHandler(_ string, _ http.Handler) error
func (*FakeManager) AddReadyzCheck ¶
func (f *FakeManager) AddReadyzCheck(_ string, _ healthz.Checker) error
func (*FakeManager) Elected ¶
func (f *FakeManager) Elected() <-chan struct{}
func (*FakeManager) GetAPIReader ¶
func (f *FakeManager) GetAPIReader() client.Reader
func (*FakeManager) GetCache ¶
func (f *FakeManager) GetCache() cache.Cache
func (*FakeManager) GetClient ¶
func (f *FakeManager) GetClient() client.Client
func (*FakeManager) GetConfig ¶
func (f *FakeManager) GetConfig() *rest.Config
func (*FakeManager) GetControllerOptions ¶
func (f *FakeManager) GetControllerOptions() v1alpha1.ControllerConfigurationSpec
func (*FakeManager) GetEventRecorderFor ¶
func (f *FakeManager) GetEventRecorderFor(_ string) record.EventRecorder
func (*FakeManager) GetFieldIndexer ¶
func (f *FakeManager) GetFieldIndexer() client.FieldIndexer
func (*FakeManager) GetLogger ¶
func (f *FakeManager) GetLogger() logr.Logger
func (*FakeManager) GetRESTMapper ¶
func (f *FakeManager) GetRESTMapper() meta.RESTMapper
func (*FakeManager) GetScheme ¶
func (f *FakeManager) GetScheme() *runtime.Scheme
func (*FakeManager) GetWebhookServer ¶
func (f *FakeManager) GetWebhookServer() *webhook.Server
func (*FakeManager) SetFields ¶
func (f *FakeManager) SetFields(_ interface{}) error
Click to show internal directories.
Click to hide internal directories.