Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CNRFetcher ¶
type CNRFetcher interface { // GetCNR returns those latest custom node resources metadata. GetCNR(ctx context.Context) (*nodev1alpha1.CustomNodeResource, error) // RegisterNotifier registers a notifier to be notified when CNR is updated. RegisterNotifier(name string, notifier CNRNotifier) error // UnregisterNotifier unregisters a notifier. UnregisterNotifier(name string) error }
CNRFetcher is used to get CNR information.
func NewCachedCNRFetcher ¶ added in v0.2.0
func NewCachedCNRFetcher(nodeName string, ttl time.Duration, client v1alpha1.CustomNodeResourceInterface) CNRFetcher
type CNRFetcherStub ¶ added in v0.2.0
type CNRFetcherStub struct {
CNR *v1alpha1.CustomNodeResource
}
func (*CNRFetcherStub) GetCNR ¶ added in v0.2.0
func (c *CNRFetcherStub) GetCNR(context.Context) (*v1alpha1.CustomNodeResource, error)
func (*CNRFetcherStub) RegisterNotifier ¶ added in v0.2.0
func (c *CNRFetcherStub) RegisterNotifier(_ string, _ CNRNotifier) error
func (*CNRFetcherStub) UnregisterNotifier ¶ added in v0.2.0
func (c *CNRFetcherStub) UnregisterNotifier(_ string) error
type CNRNotifier ¶ added in v0.2.0
type CNRNotifier interface { // OnCNRUpdate is called when CNR is updated. OnCNRUpdate(cnr *nodev1alpha1.CustomNodeResource) // OnCNRStatusUpdate is called when CNR status is updated. OnCNRStatusUpdate(cnr *nodev1alpha1.CustomNodeResource) }
CNRNotifier is used to notify CNR update.
type CNRNotifierStub ¶ added in v0.2.0
type CNRNotifierStub struct{}
CNRNotifierStub is a stub implementation of CNRNotifier.
func (CNRNotifierStub) OnCNRStatusUpdate ¶ added in v0.2.0
func (C CNRNotifierStub) OnCNRStatusUpdate(cnr *v1alpha1.CustomNodeResource)
OnCNRStatusUpdate is called when CNR status is updated.
func (CNRNotifierStub) OnCNRUpdate ¶ added in v0.2.0
func (C CNRNotifierStub) OnCNRUpdate(cnr *v1alpha1.CustomNodeResource)
OnCNRUpdate is called when CNR is updated.
Click to show internal directories.
Click to hide internal directories.