Documentation
¶
Index ¶
- func IdempotencyHeaders(value string) http.Header
- func JSONBody(value any) io.Reader
- func RequestJSON[T any](ctx context.Context, client *secondboxclient.Client, operationID string, ...) (T, error)
- func RestartService(ctx context.Context, start func(context.Context) error, ...) error
- func RevisionETag(revision int64) string
- func WaitSandbox(ctx context.Context, handle *secondboxclient.SandboxHandle, ...) (secondboxclient.Sandbox, error)
- type Clients
- type TimeoutDiagnosticsTransport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IdempotencyHeaders ¶
func RequestJSON ¶
func RequestJSON[T any]( ctx context.Context, client *secondboxclient.Client, operationID string, options secondboxclient.CallOptions, ) (T, error)
func RestartService ¶ added in v0.11.0
func RestartService(ctx context.Context, start func(context.Context) error, running func(context.Context) (bool, error)) error
RestartService bounds both start attempts and state inspection by ctx. Each attempt gets half the remaining budget, leaving time for one retry even when the first start command hangs. Callers retain command output for diagnostics.
func RevisionETag ¶
func WaitSandbox ¶
func WaitSandbox( ctx context.Context, handle *secondboxclient.SandboxHandle, states []secondboxclient.SandboxState, maximumWaitRequest time.Duration, ) (secondboxclient.Sandbox, error)
Types ¶
type Clients ¶
type Clients struct {
Admin *secondboxclient.Client
Subject *secondboxclient.Client
HTTPClient *http.Client
}
type TimeoutDiagnosticsTransport ¶ added in v0.12.0
type TimeoutDiagnosticsTransport struct {
Base http.RoundTripper
Capture func()
// contains filtered or unexported fields
}
TimeoutDiagnosticsTransport captures stack state at the first HTTP timeout, before fixture cleanup or subsequent polling can obscure the original failure. It preserves the response and error, including the client's timeout semantics.
Click to show internal directories.
Click to hide internal directories.