Package scheduler is an auto-generated package for the Cloud Scheduler API.

    NOTE: This package is in alpha. It is not stable, and is likely to change.

    Creates and manages jobs run on a regular recurring schedule.




    This section is empty.


    This section is empty.


    func DefaultAuthScopes

    func DefaultAuthScopes() []string

      DefaultAuthScopes reports the default set of authentication scopes to use with this package.


      type CloudSchedulerCallOptions

      type CloudSchedulerCallOptions struct {
      	ListJobs  []gax.CallOption
      	GetJob    []gax.CallOption
      	CreateJob []gax.CallOption
      	UpdateJob []gax.CallOption
      	DeleteJob []gax.CallOption
      	PauseJob  []gax.CallOption
      	ResumeJob []gax.CallOption
      	RunJob    []gax.CallOption

        CloudSchedulerCallOptions contains the retry settings for each method of CloudSchedulerClient.

        type CloudSchedulerClient

        type CloudSchedulerClient struct {
        	// The call options for this service.
        	CallOptions *CloudSchedulerCallOptions
        	// contains filtered or unexported fields

          CloudSchedulerClient is a client for interacting with Cloud Scheduler API.

          Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

          func NewCloudSchedulerClient

          func NewCloudSchedulerClient(ctx context.Context, opts ...option.ClientOption) (*CloudSchedulerClient, error)

            NewCloudSchedulerClient creates a new cloud scheduler client.

            The Cloud Scheduler API allows external entities to reliably schedule asynchronous jobs.


            func (*CloudSchedulerClient) Close

            func (c *CloudSchedulerClient) Close() error

              Close closes the connection to the API service. The user should invoke this when the client is no longer required.

              func (*CloudSchedulerClient) Connection

              func (c *CloudSchedulerClient) Connection() *grpc.ClientConn

                Connection returns the client's connection to the API service.

                func (*CloudSchedulerClient) CreateJob

                  CreateJob creates a job.


                  func (*CloudSchedulerClient) DeleteJob

                    DeleteJob deletes a job.


                    func (*CloudSchedulerClient) GetJob

                      GetJob gets a job.


                      func (*CloudSchedulerClient) ListJobs

                        ListJobs lists jobs.


                        func (*CloudSchedulerClient) PauseJob

                          PauseJob pauses a job.

                          If a job is paused then the system will stop executing the job until it is re-enabled via [ResumeJob][]. The state of the job is stored in [state][]; if paused it will be set to [Job.State.PAUSED][]. A job must be in [Job.State.ENABLED][] to be paused.


                          func (*CloudSchedulerClient) ResumeJob

                            ResumeJob resume a job.

                            This method reenables a job after it has been [Job.State.PAUSED][]. The state of a job is stored in [Job.state][]; after calling this method it will be set to [Job.State.ENABLED][]. A job must be in [Job.State.PAUSED][] to be resumed.


                            func (*CloudSchedulerClient) RunJob

                              RunJob forces a job to run now.

                              When this method is called, Cloud Scheduler will dispatch the job, even if the job is already running.


                              func (*CloudSchedulerClient) UpdateJob

                                UpdateJob updates a job.

                                If successful, the updated [Job][] is returned. If the job does not exist, NOT_FOUND is returned.

                                If UpdateJob does not successfully return, it is possible for the job to be in an [Job.State.UPDATE_FAILED][] state. A job in this state may not be executed. If this happens, retry the UpdateJob request until a successful response is received.


                                type JobIterator

                                type JobIterator struct {
                                	// InternalFetch is for use by the Google Cloud Libraries only.
                                	// It is not part of the stable interface of this package.
                                	// InternalFetch returns results from a single call to the underlying RPC.
                                	// The number of results is no greater than pageSize.
                                	// If there are no more results, nextPageToken is empty and err is nil.
                                	InternalFetch func(pageSize int, pageToken string) (results []*schedulerpb.Job, nextPageToken string, err error)
                                	// contains filtered or unexported fields

                                  JobIterator manages a stream of *schedulerpb.Job.

                                  func (*JobIterator) Next

                                  func (it *JobIterator) Next() (*schedulerpb.Job, error)

                                    Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

                                    func (*JobIterator) PageInfo

                                    func (it *JobIterator) PageInfo() *iterator.PageInfo

                                      PageInfo supports pagination. See the package for details.