Documentation ¶
Index ¶
- func GetMetadataName(name, resource string) string
- func NewApplySpec(log *zap.SugaredLogger, parameters templateParameters) (*batchv1.CronJobApplyConfiguration, error)
- type Client
- func (c *Client) Apply(id, name string, options CronJobOptions) error
- func (c *Client) Delete(name string) error
- func (c *Client) DeleteAll(resource, selector string) error
- func (c *Client) Get(name string) (*v1.CronJob, error)
- func (c *Client) UpdateLabels(cronJobSpec *v1.CronJob, oldLabels, newLabels map[string]string) error
- type CronJobOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMetadataName ¶
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
Click to show internal directories.
Click to hide internal directories.