api

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	*tfeapi.Responder
	Client apiClient
}

func (*API) AddHandlers

func (a *API) AddHandlers(r *mux.Router)

type Client

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

client accesses the service endpoints via RPC.

func (*Client) AwaitAllocatedJobs

func (c *Client) AwaitAllocatedJobs(ctx context.Context, agentID resource.TfeID) ([]*runner.Job, error)

func (*Client) AwaitJobSignal

func (c *Client) AwaitJobSignal(ctx context.Context, jobID resource.TfeID) func() (runner.JobSignal, error)

func (*Client) CreateAgentToken

func (c *Client) CreateAgentToken(ctx context.Context, poolID resource.TfeID, opts runner.CreateAgentTokenOptions) (*runner.AgentToken, []byte, error)

func (*Client) FinishJob

func (c *Client) FinishJob(ctx context.Context, jobID resource.TfeID, opts runner.FinishJobOptions) error

func (*Client) GenerateDynamicCredentialsToken

func (c *Client) GenerateDynamicCredentialsToken(ctx context.Context, jobID resource.TfeID, audience string) ([]byte, error)

func (*Client) GetJob

func (c *Client) GetJob(ctx context.Context, jobID resource.TfeID) (*runner.Job, error)

func (*Client) Register

func (*Client) StartJob

func (c *Client) StartJob(ctx context.Context, jobID resource.TfeID) ([]byte, error)

func (*Client) UpdateStatus

func (c *Client) UpdateStatus(ctx context.Context, agentID resource.TfeID, status runner.RunnerStatus) error

type RunnerClient

type RunnerClient = Client

Alias client to permit embedding it with other clients in a struct without a name clash.

type TFEAPI

type TFEAPI struct {
	*tfeapi.Responder
	Client tfeClient
}

func (*TFEAPI) AddHandlers

func (a *TFEAPI) AddHandlers(r *mux.Router)

Jump to

Keyboard shortcuts

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