Documentation
¶
Index ¶
- type Option
- func WithClock(clock utilclock.Clock) Option
- func WithLog(log logr.Logger) Option
- func WithMetricsEndpoint(endpoint string) Option
- func WithScaleDownInterval(scaleDownInterval time.Duration) Option
- func WithScaleUpInterval(scaleUpInterval time.Duration) Option
- func WithSpannerClientFactory(f SpannerClientFactory) Option
- func WithSpannerEndpoint(endpoint string) Option
- func WithSyncInterval(interval time.Duration) Option
- func WithSyncers(syncers map[types.NamespacedName]syncerpkg.Syncer) Option
- type SpannerAutoscaleScheduleReconciler
- type SpannerAutoscaleScheduleReconcilerOption
- type SpannerAutoscalerReconciler
- type SpannerAutoscalerReconcilerOption
- type SpannerClientFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
}
Option provides an extensible set of functional options for configuring autoscaler-reconciler as well as schedule-reconciler
func WithMetricsEndpoint ¶ added in v0.7.0
WithMetricsEndpoint overrides the Cloud Monitoring API endpoint (for emulator testing).
func WithScaleDownInterval ¶
Add scale-down-interval option for the autoscaler-reconciler
func WithScaleUpInterval ¶
Add scale-up-interval option for the autoscaler-reconciler
func WithSpannerClientFactory ¶ added in v0.7.0
func WithSpannerClientFactory(f SpannerClientFactory) Option
WithSpannerClientFactory overrides the factory used to create Spanner clients.
func WithSpannerEndpoint ¶ added in v0.7.0
WithSpannerEndpoint overrides the Spanner API endpoint (for emulator testing).
func WithSyncInterval ¶ added in v0.7.0
WithSyncInterval overrides the syncer polling interval (for testing).
func WithSyncers ¶
func WithSyncers(syncers map[types.NamespacedName]syncerpkg.Syncer) Option
Add syncer option for the autoscaler-reconciler
type SpannerAutoscaleScheduleReconciler ¶
type SpannerAutoscaleScheduleReconciler struct {
// contains filtered or unexported fields
}
SpannerAutoscaleScheduleReconciler reconciles a SpannerAutoscaleSchedule object
func NewSpannerAutoscaleScheduleReconciler ¶
func NewSpannerAutoscaleScheduleReconciler( ctrlClient ctrlclient.Client, scheme *runtime.Scheme, recorder record.EventRecorder, opts ...Option, ) *SpannerAutoscaleScheduleReconciler
func (*SpannerAutoscaleScheduleReconciler) Reconcile ¶
func (r *SpannerAutoscaleScheduleReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*SpannerAutoscaleScheduleReconciler) SetupWithManager ¶
func (r *SpannerAutoscaleScheduleReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SpannerAutoscaleScheduleReconcilerOption ¶
type SpannerAutoscaleScheduleReconcilerOption interface {
// contains filtered or unexported methods
}
type SpannerAutoscalerReconciler ¶
type SpannerAutoscalerReconciler struct {
// contains filtered or unexported fields
}
SpannerAutoscalerReconciler reconciles a SpannerAutoscaler object.
func NewSpannerAutoscalerReconciler ¶
func NewSpannerAutoscalerReconciler( ctrlClient ctrlclient.Client, apiReader ctrlclient.Reader, scheme *runtime.Scheme, recorder record.EventRecorder, logger logr.Logger, opts ...Option, ) *SpannerAutoscalerReconciler
NewSpannerAutoscalerReconciler returns a new SpannerAutoscalerReconciler.
func (*SpannerAutoscalerReconciler) Reconcile ¶
func (r *SpannerAutoscalerReconciler) Reconcile(ctx context.Context, req ctrlreconcile.Request) (ctrlreconcile.Result, error)
Reconcile implements ctrlreconcile.Reconciler.
func (*SpannerAutoscalerReconciler) SetupWithManager ¶
func (r *SpannerAutoscalerReconciler) SetupWithManager(mgr ctrlmanager.Manager) error
SetupWithManager sets up the controller with ctrlmanager.Manager.
func (*SpannerAutoscalerReconciler) StopAll ¶ added in v0.7.0
func (r *SpannerAutoscalerReconciler) StopAll()
StopAll stops all active syncers. Useful in tests to ensure syncer goroutines are cleaned up when the manager shuts down.
type SpannerAutoscalerReconcilerOption ¶
type SpannerAutoscalerReconcilerOption interface {
// contains filtered or unexported methods
}
SpannerAutoscalerReconcilerOption is a subset the Option interface, for autoscaler-reconciler
type SpannerClientFactory ¶ added in v0.7.0
type SpannerClientFactory func(ctx context.Context, projectID, instanceID string, opts ...spanner.Option) (spanner.Client, error)
SpannerClientFactory is a constructor function for spanner.Client. The default is spanner.NewClient; tests may substitute a fake.