query

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Connect-RPC query server for the recently-interacted-topk example.

Serves Get / GetMany / GetWindow / GetRange against the same DynamoDB row both writers (Lambda + ECS Kafka worker) merge into. The byte-encoded Misra-Gries summary is returned verbatim; clients decode via the pkg/monoid/sketch/topk package's Decode helper, or via the embedded admin UI which renders the sketch's items + counts directly.

Run locally:

export DDB_ENDPOINT=http://localhost:8000
go run ./examples/recently-interacted-topk/cmd/query

Then call it:

# all-time top entities (when running non-windowed)
grpcurl -plaintext -d '{"entity":"global"}' \
    localhost:50051 murmur.v1.QueryService/Get
# top entities over the last 7 days
grpcurl -plaintext -d '{"entity":"global","duration_seconds":604800}' \
    localhost:50051 murmur.v1.QueryService/GetWindow

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL