gardener

package
v0.0.0-...-f5bf215 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobClient

type JobClient struct {
	// Client is used for all HTTP requests to the Gardener API. A
	// NewJobClient uses http.DefaultClient but may be overridden.
	Client *http.Client
	// contains filtered or unexported fields
}

JobClient manages requests to the Gardener Jobs API.

func NewJobClient

func NewJobClient(api url.URL) *JobClient

NewJobClient creates a new JobClient that targets the given base API URL.

func (*JobClient) Error

func (c *JobClient) Error(ctx context.Context, id tracker.Key, errString string) error

Error reports an error message for the given job ID.

func (*JobClient) Heartbeat

func (c *JobClient) Heartbeat(ctx context.Context, id tracker.Key) error

Heartbeat sends a heartbeat message for the given job ID, notifying Gardener that the job is still in progress.

func (*JobClient) Next

Next requests a new parse job from the Gardener Jobs API.

func (*JobClient) Update

func (c *JobClient) Update(ctx context.Context, id tracker.Key, state tracker.State, detail string) error

Update sets a new state with given detail for the given job ID.

Jump to

Keyboard shortcuts

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