cronjob

package
v1.9.0-beta004 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TestResourceURI is test resource uri for cron job call
	TestResourceURI = "tests"
	// TestSuiteResourceURI is test suite resource uri for cron job call
	TestSuiteResourceURI = "test-suites"
)

Variables

This section is empty.

Functions

func GetMetadataName

func GetMetadataName(name, resource string) string

GetMetadataName returns cron job metadata name

func NewCronJobSpec

func NewCronJobSpec(parameters templateParameters) (*batchv1.CronJob, error)

NewCronJobSpec is a method to return cron job spec

Types

type Client

type Client struct {
	client.Client
	// contains filtered or unexported fields
}

Client data struct for managing running cron jobs

func NewClient

func NewClient(cli client.Client, serviceName string, servicePort int, cronJobTemplate string) *Client

NewClient is a method to create new cron job client

func (*Client) Create

func (c *Client) Create(ctx context.Context, id, name, namespace string, options CronJobOptions) error

Create is a method to create a cron job

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, name, namespace string) error

Delete is a method to delete a cron job if it exists

func (*Client) Get

func (c *Client) Get(ctx context.Context, name, namespace string) (*batchv1.CronJob, error)

Get is a method to retrieve an existing cron job

func (*Client) Update

func (c *Client) Update(ctx context.Context, cronJob *batchv1.CronJob, id, name, namespace string, options CronJobOptions) error

Update is a method to update an existing cron job

type CronJobOptions

type CronJobOptions struct {
	Schedule string
	Resource string
	Data     string
	Labels   map[string]string
}

Jump to

Keyboard shortcuts

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