client

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 7 Imported by: 0

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