GoodMem
ReferenceAPIgRPC API

Ping

Ping service API reference

Services

PingService Service

Connectivity testing service for GoodMem inference resources.

Auth: gRPC metadata authorization: Bearer <api-key>. Permissions:

  • PING_EMBEDDER_OWN or PING_EMBEDDER_ANY for embedder targets
  • PING_RERANKER_OWN or PING_RERANKER_ANY for reranker targets
  • PING_LLM_OWN or PING_LLM_ANY for LLM targets

Global Errors: All RPCs may return DEADLINE_EXCEEDED, CANCELLED, UNAVAILABLE, RESOURCE_EXHAUSTED, INTERNAL.

Ping

Summary: Opens a bidirectional ping session. Clients send an initial configuration followed by optional control messages; the server streams probe results and a final summary.

Type
Requeststream goodmem.v1.PingClientMessage
Responsestream goodmem.v1.PingServerMessage

Auth: gRPC metadata authorization: Bearer <api-key>. Permissions Required: PING_* matching the resolved target type (*_OWN for owned targets, *_ANY to access any tenant). Request: The first client message MUST be PingConfig; optional PingControl messages may follow to pause/resume/cancel the session. No other message types are accepted. Response: Stream of PingResult events for each completed probe, optional PingNotice diagnostics, and a terminal PingSummary when the session finishes. Side Effects: Generates real traffic against the target provider (may incur billable calls). Idempotency: Session based; retry by opening a new stream. Error Codes:

  • UNAUTHENTICATED: Missing/invalid API key metadata
  • PERMISSION_DENIED: Caller lacks the required PING_* permission
  • INVALID_ARGUMENT: First message not PingConfig, malformed target ID, conflicting payload
  • FAILED_PRECONDITION: Target exists but is disabled/unavailable Examples: Use a gRPC SDK for interactive streaming; PingOnce below provides a unary reference flow.

PingOnce

Summary: Performs a single probe using the supplied configuration and returns the result.

Type
Requestgoodmem.v1.PingOnceRequest
Responsegoodmem.v1.PingResult

Auth: gRPC metadata authorization: Bearer <api-key>. Permissions Required: Same PING_* requirements as Ping. Request: PingOnceRequest containing the target and optional payload overrides. Response: One PingResult describing the probe outcome. Side Effects: One provider call matching the supplied configuration. Idempotency: Non-idempotent; repeated calls create new probes. Error Codes:

  • UNAUTHENTICATED: Missing/invalid API key metadata
  • PERMISSION_DENIED: Caller lacks the required PING_* permission
  • INVALID_ARGUMENT: Malformed target ID, unsupported payload selection, timeout < 1 ms
  • NOT_FOUND: Target resource not found
  • FAILED_PRECONDITION: Target exists but is disabled or misconfigured
  • INTERNAL: Unexpected provider or server failure Examples:
grpcurl -plaintext \
-H 'authorization: Bearer ${GOODMEM_API_KEY}' \
-d '{
"target_id": "BASE64_UUID_BYTES",
"target_type_hint": "TARGET_TYPE_EMBEDDER"
}' \
localhost:9090 goodmem.v1.PingService/PingOnce

Messages

PingClientMessage

Client-to-server envelope for Ping. The first message MUST be config.

FieldTypeDescription
configgoodmem.v1.PingConfig
controlgoodmem.v1.PingControl

PingServerMessage

Server-to-client envelope for Ping responses.

FieldTypeDescription
resultgoodmem.v1.PingResult
summarygoodmem.v1.PingSummary
noticegoodmem.v1.PingNotice

PingConfig

Configuration for a ping session.

FieldTypeDescription
target_idbytesTarget resource identifier (UUID, 16 bytes).
target_type_hintgoodmem.v1.TargetTypeOptional hint about the expected resource type; used for permission checks.
countuint32Number of probes to run (default 4 when unset). Must be ≥1.
interval_msuint32Delay between probes in milliseconds (default 1000). Must be ≥1.
timeout_msuint32Per-probe timeout in milliseconds (default 5000). Must be ≥1.
payload_typegoodmem.v1.PayloadTypeDesired payload format. A provider-specific default is used when unspecified.
payloadbytesExplicit payload to send with each probe (binary-safe).
payload_size_bytesuint32Generate a synthetic payload with the requested size in bytes.
max_in_flightuint32Maximum concurrent probes (default 1). Values ≥1 enable pipelined probes.
jitterboolWhen true, adds ≤5% random jitter to probe scheduling to avoid alignment effects.
labels...dmem.v1.PingConfig.LabelsEntryArbitrary labels echoed in `PingResult.metadata` and summaries.

PingConfig.LabelsEntry

FieldTypeDescription
keystring
valuestring

PingControl

Control message for an active ping session.

FieldTypeDescription
actiongoodmem.v1.PingControl.ActionOperation to perform.

PingResult

Result from an individual probe.

FieldTypeDescription
endpointgoodmem.v1.EndpointInfoResolved endpoint metadata for the target being probed.
sequint32Sequential probe number (1-based).
bytes_sentuint32Payload bytes transmitted.
bytes_receiveduint32Payload bytes received.
okboolTrue when the provider responded successfully within the timeout.
http_statusuint32Provider HTTP status code or equivalent transport status.
error_messagestringHuman-readable description when `ok` is false.
rtt_msdoubleObserved round-trip latency in milliseconds.
timinggoodmem.v1.PingTimingRaw timing data recorded on the server.
metadata...em.v1.PingResult.MetadataEntryAdditional provider metadata (request IDs, throttling signals, etc.).

PingResult.MetadataEntry

FieldTypeDescription
keystring
valuestring

PingSummary

Summary emitted at the end of a ping session.

FieldTypeDescription
endpointgoodmem.v1.EndpointInfoEndpoint metadata copied from the final probe.
requestsuint32Total number of probes scheduled.
responsesuint32Number of responses received (including timeouts/errors).
okuint32Count of probes that succeeded.
timeoutsuint32Count of probes that exceeded the timeout.
errorsuint32Count of probes that failed for other reasons.
rtt_min_msdoubleMinimum observed round-trip latency (ms).
rtt_avg_msdoubleAverage observed round-trip latency (ms).
rtt_p50_msdoubleMedian (p50) round-trip latency (ms).
rtt_p90_msdouble90th percentile round-trip latency (ms).
rtt_p99_msdouble99th percentile round-trip latency (ms).
rtt_max_msdoubleMaximum observed round-trip latency (ms).
requests_per_seconddoubleEffective request throughput across the session.
bytes_per_seconddoubleAggregate bytes per second (send + receive).
applied_limits...PingSummary.AppliedLimitsEntryResource limits applied by the server (count clamps, payload clamps, etc.).

PingSummary.AppliedLimitsEntry

FieldTypeDescription
keystring
valuestring

PingNotice

Non-fatal notices sent while a ping session is active.

FieldTypeDescription
codestringMachine-readable notice identifier (for example `COUNT_CLAMPED`).
messagestringHuman-readable description of the notice.
details...mem.v1.PingNotice.DetailsEntryAdditional contextual detail (limits applied, provider hints, etc.).

PingNotice.DetailsEntry

FieldTypeDescription
keystring
valuestring

PingTiming

Timing information captured during a probe.

FieldTypeDescription
client_send_time_unix_nanosint64When the client dispatched the probe request (Unix epoch nanoseconds).
server_received_time_unix_nanosint64When the GoodMem server received the probe (Unix epoch nanoseconds).
server_send_time_unix_nanosint64When the GoodMem server sent the probe response (Unix epoch nanoseconds).
client_receive_time_unix_nanosint64When the client consumed the probe response (Unix epoch nanoseconds).

PingOnceRequest

Convenience request for PingService.PingOnce.

FieldTypeDescription
target_idbytesTarget resource identifier (UUID, 16 bytes).
target_type_hintgoodmem.v1.TargetTypeOptional hint about the expected resource type.
payload_typegoodmem.v1.PayloadTypeDesired payload type (defaults to provider-specific value).
payloadbytes
payload_size_bytesuint32
timeout_msuint32Per-probe timeout in milliseconds (default 5000). Must be ≥1.

EndpointInfo

Resolved endpoint metadata returned with each result.

FieldTypeDescription
target_typegoodmem.v1.TargetTypeResolved resource classification.
target_idbytesUUID (bytes) of the resource that was pinged.
resolved_endpointstringFully resolved endpoint that the server contacted.
providerstringProvider name backing the resource (for example `OPENAI`, `VLLM`).
model_identifierstringProvider-specific model identifier used for the probe.

Enums

PingControl.Action

Actions that can be applied to the active session. Currently informational only.

NameValueDescription
ACTION_UNSPECIFIED0
ACTION_PAUSE1
ACTION_RESUME2
ACTION_CANCEL3

TargetType

Supported resource categories for ping operations.

NameValueDescription
TARGET_TYPE_UNSPECIFIED0
TARGET_TYPE_EMBEDDER1
TARGET_TYPE_RERANKER2
TARGET_TYPE_LLM3

PayloadType

Supported payload formats.

NameValueDescription
PAYLOAD_TYPE_UNSPECIFIED0Default behaviour. Emits a target-specific plain-text payload.
PAYLOAD_TYPE_TEXT1Plain UTF-8 text payload (mirrors the default but honours requested sizes).
PAYLOAD_TYPE_JSON2Fixed JSON document payload (`{"ping":true}`).
PAYLOAD_TYPE_BINARY3Binary payloads are currently unsupported and produce `INVALID_ARGUMENT`.