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
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
}
Click to show internal directories.
Click to hide internal directories.