client

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package client builds a configured Conductor API client from a resolved base URL and optional bearer token. A single construction point attaches the Authorization header via a request editor when a token is present.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) (*api.ClientWithResponses, error)

New builds a Conductor API client, attaching a bearer token when one is set.

Types

type Config

type Config struct {
	// BaseURL is the full API base, including any reverse-proxy prefix
	// (/conductor, /api/conductor, or none — see the Container topology section
	// of AGENTS.md). It is used verbatim as the client's Server, so the
	// generated /v2/... operation paths land correctly.
	BaseURL string

	// Token, when non-empty, is sent as `Authorization: Bearer <token>` on every
	// request. Empty means no authentication (selfhosted). The value is either an
	// OIDC access token or a dbos_ API key — both are bearer tokens to conductor.
	Token string

	// HTTPClient, when set, replaces the default HTTP client — tests point it at
	// an httptest server; production leaves it nil.
	HTTPClient api.HttpRequestDoer
}

Config configures the Conductor API client.

Jump to

Keyboard shortcuts

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