Skip to main content

Module api

Module api 

Source

Modules§

append_only_config
append_result
client_message
client_message_error
compute_node_append_response
full_result
grouped_compute_node_append_response
grouped_compute_node_append_responses
health_message
invalid_computation_type
is_enabled_response
milliseconds
ping
polling_only_computation_type
pong
result_configuration
server_message
shutdown_notice
streaming_compute_node_request
streaming_compute_node_subscription
subscription_creation
subscription_creation_error
subscription_creation_message
subscription_creation_success
subscription_id
subscription_options
subscription_update
subscription_update_error
subscription_update_message
unavailable_result_configuration_reason

Structs§

AppendOnlyConfig
Defines the append results from the websocket.
AppendResult
An append result won’t cover the full StreamingComputeNodeRequest#windowWidth but rather just a smaller window. The end of the window that the append covers is guaranteed to be later than previously sent results. The start, however, can and most likely will overlap with previous results. That allows us to support out-of-order points. The client will have to merge this new AppendResult with previous results. Example of time windows that might be covered by results for a subscription: We send a full result for window [0s, 120s] followed by an append result for [116s, 121s] and another append result for [117s, 122s].
ClientMessageError
This will be sent if there is an error processing a ClientMessage. Note: This won’t automatically close the connection. The client can continue sending ClientMessages after receiving this error.
FullResult
GroupedComputeNodeAppendResponse
GroupedComputeNodeAppendResponses
Contains a GroupedComputeNodeAppendResponse for each applicable grouping along with metadata describing the grouping. All the contained GroupedComputeNodeAppendResponses are guaranteed to be of the same type.
IsEnabledResponse
Milliseconds
Ping
A ping can be sent by both client and server to keep the connection open and check that it is still working. The receiving end should send back a pong immediately. We also include the times that pings and pongs are sent so that we can track latency and/or discover clock drift between server and client.
Pong
ShutdownNotice
Indicates that the websocket will shut down in the near future. Until it is, SubscriptionUpdates will still be sent to the client. Clients that want to avoid downtime or latency spikes should initiate a new websocket and recreate all their subscriptions there but still keep this websocket open until the new websockets starts sending SubscriptionUpdates. Note: The initial updates that the new websocket sends might be somewhat stale because of server and connection pools warm up. The client might want to wait with fully switching to the new subscription until the updates aren’t very stale anymore.
StreamingComputeNodeRequest
A templatized version of ComputeNodeRequest where the end of the range will track the current time and the start of the range tracks windowWidth time ago.
StreamingComputeNodeSubscription
SubscriptionCreationError
This will be sent if there is an error while creating a subscription. This means that the subscription was never created and the client will have to re-try creating it if warranted. This can also be sent after a subscription was first successfully started and sent result. In that case it means that the subscription encountered an unrecoverable error at runtime and will be stopped.
SubscriptionCreationMessage
SubscriptionCreationSuccess
Will be returned once a subscriptions has been successfully created.
SubscriptionId
SubscriptionOptions
SubscriptionUpdateError
This will be sent if there is an error while updating a subscription. Note: This won’t automatically cancel the subscription. The client will have to call ClientMessage::unsubscribe to do that if warranted.
SubscriptionUpdateMessage

Enums§

ClientMessage
ComputeNodeAppendResponse
HealthMessage
InvalidComputationType
Compute types that are completely incompatible with streaming. If any of these are present, the subscription cannot be created.
PollingOnlyComputationType
Compute types that support streaming but only via polling (not real-time appends). Subscriptions with these types will be created successfully, but the frontend should use polling mode instead of expecting append updates.
ResultConfiguration
ServerMessage
SubscriptionCreation
SubscriptionUpdate
UnavailableResultConfigurationReason