Documentation
¶
Index ¶
- func NewHandler(c *scheduler.CloudSchedulerClient, p, l, n, app string) *handler
- type JobOption
- type JobRequest
- func (h JobRequest) CreateJobRequest(ctx context.Context, spec string, tz string, description string, ...) *JobRequest
- func (r *JobRequest) Do(ctx context.Context) (*schedulerpb.Job, error)
- func (h JobRequest) GetJob(ctx context.Context) (*schedulerpb.Job, bool)
- func (r *JobRequest) NewAppEngineHttpTarget(method string, service string, version string, instance string, host string, ...) *JobRequest
- func (r *JobRequest) NewHttpTarget(uri string, method string, headers map[string]string, body string) *JobRequest
- func (r *JobRequest) NewPubSubTarget(topic string, data string, attrs map[string]string) *JobRequest
- func (h JobRequest) UpdateJobRequest(ctx context.Context, spec string, tz string, description string, ...) *JobRequest
- type JobRetryConfig
- type SchedulerReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(c *scheduler.CloudSchedulerClient, p, l, n, app string) *handler
Types ¶
type JobOption ¶
type JobOption func(*JobRequest)
func WithRetryConfig ¶
func WithRetryConfig(conf *JobRetryConfig) JobOption
type JobRequest ¶
type JobRequest struct {
Name string
Schedule string
TimeZone string
Description string
RetryConfig *JobRetryConfig
CreateJobRequest *schedulerpb.CreateJobRequest
UpdateJobRequest *schedulerpb.UpdateJobRequest
// contains filtered or unexported fields
}
func (JobRequest) CreateJobRequest ¶
func (*JobRequest) Do ¶
func (r *JobRequest) Do(ctx context.Context) (*schedulerpb.Job, error)
func (*JobRequest) NewAppEngineHttpTarget ¶
func (*JobRequest) NewHttpTarget ¶
func (r *JobRequest) NewHttpTarget(uri string, method string, headers map[string]string, body string) *JobRequest
func (*JobRequest) NewPubSubTarget ¶
func (r *JobRequest) NewPubSubTarget(topic string, data string, attrs map[string]string) *JobRequest
func (JobRequest) UpdateJobRequest ¶
type JobRetryConfig ¶
type JobRetryConfig struct {
// Maximum number of retry attempts for a failed job
MaxRetryAttempts int
// Time limit for retrying a failed job, 0s means unlimited
MaxRetryDuration string
// Minimum time to wait before retrying a job after it fails
MinBackoffDuration string
// Maximum time to wait before retrying a job after it fails
MaxBackoffDuration string
// The time between retries will double max doublings times
MaxDoublings int
}
If a job does not complete successfully, it is retried, with exponential backoff, according to the settings in retry config. Learn more https://cloud.google.com/scheduler/docs/reference/rpc/google.cloud.scheduler.v1?authuser=1&_ga=2.60975276.-1449617874.1626837834#retryconfig
type SchedulerReconciler ¶
type SchedulerReconciler struct {
client.Client
Log zerolog.Logger
Scheme *runtime.Scheme
Recorder record.EventRecorder
CloudScheduler *scheduler.CloudSchedulerClient
}
SchedulerReconciler reconciles a Scheduler object
func (*SchedulerReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Scheduler object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*SchedulerReconciler) SetupWithManager ¶
func (r *SchedulerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.