jobs

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) Index

func (c *Client) Index(ctx context.Context) ([]IndexResponse, error)

Index Index for jobs related endpoints.

func (*Client) ScheduleAnalyze

func (c *Client) ScheduleAnalyze(ctx context.Context, req ScheduleAnalyzeRequest) ([]ScheduleAnalyzeResponse, error)

ScheduleAnalyze Returns a list of future schedule runtimes.

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexResponse

type IndexResponse struct {
	Subdir string `url:"subdir" json:"subdir"` // API sub-directory endpoint

}

type ScheduleAnalyzeRequest

type ScheduleAnalyzeRequest struct {
	Schedule string `url:"schedule" json:"schedule"` // Job schedule. The format is a subset of `systemd` calendar events.

	// The following parameters are optional
	Iterations *int `url:"iterations,omitempty" json:"iterations,omitempty"` // Number of event-iteration to simulate and return.
	Starttime  *int `url:"starttime,omitempty" json:"starttime,omitempty"`   // UNIX timestamp to start the calculation from. Defaults to the current time.
}

type ScheduleAnalyzeResponse

type ScheduleAnalyzeResponse struct {
	Timestamp int    `url:"timestamp" json:"timestamp"` // UNIX timestamp for the run.
	Utc       string `url:"utc" json:"utc"`             // UTC timestamp for the run.

}

Jump to

Keyboard shortcuts

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