Skip to main content

Module tenancy

Module tenancy 

Source
Expand description

The reference tenancy implementation the binary serves.

A minimal but complete TenancySpi: the partition is the tenant_id body field on ingest (or the x-tenant header on by-id reads, which carry no body), every document gets a _tenant field and a {partition}:{body.id} id with routing, and every partition lives on one shared index. It exists to make the binary runnable and to demonstrate the SPI; real consumers provide their own.

Structs§

ReferenceTenancy
A reference tenancy: every partition resolves to a placement of the configured PlacementMode. The default SharedIndex mode isolates by an injected _tenant field; the dedicated modes isolate by index/cluster with no body rewrite.

Enums§

PlacementMode
Which placement kind the reference tenancy resolves every partition to. The binary defaults to PlacementMode::SharedIndex (the body-rewrite mode); the other two let one reference impl demonstrate the no-body-rewrite routing modes, where isolation is by cluster or by index and the document is forwarded unchanged (docs/guide/10-choosing-a-mode).