client

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package client talks to Flowbot /gateway/v1 worker APIs.

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
}

Client talks to Flowbot /gateway/v1 APIs.

func New

func New(baseURL, token string) *Client

New builds a Flowbot gateway API client.

func (*Client) Claim

func (c *Client) Claim(ctx context.Context, workerID string) (*types.GatewayJob, error)

Claim requests one pending job.

func (*Client) Complete

func (c *Client) Complete(ctx context.Context, jobID string, req types.GatewayCompleteRequest) error

Complete reports a terminal job result.

func (*Client) GetJob

func (c *Client) GetJob(ctx context.Context, jobID string) (*types.GatewayJob, error)

GetJob loads job status (used to detect cancel).

func (*Client) Heartbeat

func (c *Client) Heartbeat(ctx context.Context, workerID, jobID string) error

Heartbeat renews worker last-seen and optional job lease.

Jump to

Keyboard shortcuts

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