scheduler

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidArgument failure.StringCode = "InvalidArgument"

Functions

func CreateJobName

func CreateJobName(projectID string, location string, name string) string

Types

type Client

type Client struct {
	C *cs.CloudSchedulerClient
}

func NewClient

func NewClient(ctx context.Context, projectID string) (*Client, error)

func (*Client) Create

func (c *Client) Create(ctx context.Context, req *scheduler.CreateJobRequest) (*scheduler.Job, error)

func (*Client) Update

func (c *Client) Update(ctx context.Context, req *scheduler.UpdateJobRequest) (*scheduler.Job, error)

func (*Client) Upsert

func (c *Client) Upsert(ctx context.Context, req *UpsertJobRequest) (*scheduler.Job, error)

type JobHttpTarget

type JobHttpTarget struct {
	Uri                string
	HttpMethod         scheduler.HttpMethod
	Headers            map[string]string
	Body               []byte
	OidcServiceAccount string
}

func (*JobHttpTarget) JobHttpTarget

func (t *JobHttpTarget) JobHttpTarget() *scheduler.Job_HttpTarget

type UpsertJobRequest

type UpsertJobRequest struct {
	ProjectID   string
	Location    string
	Name        string
	Description string
	Schedule    string
	TimeZone    string
	Target      *JobHttpTarget
}

func (*UpsertJobRequest) CreateJobRequest

func (req *UpsertJobRequest) CreateJobRequest() (*scheduler.CreateJobRequest, error)

func (*UpsertJobRequest) UpdateJobRequest

func (req *UpsertJobRequest) UpdateJobRequest() (*scheduler.UpdateJobRequest, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL