api

package
v1.135.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package api re-exports the HTTP middleware stack from api/internal/httpx so callers outside the api/ subtree (notably pkg/cmd/factory) can wrap their http.Client transports without needing access to the internal package.

Index

Constants

This section is empty.

Variables

View Source
var DefaultRetryPolicy = httpx.DefaultRetryPolicy

DefaultRetryPolicy is 3 attempts, 200 ms → 2 s, with jitter.

Functions

func WithRetry added in v1.34.0

func WithRetry(ctx context.Context, policy RetryPolicy) context.Context

WithRetry returns a new context carrying policy. Attach it to a request to enable retries through a transport produced by WrapTransport.

func WrapTransport added in v1.34.0

func WrapTransport(inner http.RoundTripper) http.RoundTripper

WrapTransport wraps inner with the httpx middleware stack (retry → ETag cache → rate limit). See api/internal/httpx for details.

Types

type RetryPolicy added in v1.34.0

type RetryPolicy = httpx.RetryPolicy

RetryPolicy is re-exported from api/internal/httpx so callers under pkg/cmd (which cannot import internal packages) can opt in to retry behaviour on a per-request basis via WithRetry.

Directories

Path Synopsis
Package cloud does not implement AdminClient.
Package cloud does not implement AdminClient.
gen
Package gen provides primitives to interact with the openapi HTTP API.
Package gen provides primitives to interact with the openapi HTTP API.
internal
httpx
Package httpx is the shared HTTP transport used by the Bitbucket Server/DC and Cloud API adapters.
Package httpx is the shared HTTP transport used by the Bitbucket Server/DC and Cloud API adapters.
paging
Package paging bounds typed pagination above httpx.Transport.GetAllJSON.
Package paging bounds typed pagination above httpx.Transport.GetAllJSON.
Package server is the Bitbucket Data Center (a.k.a.
Package server is the Bitbucket Data Center (a.k.a.
gen
Package gen provides primitives to interact with the openapi HTTP API.
Package gen provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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