Skip to main content

Module ext

Module ext 

Source
Expand description

Extensions: the names, the NATS subjects and the messages of an ext_call, shared by the platform, the worker, the extension runner, the native services and the guest SDK.

Structs§

CallContext
Who calls, and until when the caller waits.
CallerService
ExtFailure
Why an extension refused or failed a call, in its own words.
Ready
What a native service answers once it serves its extensions.

Enums§

ExtReply
A provider’s answer: {"ok": <value>} or {"error": {"code": …, "message": …}}.

Constants§

ANY_CALLER
A caller that stands for every service of the tenant.
NAME_MAX
The longest extension name, in bytes.
PROTOCOL_VERSION
The version of ExtRequest and Ready this crate speaks.
QUEUE_GROUP
The queue group every provider of an extension subscribes in, so each call reaches one of them.
RESERVED_CODES
The codes a runner or a provider answers for the transport rather than for the extension: each is the label of the kind the caller sees.
SOCKET_VAR
The variable naming the Unix socket a native service serves on.
SUBJECT_PREFIX
The subject every call subject starts with.
TOKEN_VAR
The variable holding the token the extension runner sends a native service as Authorization: Bearer <token> with every request; each start of a child has its own.

Functions§

call_subject
The subject the calls of the tenant tenant to the extension name travel on.
callers
The callers of an extension as they are stored: each a service name or ANY_CALLER, at least one, each once, sorted.
deploy_subject
The subject a deploy or rollback of the tenant’s native service service is announced on, for the extension runner.
is_valid_extension_name
Whether name is an extension name: 1 to NAME_MAX bytes of dot-separated segments of [a-z0-9-]+ (google.token, pdf.render-v2).
name_violation
Why name is not an extension name; None when it is one.
undeploy_subject
The subject the removal of the tenant’s native service service is announced on.