rusty-haystack 0.7.0__tar.gz → 0.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/Cargo.lock +17 -5
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/Cargo.toml +1 -1
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/PKG-INFO +1 -1
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-client/Cargo.toml +1 -1
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/mod.rs +2 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/snapshot.rs +30 -21
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/Cargo.toml +3 -2
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/app.rs +46 -4
- rusty_haystack-0.7.2/haystack-server/src/his_provider.rs +24 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/his_store.rs +24 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/lib.rs +2 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/data.rs +1 -1
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/his.rs +5 -4
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/system.rs +1 -1
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/state.rs +3 -3
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/tests/federation_integration.rs +2 -2
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/Cargo.toml +3 -3
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/README.md +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-client/src/auth.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-client/src/client.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-client/src/error.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-client/src/lib.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-client/src/tls.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-client/src/transport/http.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-client/src/transport/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-client/src/transport/ws.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/Cargo.toml +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/benches/benchmarks.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/defs.trio +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/tz_map.txt +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/units.txt +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.attrs.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.equips.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.examples.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.points.elec.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.points.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.protocols.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/sys.api.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/sys.comp.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/sys.files.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/sys.template.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/data/xeto/sys.xeto +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/auth.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/arrow_ipc.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/csv.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/hbf/de.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/hbf/error.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/hbf/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/hbf/ser.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/hbf/varint.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/json/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/json/v3.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/json/v4.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/rdf.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/shared.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/trio/encoder.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/trio/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/trio/parser.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/zinc/encoder.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/zinc/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/codecs/zinc/parser.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/data/dict.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/data/grid.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/data/list.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/data/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/expr/ast.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/expr/eval.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/expr/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/expr/parser.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/filter/ast.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/filter/eval.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/filter/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/filter/parser.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/adjacency.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/bitmap.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/changelog.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/columnar.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/csr.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/entity_graph.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/query_planner.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/shared.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/structural.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/subscriber.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/graph/value_index.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/coord.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/datetime.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/kind.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/number.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/ref_.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/singletons.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/symbol.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/tz.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/units.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/uri.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/kinds/xstr.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/lib.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/ontology/conjunct.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/ontology/def.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/ontology/graph_validation.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/ontology/lib.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/ontology/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/ontology/namespace.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/ontology/taxonomy.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/ontology/trio_loader.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/ontology/validation.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/serde_impls.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/xeto/ast.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/xeto/bundled.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/xeto/export.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/xeto/fitting.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/xeto/lexer.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/xeto/loader.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/xeto/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/xeto/parser.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/xeto/resolver.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/src/xeto/spec.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/tests/e2e.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/tests/graph_integration.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-core/tests/ontology_integration.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/benches/benchmarks.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/benches/federation.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/actions.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/auth/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/auth/users.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/connector.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/content.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/demo.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/domain_scope.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/error.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/federation.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/about.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/changes.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/defs.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/federation.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/formats.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/graph.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/invoke.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/libs.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/nav.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/ops_handler.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/point_write.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/rdf.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/read.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ops/watch.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/session/affinity.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/session/mod.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/session/peek.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/session/profile.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/session/working_set.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/src/ws.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/pyproject.toml +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/README.md +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/rusty_haystack.pyi +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/auth.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/client.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/codecs.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/convert.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/data.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/exceptions.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/expr.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/filter.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/graph.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/kinds.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/lib.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/ontology.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/server.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/src/units.rs +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/tests/__init__.py +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/tests/conftest.py +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_auth.py +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_codecs.py +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_data.py +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_exceptions.py +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_filter.py +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_graph.py +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_kinds.py +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_ontology.py +0 -0
- {rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_server.py +0 -0
|
@@ -533,6 +533,17 @@ dependencies = [
|
|
|
533
533
|
"regex-syntax",
|
|
534
534
|
]
|
|
535
535
|
|
|
536
|
+
[[package]]
|
|
537
|
+
name = "async-trait"
|
|
538
|
+
version = "0.1.89"
|
|
539
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
540
|
+
checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
|
|
541
|
+
dependencies = [
|
|
542
|
+
"proc-macro2",
|
|
543
|
+
"quote",
|
|
544
|
+
"syn",
|
|
545
|
+
]
|
|
546
|
+
|
|
536
547
|
[[package]]
|
|
537
548
|
name = "atoi"
|
|
538
549
|
version = "2.0.0"
|
|
@@ -2515,7 +2526,7 @@ dependencies = [
|
|
|
2515
2526
|
|
|
2516
2527
|
[[package]]
|
|
2517
2528
|
name = "rusty-haystack"
|
|
2518
|
-
version = "0.7.
|
|
2529
|
+
version = "0.7.2"
|
|
2519
2530
|
dependencies = [
|
|
2520
2531
|
"chrono",
|
|
2521
2532
|
"pyo3",
|
|
@@ -2527,7 +2538,7 @@ dependencies = [
|
|
|
2527
2538
|
|
|
2528
2539
|
[[package]]
|
|
2529
2540
|
name = "rusty-haystack-cli"
|
|
2530
|
-
version = "0.7.
|
|
2541
|
+
version = "0.7.2"
|
|
2531
2542
|
dependencies = [
|
|
2532
2543
|
"clap",
|
|
2533
2544
|
"env_logger",
|
|
@@ -2541,7 +2552,7 @@ dependencies = [
|
|
|
2541
2552
|
|
|
2542
2553
|
[[package]]
|
|
2543
2554
|
name = "rusty-haystack-client"
|
|
2544
|
-
version = "0.7.
|
|
2555
|
+
version = "0.7.2"
|
|
2545
2556
|
dependencies = [
|
|
2546
2557
|
"base64",
|
|
2547
2558
|
"dashmap",
|
|
@@ -2563,7 +2574,7 @@ dependencies = [
|
|
|
2563
2574
|
|
|
2564
2575
|
[[package]]
|
|
2565
2576
|
name = "rusty-haystack-core"
|
|
2566
|
-
version = "0.7.
|
|
2577
|
+
version = "0.7.2"
|
|
2567
2578
|
dependencies = [
|
|
2568
2579
|
"arrow",
|
|
2569
2580
|
"base64",
|
|
@@ -2597,12 +2608,13 @@ dependencies = [
|
|
|
2597
2608
|
|
|
2598
2609
|
[[package]]
|
|
2599
2610
|
name = "rusty-haystack-server"
|
|
2600
|
-
version = "0.7.
|
|
2611
|
+
version = "0.7.2"
|
|
2601
2612
|
dependencies = [
|
|
2602
2613
|
"actix-http",
|
|
2603
2614
|
"actix-rt",
|
|
2604
2615
|
"actix-web",
|
|
2605
2616
|
"actix-ws",
|
|
2617
|
+
"async-trait",
|
|
2606
2618
|
"base64",
|
|
2607
2619
|
"chrono",
|
|
2608
2620
|
"criterion",
|
|
@@ -13,7 +13,7 @@ categories.workspace = true
|
|
|
13
13
|
name = "haystack_client"
|
|
14
14
|
|
|
15
15
|
[dependencies]
|
|
16
|
-
haystack-core = { package = "rusty-haystack-core", version = "0.7.
|
|
16
|
+
haystack-core = { package = "rusty-haystack-core", version = "0.7.2", path = "../haystack-core", features = ["haystack-serde"] }
|
|
17
17
|
reqwest = { version = "0.13", features = ["rustls-no-provider"], default-features = false }
|
|
18
18
|
rustls = { version = "0.23", features = ["ring", "tls12", "std"], default-features = false }
|
|
19
19
|
tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] }
|
|
@@ -33,6 +33,7 @@ pub mod csr;
|
|
|
33
33
|
pub mod entity_graph;
|
|
34
34
|
pub mod query_planner;
|
|
35
35
|
pub mod shared;
|
|
36
|
+
#[cfg(feature = "haystack-serde")]
|
|
36
37
|
pub mod snapshot;
|
|
37
38
|
pub mod structural;
|
|
38
39
|
pub mod subscriber;
|
|
@@ -41,6 +42,7 @@ pub mod value_index;
|
|
|
41
42
|
pub use changelog::{ChangelogGap, DEFAULT_CHANGELOG_CAPACITY, DiffOp, GraphDiff};
|
|
42
43
|
pub use entity_graph::{EntityGraph, GraphError, HierarchyNode};
|
|
43
44
|
pub use shared::SharedGraph;
|
|
45
|
+
#[cfg(feature = "haystack-serde")]
|
|
44
46
|
pub use snapshot::{SnapshotError, SnapshotMeta, SnapshotReader, SnapshotWriter};
|
|
45
47
|
pub use structural::StructuralIndex;
|
|
46
48
|
pub use subscriber::GraphSubscriber;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
//! HLSS
|
|
1
|
+
//! HLSS v2 binary snapshot format — write/read EntityGraph state to disk.
|
|
2
2
|
//!
|
|
3
|
-
//! Format: [Header][Zstd-compressed
|
|
3
|
+
//! Format: [Header][Zstd-compressed HBF body][CRC32 footer]
|
|
4
4
|
//! Header: "HLSS" (4 bytes) + format_version (u16 LE) + entity_count (u32 LE)
|
|
5
5
|
//! + timestamp (i64 LE, Unix nanos) + graph_version (u64 LE) = 26 bytes
|
|
6
|
-
//! Body: Zstd-compressed
|
|
6
|
+
//! Body: Zstd-compressed HBF-encoded grid of all entities
|
|
7
7
|
//! Footer: CRC32 (u32 LE) over header + compressed body
|
|
8
8
|
|
|
9
9
|
use std::collections::BTreeSet;
|
|
10
10
|
use std::path::{Path, PathBuf};
|
|
11
11
|
|
|
12
|
-
use crate::codecs
|
|
13
|
-
use crate::codecs::zinc::ZincCodec;
|
|
12
|
+
use crate::codecs;
|
|
14
13
|
use crate::data::{HCol, HDict, HGrid};
|
|
15
14
|
use crate::graph::shared::SharedGraph;
|
|
16
15
|
|
|
@@ -84,14 +83,11 @@ impl SnapshotWriter {
|
|
|
84
83
|
(grid, version)
|
|
85
84
|
});
|
|
86
85
|
|
|
87
|
-
// Encode to
|
|
88
|
-
let
|
|
89
|
-
let zinc_str = zinc
|
|
90
|
-
.encode_grid(&grid)
|
|
91
|
-
.map_err(|e| SnapshotError::Codec(e.to_string()))?;
|
|
86
|
+
// Encode to HBF binary
|
|
87
|
+
let hbf_bytes = codecs::encode_grid_binary(&grid).map_err(SnapshotError::Codec)?;
|
|
92
88
|
|
|
93
89
|
// Compress
|
|
94
|
-
let compressed = zstd::encode_all(
|
|
90
|
+
let compressed = zstd::encode_all(hbf_bytes.as_slice(), self.compression_level)
|
|
95
91
|
.map_err(|e| SnapshotError::Decompression(e.to_string()))?;
|
|
96
92
|
|
|
97
93
|
// Build header
|
|
@@ -103,7 +99,7 @@ impl SnapshotWriter {
|
|
|
103
99
|
|
|
104
100
|
let mut buf = Vec::new();
|
|
105
101
|
buf.extend_from_slice(b"HLSS");
|
|
106
|
-
buf.extend_from_slice(&
|
|
102
|
+
buf.extend_from_slice(&2u16.to_le_bytes()); // format version
|
|
107
103
|
buf.extend_from_slice(&entity_count.to_le_bytes());
|
|
108
104
|
buf.extend_from_slice(×tamp.to_le_bytes());
|
|
109
105
|
buf.extend_from_slice(&version.to_le_bytes());
|
|
@@ -192,7 +188,7 @@ impl SnapshotReader {
|
|
|
192
188
|
|
|
193
189
|
// Parse header
|
|
194
190
|
let format_version = u16::from_le_bytes([data[4], data[5]]);
|
|
195
|
-
if format_version !=
|
|
191
|
+
if format_version != 2 {
|
|
196
192
|
return Err(SnapshotError::UnsupportedVersion(format_version));
|
|
197
193
|
}
|
|
198
194
|
let entity_count = u32::from_le_bytes(data[6..10].try_into().unwrap());
|
|
@@ -223,13 +219,8 @@ impl SnapshotReader {
|
|
|
223
219
|
)));
|
|
224
220
|
}
|
|
225
221
|
|
|
226
|
-
// Decode
|
|
227
|
-
let
|
|
228
|
-
std::str::from_utf8(&decompressed).map_err(|e| SnapshotError::Codec(e.to_string()))?;
|
|
229
|
-
let zinc = ZincCodec;
|
|
230
|
-
let grid = zinc
|
|
231
|
-
.decode_grid(zinc_str)
|
|
232
|
-
.map_err(|e| SnapshotError::Codec(e.to_string()))?;
|
|
222
|
+
// Decode HBF binary
|
|
223
|
+
let grid = codecs::decode_grid_binary(&decompressed).map_err(SnapshotError::Codec)?;
|
|
233
224
|
|
|
234
225
|
// Import entities into graph — bulk load skips changelog tracking.
|
|
235
226
|
graph.write(|g| {
|
|
@@ -286,7 +277,7 @@ mod tests {
|
|
|
286
277
|
let graph2 = SharedGraph::new(EntityGraph::new());
|
|
287
278
|
let meta = SnapshotReader::load(&snap_path, &graph2).unwrap();
|
|
288
279
|
|
|
289
|
-
assert_eq!(meta.format_version,
|
|
280
|
+
assert_eq!(meta.format_version, 2);
|
|
290
281
|
assert_eq!(meta.entity_count, 3);
|
|
291
282
|
assert_eq!(meta.graph_version, 3);
|
|
292
283
|
assert_eq!(graph2.len(), 3);
|
|
@@ -401,4 +392,22 @@ mod tests {
|
|
|
401
392
|
let result = SnapshotReader::load_from_bytes(&data, Path::new("x.hlss"), &graph);
|
|
402
393
|
assert!(matches!(result, Err(SnapshotError::UnsupportedVersion(99))));
|
|
403
394
|
}
|
|
395
|
+
|
|
396
|
+
#[test]
|
|
397
|
+
fn v1_snapshot_rejected() {
|
|
398
|
+
// Build a buffer with version 1 (old format)
|
|
399
|
+
let mut data = Vec::new();
|
|
400
|
+
data.extend_from_slice(b"HLSS");
|
|
401
|
+
data.extend_from_slice(&1u16.to_le_bytes());
|
|
402
|
+
data.extend_from_slice(&0u32.to_le_bytes());
|
|
403
|
+
data.extend_from_slice(&0i64.to_le_bytes());
|
|
404
|
+
data.extend_from_slice(&0u64.to_le_bytes());
|
|
405
|
+
data.extend_from_slice(&[0u8; 4]); // fake body
|
|
406
|
+
let crc = crc32fast::hash(&data);
|
|
407
|
+
data.extend_from_slice(&crc.to_le_bytes());
|
|
408
|
+
|
|
409
|
+
let graph = SharedGraph::new(EntityGraph::new());
|
|
410
|
+
let result = SnapshotReader::load_from_bytes(&data, Path::new("old.hlss"), &graph);
|
|
411
|
+
assert!(matches!(result, Err(SnapshotError::UnsupportedVersion(1))));
|
|
412
|
+
}
|
|
404
413
|
}
|
|
@@ -13,13 +13,14 @@ categories.workspace = true
|
|
|
13
13
|
name = "haystack_server"
|
|
14
14
|
|
|
15
15
|
[dependencies]
|
|
16
|
-
haystack-core = { package = "rusty-haystack-core", version = "0.7.
|
|
17
|
-
haystack-client = { package = "rusty-haystack-client", version = "0.7.
|
|
16
|
+
haystack-core = { package = "rusty-haystack-core", version = "0.7.2", path = "../haystack-core", features = ["haystack-serde"] }
|
|
17
|
+
haystack-client = { package = "rusty-haystack-client", version = "0.7.2", path = "../haystack-client" }
|
|
18
18
|
actix-web = "=4.13.0"
|
|
19
19
|
actix-http = "=3.12.0"
|
|
20
20
|
actix-ws = "0.4"
|
|
21
21
|
actix-rt = "2"
|
|
22
22
|
chrono = { version = "0.4", features = ["serde"] }
|
|
23
|
+
async-trait = "0.1"
|
|
23
24
|
serde = { version = "1.0", features = ["derive"] }
|
|
24
25
|
serde_json = "1.0"
|
|
25
26
|
toml = "1.0"
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
//! Server builder and startup.
|
|
2
2
|
|
|
3
|
+
use std::sync::Arc;
|
|
4
|
+
|
|
3
5
|
use actix_web::body::MessageBody;
|
|
4
6
|
use actix_web::dev::{ServiceRequest, ServiceResponse};
|
|
5
7
|
use actix_web::middleware::from_fn;
|
|
@@ -18,6 +20,8 @@ use crate::state::AppState;
|
|
|
18
20
|
use crate::ws;
|
|
19
21
|
use crate::ws::WatchManager;
|
|
20
22
|
|
|
23
|
+
type ConfigureFn = dyn Fn(&mut web::ServiceConfig) + Send + Sync + 'static;
|
|
24
|
+
|
|
21
25
|
/// Builder for the Haystack HTTP server.
|
|
22
26
|
pub struct HaystackServer {
|
|
23
27
|
graph: SharedGraph,
|
|
@@ -25,6 +29,8 @@ pub struct HaystackServer {
|
|
|
25
29
|
auth_manager: AuthManager,
|
|
26
30
|
actions: ActionRegistry,
|
|
27
31
|
federation: Federation,
|
|
32
|
+
custom_configures: Vec<Arc<ConfigureFn>>,
|
|
33
|
+
history_provider: Option<Box<dyn crate::his_provider::HistoryProvider>>,
|
|
28
34
|
port: u16,
|
|
29
35
|
host: String,
|
|
30
36
|
}
|
|
@@ -38,6 +44,8 @@ impl HaystackServer {
|
|
|
38
44
|
auth_manager: AuthManager::empty(),
|
|
39
45
|
actions: ActionRegistry::new(),
|
|
40
46
|
federation: Federation::new(),
|
|
47
|
+
custom_configures: Vec::new(),
|
|
48
|
+
history_provider: None,
|
|
41
49
|
port: 8080,
|
|
42
50
|
host: "127.0.0.1".to_string(),
|
|
43
51
|
}
|
|
@@ -79,15 +87,40 @@ impl HaystackServer {
|
|
|
79
87
|
self
|
|
80
88
|
}
|
|
81
89
|
|
|
90
|
+
/// Register a custom route configuration function.
|
|
91
|
+
///
|
|
92
|
+
/// The function receives a mutable `ServiceConfig` and can add routes,
|
|
93
|
+
/// scopes, and app data. Called during server startup.
|
|
94
|
+
pub fn with_configure<F>(mut self, f: F) -> Self
|
|
95
|
+
where
|
|
96
|
+
F: Fn(&mut web::ServiceConfig) + Send + Sync + 'static,
|
|
97
|
+
{
|
|
98
|
+
self.custom_configures.push(Arc::new(f));
|
|
99
|
+
self
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/// Set the history storage provider (default: in-memory [`HisStore`]).
|
|
103
|
+
pub fn with_history_provider(
|
|
104
|
+
mut self,
|
|
105
|
+
provider: Box<dyn crate::his_provider::HistoryProvider>,
|
|
106
|
+
) -> Self {
|
|
107
|
+
self.history_provider = Some(provider);
|
|
108
|
+
self
|
|
109
|
+
}
|
|
110
|
+
|
|
82
111
|
/// Start the HTTP server. This blocks until the server is stopped.
|
|
83
112
|
pub async fn run(self) -> std::io::Result<()> {
|
|
113
|
+
let his: Box<dyn crate::his_provider::HistoryProvider> = self
|
|
114
|
+
.history_provider
|
|
115
|
+
.unwrap_or_else(|| Box::new(HisStore::new()));
|
|
116
|
+
|
|
84
117
|
let state = web::Data::new(AppState {
|
|
85
118
|
graph: self.graph,
|
|
86
119
|
namespace: parking_lot::RwLock::new(self.namespace),
|
|
87
120
|
auth: self.auth_manager,
|
|
88
121
|
watches: WatchManager::new(),
|
|
89
122
|
actions: self.actions,
|
|
90
|
-
his
|
|
123
|
+
his,
|
|
91
124
|
started_at: std::time::Instant::now(),
|
|
92
125
|
federation: self.federation,
|
|
93
126
|
});
|
|
@@ -95,15 +128,24 @@ impl HaystackServer {
|
|
|
95
128
|
// Start federation background sync tasks
|
|
96
129
|
let _sync_handles = state.federation.start_background_sync();
|
|
97
130
|
|
|
131
|
+
let custom_configures = self.custom_configures.clone();
|
|
132
|
+
|
|
98
133
|
log::info!("Starting haystack-server on {}:{}", self.host, self.port);
|
|
99
134
|
|
|
100
135
|
HttpServer::new(move || {
|
|
101
|
-
App::new()
|
|
136
|
+
let mut app = App::new()
|
|
102
137
|
.app_data(state.clone())
|
|
103
138
|
.app_data(actix_web::web::PayloadConfig::default().limit(2 * 1024 * 1024))
|
|
104
139
|
.wrap(from_fn(auth_middleware))
|
|
105
140
|
.configure(ops::configure)
|
|
106
|
-
.route("/api/ws", web::get().to(ws::ws_handler))
|
|
141
|
+
.route("/api/ws", web::get().to(ws::ws_handler));
|
|
142
|
+
|
|
143
|
+
for configure_fn in &custom_configures {
|
|
144
|
+
let f = Arc::clone(configure_fn);
|
|
145
|
+
app = app.configure(move |cfg| f(cfg));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
app
|
|
107
149
|
})
|
|
108
150
|
.bind((self.host.as_str(), self.port))?
|
|
109
151
|
.run()
|
|
@@ -307,7 +349,7 @@ permissions = ["read"]
|
|
|
307
349
|
auth,
|
|
308
350
|
watches: WatchManager::new(),
|
|
309
351
|
actions: ActionRegistry::new(),
|
|
310
|
-
his: HisStore::new(),
|
|
352
|
+
his: Box::new(HisStore::new()),
|
|
311
353
|
started_at: std::time::Instant::now(),
|
|
312
354
|
federation: Federation::new(),
|
|
313
355
|
})
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//! Pluggable history storage backend.
|
|
2
|
+
//!
|
|
3
|
+
//! The default implementation is [`HisStore`](crate::his_store::HisStore) (in-memory).
|
|
4
|
+
//! Implement this trait to back hisRead/hisWrite with a database.
|
|
5
|
+
|
|
6
|
+
use async_trait::async_trait;
|
|
7
|
+
use chrono::{DateTime, FixedOffset};
|
|
8
|
+
|
|
9
|
+
use crate::his_store::HisItem;
|
|
10
|
+
|
|
11
|
+
/// Trait for history storage backends.
|
|
12
|
+
#[async_trait]
|
|
13
|
+
pub trait HistoryProvider: Send + Sync + 'static {
|
|
14
|
+
/// Read historical items for an entity within the optional time range.
|
|
15
|
+
async fn his_read(
|
|
16
|
+
&self,
|
|
17
|
+
id: &str,
|
|
18
|
+
start: Option<DateTime<FixedOffset>>,
|
|
19
|
+
end: Option<DateTime<FixedOffset>>,
|
|
20
|
+
) -> Vec<HisItem>;
|
|
21
|
+
|
|
22
|
+
/// Write historical items for an entity.
|
|
23
|
+
async fn his_write(&self, id: &str, items: Vec<HisItem>);
|
|
24
|
+
}
|
|
@@ -5,8 +5,11 @@ use std::collections::HashMap;
|
|
|
5
5
|
use chrono::{DateTime, FixedOffset};
|
|
6
6
|
use parking_lot::RwLock;
|
|
7
7
|
|
|
8
|
+
use async_trait::async_trait;
|
|
8
9
|
use haystack_core::kinds::Kind;
|
|
9
10
|
|
|
11
|
+
use crate::his_provider::HistoryProvider;
|
|
12
|
+
|
|
10
13
|
const MAX_ITEMS_PER_SERIES: usize = 1_000_000;
|
|
11
14
|
|
|
12
15
|
/// A single historical data point: a timestamp and a value.
|
|
@@ -101,6 +104,11 @@ impl HisStore {
|
|
|
101
104
|
.collect()
|
|
102
105
|
}
|
|
103
106
|
|
|
107
|
+
/// Whether the store has no items for the given point.
|
|
108
|
+
pub fn is_empty(&self, id: &str) -> bool {
|
|
109
|
+
self.len(id) == 0
|
|
110
|
+
}
|
|
111
|
+
|
|
104
112
|
/// Return the count of history items stored for a given point.
|
|
105
113
|
pub fn len(&self, id: &str) -> usize {
|
|
106
114
|
let map = self.items.read();
|
|
@@ -108,6 +116,22 @@ impl HisStore {
|
|
|
108
116
|
}
|
|
109
117
|
}
|
|
110
118
|
|
|
119
|
+
#[async_trait]
|
|
120
|
+
impl HistoryProvider for HisStore {
|
|
121
|
+
async fn his_read(
|
|
122
|
+
&self,
|
|
123
|
+
id: &str,
|
|
124
|
+
start: Option<DateTime<FixedOffset>>,
|
|
125
|
+
end: Option<DateTime<FixedOffset>>,
|
|
126
|
+
) -> Vec<HisItem> {
|
|
127
|
+
self.read(id, start, end)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async fn his_write(&self, id: &str, items: Vec<HisItem>) {
|
|
131
|
+
self.write(id, items);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
111
135
|
#[cfg(test)]
|
|
112
136
|
mod tests {
|
|
113
137
|
use super::*;
|
|
@@ -39,6 +39,7 @@ pub mod demo;
|
|
|
39
39
|
pub mod domain_scope;
|
|
40
40
|
pub mod error;
|
|
41
41
|
pub mod federation;
|
|
42
|
+
pub mod his_provider;
|
|
42
43
|
pub mod his_store;
|
|
43
44
|
pub mod ops;
|
|
44
45
|
pub mod session;
|
|
@@ -48,3 +49,4 @@ pub mod ws;
|
|
|
48
49
|
pub use app::HaystackServer;
|
|
49
50
|
pub use domain_scope::DomainScope;
|
|
50
51
|
pub use federation::Federation;
|
|
52
|
+
pub use his_provider::HistoryProvider;
|
|
@@ -159,7 +159,7 @@ mod tests {
|
|
|
159
159
|
auth: AuthManager::empty(),
|
|
160
160
|
watches: WatchManager::new(),
|
|
161
161
|
actions: ActionRegistry::new(),
|
|
162
|
-
his: HisStore::new(),
|
|
162
|
+
his: Box::new(HisStore::new()),
|
|
163
163
|
started_at: std::time::Instant::now(),
|
|
164
164
|
federation: crate::federation::Federation::new(),
|
|
165
165
|
})
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
//! The `hisRead` and `hisWrite` ops — historical time-series data.
|
|
2
2
|
//!
|
|
3
|
-
//! Backed by
|
|
4
|
-
//! in `AppState`.
|
|
3
|
+
//! Backed by a pluggable [`HistoryProvider`](crate::his_provider::HistoryProvider)
|
|
4
|
+
//! stored in `AppState`. The default provider is the in-memory
|
|
5
|
+
//! [`HisStore`](crate::his_store::HisStore).
|
|
5
6
|
//!
|
|
6
7
|
//! # hisRead
|
|
7
8
|
//!
|
|
@@ -134,7 +135,7 @@ pub async fn handle_read(
|
|
|
134
135
|
.map_err(|e| HaystackError::bad_request(format!("hisRead: bad range: {e}")))?;
|
|
135
136
|
|
|
136
137
|
// Query the store.
|
|
137
|
-
let items = state.his.
|
|
138
|
+
let items = state.his.his_read(&id, Some(start), Some(end)).await;
|
|
138
139
|
|
|
139
140
|
// Build response grid.
|
|
140
141
|
let cols = vec![HCol::new("ts"), HCol::new("val")];
|
|
@@ -285,7 +286,7 @@ pub async fn handle_write(
|
|
|
285
286
|
}
|
|
286
287
|
|
|
287
288
|
let count = items.len();
|
|
288
|
-
state.his.
|
|
289
|
+
state.his.his_write(&id, items).await;
|
|
289
290
|
|
|
290
291
|
log::info!("hisWrite: stored {} items for point {}", count, id);
|
|
291
292
|
let grid = HGrid::new();
|
|
@@ -193,7 +193,7 @@ mod tests {
|
|
|
193
193
|
auth: AuthManager::empty(),
|
|
194
194
|
watches: WatchManager::new(),
|
|
195
195
|
actions: ActionRegistry::new(),
|
|
196
|
-
his: HisStore::new(),
|
|
196
|
+
his: Box::new(HisStore::new()),
|
|
197
197
|
started_at: std::time::Instant::now(),
|
|
198
198
|
federation: crate::federation::Federation::new(),
|
|
199
199
|
})
|
|
@@ -6,7 +6,7 @@ use haystack_core::ontology::DefNamespace;
|
|
|
6
6
|
use crate::actions::ActionRegistry;
|
|
7
7
|
use crate::auth::AuthManager;
|
|
8
8
|
use crate::federation::Federation;
|
|
9
|
-
use crate::
|
|
9
|
+
use crate::his_provider::HistoryProvider;
|
|
10
10
|
use crate::ws::WatchManager;
|
|
11
11
|
|
|
12
12
|
/// Shared application state injected into every Actix handler via `web::Data`.
|
|
@@ -21,8 +21,8 @@ pub struct AppState {
|
|
|
21
21
|
pub watches: WatchManager,
|
|
22
22
|
/// Action dispatch registry for the `invokeAction` op.
|
|
23
23
|
pub actions: ActionRegistry,
|
|
24
|
-
///
|
|
25
|
-
pub his:
|
|
24
|
+
/// Pluggable time-series history store for hisRead/hisWrite.
|
|
25
|
+
pub his: Box<dyn HistoryProvider>,
|
|
26
26
|
/// Instant when the server was started, used for uptime calculation.
|
|
27
27
|
pub started_at: std::time::Instant,
|
|
28
28
|
/// Federation manager for remote connector queries.
|
{rusty_haystack-0.7.0 → rusty_haystack-0.7.2}/haystack-server/tests/federation_integration.rs
RENAMED
|
@@ -42,7 +42,7 @@ fn test_app_state() -> web::Data<AppState> {
|
|
|
42
42
|
auth: AuthManager::empty(),
|
|
43
43
|
watches: WatchManager::new(),
|
|
44
44
|
actions: ActionRegistry::new(),
|
|
45
|
-
his: HisStore::new(),
|
|
45
|
+
his: Box::new(HisStore::new()),
|
|
46
46
|
started_at: std::time::Instant::now(),
|
|
47
47
|
federation: Federation::new(),
|
|
48
48
|
})
|
|
@@ -58,7 +58,7 @@ fn test_app_state_with_federation(federation: Federation) -> web::Data<AppState>
|
|
|
58
58
|
auth: AuthManager::empty(),
|
|
59
59
|
watches: WatchManager::new(),
|
|
60
60
|
actions: ActionRegistry::new(),
|
|
61
|
-
his: HisStore::new(),
|
|
61
|
+
his: Box::new(HisStore::new()),
|
|
62
62
|
started_at: std::time::Instant::now(),
|
|
63
63
|
federation,
|
|
64
64
|
})
|
|
@@ -9,9 +9,9 @@ name = "rusty_haystack"
|
|
|
9
9
|
crate-type = ["cdylib"]
|
|
10
10
|
|
|
11
11
|
[dependencies]
|
|
12
|
-
haystack-core = { package = "rusty-haystack-core", version = "0.7.
|
|
13
|
-
haystack-client = { package = "rusty-haystack-client", version = "0.7.
|
|
14
|
-
haystack-server = { package = "rusty-haystack-server", version = "0.7.
|
|
12
|
+
haystack-core = { package = "rusty-haystack-core", version = "0.7.2", path = "../haystack-core", features = ["haystack-serde"] }
|
|
13
|
+
haystack-client = { package = "rusty-haystack-client", version = "0.7.2", path = "../haystack-client" }
|
|
14
|
+
haystack-server = { package = "rusty-haystack-server", version = "0.7.2", path = "../haystack-server" }
|
|
15
15
|
pyo3 = { version = "0.28", features = ["extension-module"] }
|
|
16
16
|
chrono = "0.4"
|
|
17
17
|
tokio = { version = "1", features = ["rt-multi-thread"] }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|