slim-bindings 0.6.1__tar.gz → 0.6.3__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.
Potentially problematic release.
This version of slim-bindings might be problematic. Click here for more details.
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/PKG-INFO +1 -1
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/message_processing.rs +22 -16
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/tests/data_path_test.rs +65 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/service/src/app.rs +5 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/service/src/service.rs +77 -3
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/channel_endpoint.rs +1 -1
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/common.rs +3 -2
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/context.rs +4 -5
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/errors.rs +2 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/multicast.rs +18 -21
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/point_to_point.rs +45 -30
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/session_layer.rs +1 -1
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/transmitter.rs +63 -51
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/pyproject.toml +1 -1
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/uv.lock +1 -1
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/Cargo.lock +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/Cargo.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/README.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/CHANGELOG.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/Cargo.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/README.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/auth_provider.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/builder.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/errors.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/file_watcher.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/jwt.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/jwt_middleware.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/lib.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/oidc.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/resolver.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/shared_secret.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/testutils.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/auth/src/traits.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/CHANGELOG.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/Cargo.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/README.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/build.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/proto/hello.proto +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/auth/basic.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/auth/jwt.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/auth/oidc.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/auth/static_jwt.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/auth.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/component/configuration.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/component/id.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/component.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/grpc/client.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/grpc/compression.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/grpc/errors.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/grpc/headers_middleware.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/grpc/helloworld.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/grpc/proxy.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/grpc/schema/client-config.schema.json +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/grpc/schema/generate_schema.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/grpc/server.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/grpc.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/lib.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/metadata.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/opaque.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/provider/env.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/provider/file.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/provider/lib.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/provider.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/testutils/helloworld.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/testutils/tower_service.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/testutils.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/tls/client.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/tls/common.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/tls/provider.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/tls/server.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/src/tls.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/grpc/ca.crt +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/grpc/server.crt +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/grpc/server.key +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec256-public.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec256-wrong.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec256.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec384-public.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec384-wrong.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec384.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/eddsa-public.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/eddsa-wrong.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/eddsa.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/rsa-public.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/rsa-wrong.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/jwt/rsa.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/testfile +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/tls/ca-1.crt +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/tls/ca-2.crt +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/tls/ca-bad.crt +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/tls/client-1.crt +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/tls/client-1.key +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/tls/client-2.crt +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/tls/client-2.key +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/tls/server-1.crt +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/tls/server-1.key +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/tls/server-2.crt +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/testdata/tls/server-2.key +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/tests/e2e.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/config/tests/tls.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/CHANGELOG.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/Cargo.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/README.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/build.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/proto/v1/controller.proto +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/src/api/gen/controller.proto.v1.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/src/api/proto.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/src/api.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/src/config.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/src/errors.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/src/lib.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/controller/src/service.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/CHANGELOG.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/Cargo.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/README.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/benches/pool_benchmark.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/build.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/proto/v1/data-plane.proto +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/api/gen/dataplane.proto.v1.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/api/proto.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/api.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/connection.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/errors.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/forwarder.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/lib.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/messages/encoder.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/messages/utils.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/messages.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/tables/connection_table.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/tables/errors.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/tables/pool.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/tables/remote_subscription_table.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/tables/subscription_table.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/datapath/src/tables.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/mls/CHANGELOG.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/mls/Cargo.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/mls/README.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/mls/src/errors.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/mls/src/identity_provider.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/mls/src/lib.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/mls/src/mls.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/service/CHANGELOG.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/service/Cargo.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/service/README.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/service/src/errors.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/service/src/lib.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/Cargo.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/config.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/handle.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/interceptor.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/interceptor_mls.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/lib.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/moderator_task.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/notification.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/producer_buffer.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/receiver_buffer.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/timer.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/session/src/traits.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/signal/CHANGELOG.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/signal/Cargo.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/signal/README.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/signal/src/lib.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/tracing/CHANGELOG.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/tracing/Cargo.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/tracing/README.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/tracing/src/lib.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/core/tracing/src/utils.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/BUILD.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/CHANGELOG.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/Cargo.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/README.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/SESSION.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/Taskfile.yaml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/build.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/CHANGELOG.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/Dockerfile +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/README.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/Taskfile.yaml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/pyproject.toml +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/README_group.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/README_point_to_point.md +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/__init__.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/common.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/group.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/point_to_point.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/slim.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/slim_bindings/__init__.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/slim_bindings/_slim_bindings.pyi +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/slim_bindings/errors.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/slim_bindings/session.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/slim_bindings/slim.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/slim_bindings/version.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/src/bin/stub_gen.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/src/build_info.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/src/lib.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/src/pyidentity.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/src/pymessage.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/src/pyservice.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/src/pysession.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/src/utils.rs +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/common.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/conftest.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/test_bindings.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/test_identity.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/test_multicast.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/test_point_to_point.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/test_session_metadata.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/testdata/ec256-public.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/testdata/ec256.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/testdata/ec384-public.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/testdata/ec384.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/testdata/eddsa-public.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/testdata/eddsa.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/testdata/rsa-public.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/python/bindings/tests/testdata/rsa.pem +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/slim_bindings/__init__.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/slim_bindings/_slim_bindings.pyi +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/slim_bindings/errors.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/slim_bindings/session.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/slim_bindings/slim.py +0 -0
- {slim_bindings-0.6.1 → slim_bindings-0.6.3}/slim_bindings/version.py +0 -0
|
@@ -262,30 +262,36 @@ impl MessageProcessor {
|
|
|
262
262
|
.await
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
pub fn disconnect(&self, conn: u64) -> Result<
|
|
266
|
-
match self.forwarder().get_connection(conn) {
|
|
265
|
+
pub fn disconnect(&self, conn: u64) -> Result<ClientConfig, DataPathError> {
|
|
266
|
+
let connection = match self.forwarder().get_connection(conn) {
|
|
267
|
+
Some(c) => c,
|
|
267
268
|
None => {
|
|
268
269
|
error!("error handling disconnect: connection unknown");
|
|
269
270
|
return Err(DataPathError::DisconnectionError(
|
|
270
271
|
"connection not found".to_string(),
|
|
271
272
|
));
|
|
272
273
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
t.cancel();
|
|
283
|
-
}
|
|
284
|
-
}
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
let token = match connection.cancellation_token() {
|
|
277
|
+
Some(t) => t,
|
|
278
|
+
None => {
|
|
279
|
+
error!("error handling disconnect: missing cancellation token");
|
|
280
|
+
return Err(DataPathError::DisconnectionError(
|
|
281
|
+
"missing cancellation token".to_string(),
|
|
282
|
+
));
|
|
285
283
|
}
|
|
286
|
-
}
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
// Cancel receiving loop; this triggers deletion of connection state.
|
|
287
|
+
token.cancel();
|
|
287
288
|
|
|
288
|
-
|
|
289
|
+
connection
|
|
290
|
+
.config_data()
|
|
291
|
+
.cloned()
|
|
292
|
+
.ok_or(DataPathError::DisconnectionError(
|
|
293
|
+
"missing client config data".to_string(),
|
|
294
|
+
))
|
|
289
295
|
}
|
|
290
296
|
|
|
291
297
|
pub fn register_local_connection(
|
|
@@ -147,6 +147,71 @@ mod tests {
|
|
|
147
147
|
assert!(logs_contain(expected_msg));
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
#[tokio::test]
|
|
151
|
+
#[traced_test]
|
|
152
|
+
async fn test_disconnection() {
|
|
153
|
+
// setup server from configuration
|
|
154
|
+
let mut server_conf = ServerConfig::with_endpoint("127.0.0.1:50052");
|
|
155
|
+
server_conf.tls_setting.insecure = true;
|
|
156
|
+
|
|
157
|
+
let (processor, _signal) = MessageProcessor::new();
|
|
158
|
+
let svc = Arc::new(processor);
|
|
159
|
+
let msg_processor = svc.clone();
|
|
160
|
+
|
|
161
|
+
let ep_server = server_conf
|
|
162
|
+
.to_server_future(&[DataPlaneServiceServer::from_arc(svc)])
|
|
163
|
+
.unwrap();
|
|
164
|
+
|
|
165
|
+
tokio::spawn(async move {
|
|
166
|
+
if let Err(e) = ep_server.await {
|
|
167
|
+
panic!("Server error: {:?}", e);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
tokio::time::sleep(tokio::time::Duration::from_millis(100)).await;
|
|
172
|
+
|
|
173
|
+
// create a client config we will attach to the connection
|
|
174
|
+
let mut client_config = ClientConfig::with_endpoint("http://127.0.0.1:50052");
|
|
175
|
+
client_config.tls_setting.insecure = true;
|
|
176
|
+
let channel = client_config.to_channel().unwrap();
|
|
177
|
+
|
|
178
|
+
// connect with client_config Some(...)
|
|
179
|
+
let (_, conn_index) = msg_processor
|
|
180
|
+
.connect(
|
|
181
|
+
channel,
|
|
182
|
+
Some(client_config.clone()),
|
|
183
|
+
None,
|
|
184
|
+
Some(SocketAddr::from(([127, 0, 0, 1], 50052))),
|
|
185
|
+
)
|
|
186
|
+
.await
|
|
187
|
+
.expect("error creating channel");
|
|
188
|
+
|
|
189
|
+
// ensure connection exists before disconnect
|
|
190
|
+
assert!(
|
|
191
|
+
msg_processor
|
|
192
|
+
.connection_table()
|
|
193
|
+
.get(conn_index as usize)
|
|
194
|
+
.is_some()
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
// disconnect (should cancel stream and eventually remove connection)
|
|
198
|
+
let _returned_cfg = msg_processor
|
|
199
|
+
.disconnect(conn_index)
|
|
200
|
+
.expect("disconnect should return client config");
|
|
201
|
+
|
|
202
|
+
// wait for cancellation to propagate and stream task to drop connection
|
|
203
|
+
tokio::time::sleep(tokio::time::Duration::from_millis(200)).await;
|
|
204
|
+
|
|
205
|
+
// after disconnect the connection should be removed
|
|
206
|
+
assert!(
|
|
207
|
+
msg_processor
|
|
208
|
+
.connection_table()
|
|
209
|
+
.get(conn_index as usize)
|
|
210
|
+
.is_none(),
|
|
211
|
+
"connection should be removed after disconnect"
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
150
215
|
fn make_message(org: &str, ns: &str, name: &str) -> Message {
|
|
151
216
|
let source = Name::from_strings([org, ns, name]).with_id(0);
|
|
152
217
|
let name = Name::from_strings([org, ns, name]).with_id(1);
|
|
@@ -296,6 +296,11 @@ where
|
|
|
296
296
|
.await;
|
|
297
297
|
|
|
298
298
|
if let Err(e) = res {
|
|
299
|
+
// Ignore errors due to subscription not found
|
|
300
|
+
if let SessionError::SubscriptionNotFound(_) = e {
|
|
301
|
+
debug!("session not found, ignoring message");
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
299
304
|
error!("error handling message: {}", e);
|
|
300
305
|
}
|
|
301
306
|
}
|
|
@@ -344,9 +344,27 @@ impl Service {
|
|
|
344
344
|
pub fn disconnect(&self, conn: u64) -> Result<(), ServiceError> {
|
|
345
345
|
info!("disconnect from conn {}", conn);
|
|
346
346
|
|
|
347
|
-
self.message_processor
|
|
348
|
-
|
|
349
|
-
|
|
347
|
+
match self.message_processor.disconnect(conn) {
|
|
348
|
+
Ok(cfg) => {
|
|
349
|
+
let endpoint = cfg.endpoint.clone();
|
|
350
|
+
let mut clients = self.clients.write();
|
|
351
|
+
if let Some(stored_conn) = clients.get(&endpoint) {
|
|
352
|
+
if *stored_conn == conn {
|
|
353
|
+
clients.remove(&endpoint);
|
|
354
|
+
info!("removed client mapping for endpoint {}", endpoint);
|
|
355
|
+
} else {
|
|
356
|
+
debug!(
|
|
357
|
+
"client mapping endpoint {} has different conn_id {} != {}",
|
|
358
|
+
endpoint, stored_conn, conn
|
|
359
|
+
);
|
|
360
|
+
}
|
|
361
|
+
} else {
|
|
362
|
+
debug!("no client mapping found for endpoint {}", endpoint);
|
|
363
|
+
}
|
|
364
|
+
Ok(())
|
|
365
|
+
}
|
|
366
|
+
Err(e) => Err(ServiceError::DisconnectError(e.to_string())),
|
|
367
|
+
}
|
|
350
368
|
}
|
|
351
369
|
|
|
352
370
|
pub fn get_connection_id(&self, endpoint: &str) -> Option<u64> {
|
|
@@ -469,6 +487,62 @@ mod tests {
|
|
|
469
487
|
assert!(logs_contain("shutting down server"));
|
|
470
488
|
}
|
|
471
489
|
|
|
490
|
+
#[tokio::test]
|
|
491
|
+
#[traced_test]
|
|
492
|
+
async fn test_service_disconnection() {
|
|
493
|
+
// create the service (server + one client we will disconnect)
|
|
494
|
+
let tls_config = TlsServerConfig::new().with_insecure(true);
|
|
495
|
+
let server_config =
|
|
496
|
+
ServerConfig::with_endpoint("0.0.0.0:12346").with_tls_settings(tls_config);
|
|
497
|
+
let config = ServiceConfiguration::new().with_server([server_config].to_vec());
|
|
498
|
+
let mut service = config
|
|
499
|
+
.build_server(ID::new_with_name(Kind::new(KIND).unwrap(), "test-disconnect").unwrap())
|
|
500
|
+
.unwrap();
|
|
501
|
+
|
|
502
|
+
service.run().await.expect("failed to run service");
|
|
503
|
+
|
|
504
|
+
// wait a bit for server loop to start
|
|
505
|
+
tokio::time::sleep(Duration::from_millis(100)).await;
|
|
506
|
+
|
|
507
|
+
// build client configuration and connect
|
|
508
|
+
let mut client_conf =
|
|
509
|
+
slim_config::grpc::client::ClientConfig::with_endpoint("http://0.0.0.0:12346");
|
|
510
|
+
client_conf.tls_setting.insecure = true;
|
|
511
|
+
let conn_id = service
|
|
512
|
+
.connect(&client_conf)
|
|
513
|
+
.await
|
|
514
|
+
.expect("failed to connect client");
|
|
515
|
+
|
|
516
|
+
assert!(service.get_connection_id(&client_conf.endpoint).is_some());
|
|
517
|
+
|
|
518
|
+
// disconnect
|
|
519
|
+
service
|
|
520
|
+
.disconnect(conn_id)
|
|
521
|
+
.expect("disconnect should succeed");
|
|
522
|
+
|
|
523
|
+
// allow cancellation token to propagate and stream to terminate
|
|
524
|
+
tokio::time::sleep(Duration::from_millis(200)).await;
|
|
525
|
+
|
|
526
|
+
// verify connection is removed from internal client mapping
|
|
527
|
+
assert!(
|
|
528
|
+
service.get_connection_id(&client_conf.endpoint).is_none(),
|
|
529
|
+
"client mapping should be removed after disconnect"
|
|
530
|
+
);
|
|
531
|
+
|
|
532
|
+
// verify connection is removed from connection table
|
|
533
|
+
assert!(
|
|
534
|
+
service
|
|
535
|
+
.message_processor
|
|
536
|
+
.connection_table()
|
|
537
|
+
.get(conn_id as usize)
|
|
538
|
+
.is_none(),
|
|
539
|
+
"connection should be removed after disconnect"
|
|
540
|
+
);
|
|
541
|
+
|
|
542
|
+
// verify disconnect log
|
|
543
|
+
assert!(logs_contain("disconnect from conn"));
|
|
544
|
+
}
|
|
545
|
+
|
|
472
546
|
#[tokio::test]
|
|
473
547
|
#[traced_test]
|
|
474
548
|
async fn test_service_publish_subscribe() {
|
|
@@ -2230,7 +2230,7 @@ mod tests {
|
|
|
2230
2230
|
#[tokio::test]
|
|
2231
2231
|
#[traced_test]
|
|
2232
2232
|
async fn test_full_join_and_leave() {
|
|
2233
|
-
let (tx_app, _) = tokio::sync::mpsc::
|
|
2233
|
+
let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
|
|
2234
2234
|
let (moderator_tx, mut moderator_rx) = tokio::sync::mpsc::channel(50);
|
|
2235
2235
|
let (participant_tx, mut participant_rx) = tokio::sync::mpsc::channel(50);
|
|
2236
2236
|
|
|
@@ -16,9 +16,10 @@ pub const SESSION_RANGE: std::ops::Range<u32> = 0..(u32::MAX - 1000);
|
|
|
16
16
|
pub const SESSION_UNSPECIFIED: u32 = u32::MAX;
|
|
17
17
|
|
|
18
18
|
/// Channel used in the path service -> app
|
|
19
|
-
pub(crate) type AppChannelSender =
|
|
19
|
+
pub(crate) type AppChannelSender =
|
|
20
|
+
tokio::sync::mpsc::UnboundedSender<Result<Message, SessionError>>;
|
|
20
21
|
/// Channel used in the path app -> service
|
|
21
|
-
pub type AppChannelReceiver = tokio::sync::mpsc::
|
|
22
|
+
pub type AppChannelReceiver = tokio::sync::mpsc::UnboundedReceiver<Result<Message, SessionError>>;
|
|
22
23
|
/// Channel used in the path service -> slim
|
|
23
24
|
pub type SlimChannelSender = tokio::sync::mpsc::Sender<Result<Message, Status>>;
|
|
24
25
|
|
|
@@ -174,7 +174,6 @@ mod tests {
|
|
|
174
174
|
async move {
|
|
175
175
|
if let Some(tx) = tx {
|
|
176
176
|
tx.send(msg)
|
|
177
|
-
.await
|
|
178
177
|
.map_err(|e| crate::SessionError::AppTransmission(e.to_string()))?;
|
|
179
178
|
}
|
|
180
179
|
Ok(())
|
|
@@ -216,7 +215,7 @@ mod tests {
|
|
|
216
215
|
// Verifies that a newly created context can upgrade its Weak reference to a strong Arc
|
|
217
216
|
// and exposes the expected session identity (id + type).
|
|
218
217
|
async fn context_new_and_upgrade() {
|
|
219
|
-
let (tx_app, rx_app) = mpsc::
|
|
218
|
+
let (tx_app, rx_app) = mpsc::unbounded_channel();
|
|
220
219
|
let session = build_session_with_app_tx(1, tx_app);
|
|
221
220
|
let ctx = SessionContext::new(session.clone(), rx_app);
|
|
222
221
|
assert!(ctx.session_arc().is_some());
|
|
@@ -228,7 +227,7 @@ mod tests {
|
|
|
228
227
|
// Validates spawn_receiver executes the provided closure on a background task and that
|
|
229
228
|
// the Weak<Session> captured inside can still be upgraded while the original Arc exists.
|
|
230
229
|
async fn context_spawn_receiver_runs_closure() {
|
|
231
|
-
let (tx_app, rx_app) = mpsc::
|
|
230
|
+
let (tx_app, rx_app) = mpsc::unbounded_channel();
|
|
232
231
|
let session = build_session_with_app_tx(3, tx_app);
|
|
233
232
|
let ctx = SessionContext::new(session.clone(), rx_app);
|
|
234
233
|
let flag = Arc::new(tokio::sync::Mutex::new(false));
|
|
@@ -246,7 +245,7 @@ mod tests {
|
|
|
246
245
|
// After spawning the receiver, dropping the last strong Arc should allow the Weak to
|
|
247
246
|
// observe session deallocation (upgrade returns None).
|
|
248
247
|
async fn context_spawn_receiver_drops_session() {
|
|
249
|
-
let (tx_app, rx_app) = mpsc::
|
|
248
|
+
let (tx_app, rx_app) = mpsc::unbounded_channel();
|
|
250
249
|
let session = build_session_with_app_tx(4, tx_app);
|
|
251
250
|
let ctx = SessionContext::new(session.clone(), rx_app);
|
|
252
251
|
let weak = ctx.spawn_receiver(|_rx, s| async move {
|
|
@@ -265,7 +264,7 @@ mod tests {
|
|
|
265
264
|
// Ensures the spawned receiver task (which only reads from rx) terminates once
|
|
266
265
|
// the session (and implicitly, in real usage, the channel sender owned by it) is dropped.
|
|
267
266
|
async fn context_spawn_receiver_task_finishes_on_session_drop() {
|
|
268
|
-
let (tx_app, rx_app) = mpsc::
|
|
267
|
+
let (tx_app, rx_app) = mpsc::unbounded_channel();
|
|
269
268
|
let session = build_session_with_app_tx(5, tx_app);
|
|
270
269
|
let ctx = SessionContext::new(session.clone(), rx_app);
|
|
271
270
|
let (done_tx, done_rx) = oneshot::channel();
|
|
@@ -21,6 +21,8 @@ pub enum SessionError {
|
|
|
21
21
|
AppTransmission(String),
|
|
22
22
|
#[error("error processing message: {0}")]
|
|
23
23
|
Processing(String),
|
|
24
|
+
#[error("error sending message to session: {0}")]
|
|
25
|
+
QueueFullError(String),
|
|
24
26
|
#[error("session id already used: {0}")]
|
|
25
27
|
SessionIdAlreadyUsed(String),
|
|
26
28
|
#[error("invalid session id: {0}")]
|
|
@@ -249,7 +249,7 @@ where
|
|
|
249
249
|
storage_path: std::path::PathBuf,
|
|
250
250
|
tx_session: tokio::sync::mpsc::Sender<Result<SessionLayerMessage, SessionError>>,
|
|
251
251
|
) -> Self {
|
|
252
|
-
let (tx, rx) = mpsc::channel(
|
|
252
|
+
let (tx, rx) = mpsc::channel(256);
|
|
253
253
|
|
|
254
254
|
let common = Common::new(
|
|
255
255
|
id,
|
|
@@ -388,7 +388,8 @@ where
|
|
|
388
388
|
}
|
|
389
389
|
let (msg, direction) = result.unwrap();
|
|
390
390
|
|
|
391
|
-
tracing::trace!("received message
|
|
391
|
+
tracing::trace!("received message {} {}", msg.get_session_message_type().as_str_name(), msg.get_id());
|
|
392
|
+
|
|
392
393
|
|
|
393
394
|
// process the messages for the channel endpoint first
|
|
394
395
|
match msg.get_session_header().session_message_type() {
|
|
@@ -687,11 +688,8 @@ async fn process_message_from_app<T>(
|
|
|
687
688
|
"error sending publication packet to slim on session {}",
|
|
688
689
|
session_id
|
|
689
690
|
);
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
)))
|
|
693
|
-
.await
|
|
694
|
-
.expect("error notifying app");
|
|
691
|
+
|
|
692
|
+
// no need to notify app here, the session will take care of retransmissions
|
|
695
693
|
}
|
|
696
694
|
|
|
697
695
|
// set timer for this message
|
|
@@ -977,10 +975,9 @@ where
|
|
|
977
975
|
message: Message,
|
|
978
976
|
direction: MessageDirection,
|
|
979
977
|
) -> Result<(), SessionError> {
|
|
980
|
-
self.tx
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
.map_err(|e| SessionError::Processing(e.to_string()))
|
|
978
|
+
self.tx.try_send(Ok((message, direction))).map_err(|e| {
|
|
979
|
+
SessionError::QueueFullError(format!("session={}, error={}", self.common.id(), e))
|
|
980
|
+
})
|
|
984
981
|
}
|
|
985
982
|
}
|
|
986
983
|
|
|
@@ -1060,7 +1057,7 @@ mod tests {
|
|
|
1060
1057
|
#[traced_test]
|
|
1061
1058
|
async fn test_multicast_create() {
|
|
1062
1059
|
let (tx_slim, _) = tokio::sync::mpsc::channel(1);
|
|
1063
|
-
let (tx_app, _) = tokio::sync::mpsc::
|
|
1060
|
+
let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
|
|
1064
1061
|
|
|
1065
1062
|
let tx = SessionTransmitter {
|
|
1066
1063
|
slim_tx: tx_slim.clone(),
|
|
@@ -1132,7 +1129,7 @@ mod tests {
|
|
|
1132
1129
|
#[traced_test]
|
|
1133
1130
|
async fn test_multicast_sender_and_receiver() {
|
|
1134
1131
|
let (tx_slim_sender, mut rx_slim_sender) = tokio::sync::mpsc::channel(1);
|
|
1135
|
-
let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::
|
|
1132
|
+
let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::unbounded_channel();
|
|
1136
1133
|
|
|
1137
1134
|
let tx_sender = SessionTransmitter {
|
|
1138
1135
|
slim_tx: tx_slim_sender,
|
|
@@ -1141,7 +1138,7 @@ mod tests {
|
|
|
1141
1138
|
};
|
|
1142
1139
|
|
|
1143
1140
|
let (tx_slim_receiver, _rx_slim_receiver) = tokio::sync::mpsc::channel(1);
|
|
1144
|
-
let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::
|
|
1141
|
+
let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::unbounded_channel();
|
|
1145
1142
|
|
|
1146
1143
|
let tx_receiver = SessionTransmitter {
|
|
1147
1144
|
slim_tx: tx_slim_receiver,
|
|
@@ -1234,7 +1231,7 @@ mod tests {
|
|
|
1234
1231
|
#[traced_test]
|
|
1235
1232
|
async fn test_multicast_rtx_timeouts() {
|
|
1236
1233
|
let (tx_slim, mut rx_slim) = tokio::sync::mpsc::channel(1);
|
|
1237
|
-
let (tx_app, mut rx_app) = tokio::sync::mpsc::
|
|
1234
|
+
let (tx_app, mut rx_app) = tokio::sync::mpsc::unbounded_channel();
|
|
1238
1235
|
|
|
1239
1236
|
let tx = SessionTransmitter {
|
|
1240
1237
|
slim_tx: tx_slim,
|
|
@@ -1322,7 +1319,7 @@ mod tests {
|
|
|
1322
1319
|
#[traced_test]
|
|
1323
1320
|
async fn test_multicast_rtx_reception() {
|
|
1324
1321
|
let (tx_slim, mut rx_slim) = tokio::sync::mpsc::channel(8);
|
|
1325
|
-
let (tx_app, _rx_app) = tokio::sync::mpsc::
|
|
1322
|
+
let (tx_app, _rx_app) = tokio::sync::mpsc::unbounded_channel();
|
|
1326
1323
|
|
|
1327
1324
|
let tx = SessionTransmitter {
|
|
1328
1325
|
slim_tx: tx_slim,
|
|
@@ -1425,8 +1422,8 @@ mod tests {
|
|
|
1425
1422
|
#[tokio::test]
|
|
1426
1423
|
#[traced_test]
|
|
1427
1424
|
async fn test_multicast_e2e_with_losses() {
|
|
1428
|
-
let (tx_slim_sender, mut rx_slim_sender) = tokio::sync::mpsc::channel(
|
|
1429
|
-
let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::
|
|
1425
|
+
let (tx_slim_sender, mut rx_slim_sender) = tokio::sync::mpsc::channel(3);
|
|
1426
|
+
let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::unbounded_channel();
|
|
1430
1427
|
|
|
1431
1428
|
let tx_sender = SessionTransmitter {
|
|
1432
1429
|
slim_tx: tx_slim_sender,
|
|
@@ -1434,8 +1431,8 @@ mod tests {
|
|
|
1434
1431
|
interceptors: Arc::new(parking_lot::RwLock::new(vec![])),
|
|
1435
1432
|
};
|
|
1436
1433
|
|
|
1437
|
-
let (tx_slim_receiver, mut rx_slim_receiver) = tokio::sync::mpsc::channel(
|
|
1438
|
-
let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::
|
|
1434
|
+
let (tx_slim_receiver, mut rx_slim_receiver) = tokio::sync::mpsc::channel(3);
|
|
1435
|
+
let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::unbounded_channel();
|
|
1439
1436
|
|
|
1440
1437
|
let tx_receiver = SessionTransmitter {
|
|
1441
1438
|
slim_tx: tx_slim_receiver,
|
|
@@ -1657,7 +1654,7 @@ mod tests {
|
|
|
1657
1654
|
#[traced_test]
|
|
1658
1655
|
async fn test_session_delete() {
|
|
1659
1656
|
let (tx_slim, _) = tokio::sync::mpsc::channel(1);
|
|
1660
|
-
let (tx_app, _) = tokio::sync::mpsc::
|
|
1657
|
+
let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
|
|
1661
1658
|
|
|
1662
1659
|
let tx = SessionTransmitter {
|
|
1663
1660
|
slim_tx: tx_slim,
|
|
@@ -209,26 +209,34 @@ where
|
|
|
209
209
|
#[async_trait]
|
|
210
210
|
impl timer::TimerObserver for AckTimerObserver {
|
|
211
211
|
async fn on_timeout(&self, message_id: u32, timeouts: u32) {
|
|
212
|
-
self
|
|
212
|
+
let res = self
|
|
213
|
+
.tx
|
|
213
214
|
.send(InternalMessage::TimerTimeout {
|
|
214
215
|
message_id,
|
|
215
216
|
timeouts,
|
|
216
217
|
ack: true,
|
|
217
218
|
})
|
|
218
|
-
.await
|
|
219
|
-
|
|
219
|
+
.await;
|
|
220
|
+
|
|
221
|
+
if let Err(e) = res {
|
|
222
|
+
error!("AckTimerObserver: failed to send timer timeout: {}", e);
|
|
223
|
+
}
|
|
220
224
|
}
|
|
221
225
|
|
|
222
226
|
async fn on_failure(&self, message_id: u32, timeouts: u32) {
|
|
223
227
|
// remove the state for the lost message
|
|
224
|
-
self
|
|
228
|
+
let res = self
|
|
229
|
+
.tx
|
|
225
230
|
.send(InternalMessage::TimerFailure {
|
|
226
231
|
message_id,
|
|
227
232
|
timeouts,
|
|
228
233
|
ack: true,
|
|
229
234
|
})
|
|
230
|
-
.await
|
|
231
|
-
|
|
235
|
+
.await;
|
|
236
|
+
|
|
237
|
+
if let Err(e) = res {
|
|
238
|
+
error!("AckTimerObserver: failed to send timer failure: {}", e);
|
|
239
|
+
}
|
|
232
240
|
}
|
|
233
241
|
|
|
234
242
|
async fn on_stop(&self, message_id: u32) {
|
|
@@ -239,26 +247,34 @@ impl timer::TimerObserver for AckTimerObserver {
|
|
|
239
247
|
#[async_trait]
|
|
240
248
|
impl timer::TimerObserver for RtxTimerObserver {
|
|
241
249
|
async fn on_timeout(&self, message_id: u32, timeouts: u32) {
|
|
242
|
-
self
|
|
250
|
+
let res = self
|
|
251
|
+
.tx
|
|
243
252
|
.send(InternalMessage::TimerTimeout {
|
|
244
253
|
message_id,
|
|
245
254
|
timeouts,
|
|
246
255
|
ack: false,
|
|
247
256
|
})
|
|
248
|
-
.await
|
|
249
|
-
|
|
257
|
+
.await;
|
|
258
|
+
|
|
259
|
+
if let Err(e) = res {
|
|
260
|
+
error!("RtxTimerObserver: failed to send timer timeout: {}", e);
|
|
261
|
+
}
|
|
250
262
|
}
|
|
251
263
|
|
|
252
264
|
async fn on_failure(&self, message_id: u32, timeouts: u32) {
|
|
253
265
|
// remove the state for the lost message
|
|
254
|
-
self
|
|
266
|
+
let res = self
|
|
267
|
+
.tx
|
|
255
268
|
.send(InternalMessage::TimerFailure {
|
|
256
269
|
message_id,
|
|
257
270
|
timeouts,
|
|
258
271
|
ack: false,
|
|
259
272
|
})
|
|
260
|
-
.await
|
|
261
|
-
|
|
273
|
+
.await;
|
|
274
|
+
|
|
275
|
+
if let Err(e) = res {
|
|
276
|
+
error!("RtxTimerObserver: failed to send timer failure: {}", e);
|
|
277
|
+
}
|
|
262
278
|
}
|
|
263
279
|
|
|
264
280
|
async fn on_stop(&self, message_id: u32) {
|
|
@@ -1085,7 +1101,7 @@ where
|
|
|
1085
1101
|
identity_verifier: V,
|
|
1086
1102
|
storage_path: std::path::PathBuf,
|
|
1087
1103
|
) -> Self {
|
|
1088
|
-
let (tx, rx) = mpsc::channel(
|
|
1104
|
+
let (tx, rx) = mpsc::channel(256);
|
|
1089
1105
|
|
|
1090
1106
|
// Common session stuff
|
|
1091
1107
|
let common = Common::new(
|
|
@@ -1297,8 +1313,7 @@ where
|
|
|
1297
1313
|
direction: MessageDirection,
|
|
1298
1314
|
) -> Result<(), SessionError> {
|
|
1299
1315
|
self.tx
|
|
1300
|
-
.
|
|
1301
|
-
.await
|
|
1316
|
+
.try_send(InternalMessage::OnMessage { message, direction })
|
|
1302
1317
|
.map_err(|e| SessionError::SessionClosed(e.to_string()))
|
|
1303
1318
|
}
|
|
1304
1319
|
}
|
|
@@ -1319,9 +1334,9 @@ mod tests {
|
|
|
1319
1334
|
#[tokio::test]
|
|
1320
1335
|
async fn test_point_to_point_create() {
|
|
1321
1336
|
let (tx_slim, _) = tokio::sync::mpsc::channel(1);
|
|
1322
|
-
let (tx_app, _) = tokio::sync::mpsc::
|
|
1337
|
+
let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
|
|
1323
1338
|
|
|
1324
|
-
let tx = SessionTransmitter::new(
|
|
1339
|
+
let tx = SessionTransmitter::new(tx_slim, tx_app);
|
|
1325
1340
|
|
|
1326
1341
|
let source = Name::from_strings(["cisco", "default", "local"]).with_id(0);
|
|
1327
1342
|
|
|
@@ -1346,9 +1361,9 @@ mod tests {
|
|
|
1346
1361
|
#[tokio::test]
|
|
1347
1362
|
async fn test_point_to_point_create_with_remote_dst() {
|
|
1348
1363
|
let (tx_slim, _) = tokio::sync::mpsc::channel(1);
|
|
1349
|
-
let (tx_app, _) = tokio::sync::mpsc::
|
|
1364
|
+
let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
|
|
1350
1365
|
|
|
1351
|
-
let tx = SessionTransmitter::new(
|
|
1366
|
+
let tx = SessionTransmitter::new(tx_slim, tx_app);
|
|
1352
1367
|
|
|
1353
1368
|
let source = Name::from_strings(["cisco", "default", "local"]).with_id(0);
|
|
1354
1369
|
let remote = Name::from_strings(["cisco", "default", "remote"]).with_id(999);
|
|
@@ -1371,7 +1386,7 @@ mod tests {
|
|
|
1371
1386
|
#[tokio::test]
|
|
1372
1387
|
async fn test_point_to_point_on_message() {
|
|
1373
1388
|
let (tx_slim, _rx_slim) = tokio::sync::mpsc::channel(1);
|
|
1374
|
-
let (tx_app, mut rx_app) = tokio::sync::mpsc::
|
|
1389
|
+
let (tx_app, mut rx_app) = tokio::sync::mpsc::unbounded_channel();
|
|
1375
1390
|
|
|
1376
1391
|
// SessionTransmitter::new expects (slim_tx, app_tx)
|
|
1377
1392
|
let tx = SessionTransmitter::new(tx_slim, tx_app);
|
|
@@ -1418,7 +1433,7 @@ mod tests {
|
|
|
1418
1433
|
#[tokio::test]
|
|
1419
1434
|
async fn test_point_to_point_on_message_with_ack() {
|
|
1420
1435
|
let (tx_slim, mut rx_slim) = tokio::sync::mpsc::channel(1);
|
|
1421
|
-
let (tx_app, mut rx_app) = tokio::sync::mpsc::
|
|
1436
|
+
let (tx_app, mut rx_app) = tokio::sync::mpsc::unbounded_channel();
|
|
1422
1437
|
|
|
1423
1438
|
let tx = SessionTransmitter::new(tx_slim, tx_app);
|
|
1424
1439
|
|
|
@@ -1479,7 +1494,7 @@ mod tests {
|
|
|
1479
1494
|
#[tokio::test]
|
|
1480
1495
|
async fn test_point_to_point_timers_until_error() {
|
|
1481
1496
|
let (tx_slim, mut rx_slim) = tokio::sync::mpsc::channel(1);
|
|
1482
|
-
let (tx_app, mut rx_app) = tokio::sync::mpsc::
|
|
1497
|
+
let (tx_app, mut rx_app) = tokio::sync::mpsc::unbounded_channel();
|
|
1483
1498
|
|
|
1484
1499
|
// SessionTransmitter::new expects (slim_tx, app_tx)
|
|
1485
1500
|
let tx = SessionTransmitter::new(tx_slim, tx_app);
|
|
@@ -1542,12 +1557,12 @@ mod tests {
|
|
|
1542
1557
|
#[tokio::test]
|
|
1543
1558
|
async fn test_point_to_point_timers_and_ack() {
|
|
1544
1559
|
let (tx_slim_sender, mut rx_slim_sender) = tokio::sync::mpsc::channel(1);
|
|
1545
|
-
let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::
|
|
1560
|
+
let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::unbounded_channel();
|
|
1546
1561
|
|
|
1547
1562
|
let tx_sender = SessionTransmitter::new(tx_slim_sender, tx_app_sender);
|
|
1548
1563
|
|
|
1549
1564
|
let (tx_slim_receiver, mut rx_slim_receiver) = tokio::sync::mpsc::channel(1);
|
|
1550
|
-
let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::
|
|
1565
|
+
let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::unbounded_channel();
|
|
1551
1566
|
|
|
1552
1567
|
let tx_receiver = SessionTransmitter::new(tx_slim_receiver, tx_app_receiver);
|
|
1553
1568
|
|
|
@@ -1663,9 +1678,9 @@ mod tests {
|
|
|
1663
1678
|
#[traced_test]
|
|
1664
1679
|
async fn test_session_delete() {
|
|
1665
1680
|
let (tx_slim, _) = tokio::sync::mpsc::channel(1);
|
|
1666
|
-
let (tx_app, _) = tokio::sync::mpsc::
|
|
1681
|
+
let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
|
|
1667
1682
|
|
|
1668
|
-
let tx = SessionTransmitter::new(
|
|
1683
|
+
let tx = SessionTransmitter::new(tx_slim, tx_app);
|
|
1669
1684
|
|
|
1670
1685
|
let source = Name::from_strings(["cisco", "default", "local"]).with_id(0);
|
|
1671
1686
|
|
|
@@ -1686,8 +1701,8 @@ mod tests {
|
|
|
1686
1701
|
}
|
|
1687
1702
|
|
|
1688
1703
|
async fn template_test_point_to_point_session(mls_enabled: bool) {
|
|
1689
|
-
let (sender_tx_slim, mut sender_rx_slim) = tokio::sync::mpsc::channel(
|
|
1690
|
-
let (sender_tx_app, _sender_rx_app) = tokio::sync::mpsc::
|
|
1704
|
+
let (sender_tx_slim, mut sender_rx_slim) = tokio::sync::mpsc::channel(16);
|
|
1705
|
+
let (sender_tx_app, _sender_rx_app) = tokio::sync::mpsc::unbounded_channel();
|
|
1691
1706
|
|
|
1692
1707
|
let sender_tx = SessionTransmitter {
|
|
1693
1708
|
slim_tx: sender_tx_slim,
|
|
@@ -1695,8 +1710,8 @@ mod tests {
|
|
|
1695
1710
|
interceptors: Arc::new(RwLock::new(Vec::new())),
|
|
1696
1711
|
};
|
|
1697
1712
|
|
|
1698
|
-
let (receiver_tx_slim, mut receiver_rx_slim) = tokio::sync::mpsc::channel(
|
|
1699
|
-
let (receiver_tx_app, mut receiver_rx_app) = tokio::sync::mpsc::
|
|
1713
|
+
let (receiver_tx_slim, mut receiver_rx_slim) = tokio::sync::mpsc::channel(16);
|
|
1714
|
+
let (receiver_tx_app, mut receiver_rx_app) = tokio::sync::mpsc::unbounded_channel();
|
|
1700
1715
|
|
|
1701
1716
|
let receiver_tx = SessionTransmitter {
|
|
1702
1717
|
slim_tx: receiver_tx_slim,
|
|
@@ -222,7 +222,7 @@ where
|
|
|
222
222
|
};
|
|
223
223
|
|
|
224
224
|
// Create a new transmitter with identity interceptors
|
|
225
|
-
let (app_tx, app_rx) = tokio::sync::mpsc::
|
|
225
|
+
let (app_tx, app_rx) = tokio::sync::mpsc::unbounded_channel();
|
|
226
226
|
let tx = SessionTransmitter::new(self.tx_slim.clone(), app_tx);
|
|
227
227
|
|
|
228
228
|
let identity_interceptor = Arc::new(IdentityInterceptor::new(
|