cronjob

package
v1.0.15-test01 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMetadataName

func GetMetadataName(name, resource string) string

GetMetadataName returns cron job metadata name

func NewApplySpec

func NewApplySpec(log *zap.SugaredLogger, parameters templateParameters) (*batchv1.CronJobApplyConfiguration, error)

NewApplySpec is a method to return cron job apply spec

Types

type Client

type Client struct {
	ClientSet *kubernetes.Clientset
	Log       *zap.SugaredLogger

	Namespace string
	// contains filtered or unexported fields
}

Client data struct for managing running cron jobs

func NewClient

func NewClient(serviceName string, servicePort int, cronJobTemplate string, namespace string) (*Client, error)

NewClient is a method to create new cron job client

func (*Client) Apply

func (c *Client) Apply(id, name string, options CronJobOptions) error

Apply is a method to create or update a cron job

func (*Client) Delete

func (c *Client) Delete(name string) error

Delete is a method to delete an existing secret

func (*Client) DeleteAll

func (c *Client) DeleteAll(resource string) error

DeleteAll is a method to delete all existing secrets

func (*Client) Get

func (c *Client) Get(name string) (*v1.CronJob, error)

Get is a method to retrieve an existing cron job

type CronJobOptions

type CronJobOptions struct {
	Schedule string
	Resource string
	Data     string
}

Jump to

Keyboard shortcuts

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