Skip to main content

linkrs_server/
lib.rs

1//! Linkrs network service layer (HTTP/gRPC).
2//!
3//! Standalone server crate decoupled from the programmatic API
4//! (`linkrs-api`) and the wire contract (`linkrs-wire`). The service
5//! exposes the core API over HTTP/gRPC and the web management interface.
6
7pub use linkrs_api as api;
8pub use linkrs_config as config;
9pub use linkrs_core as core;
10pub use linkrs_query as query;
11
12pub mod storage {
13    pub use linkrs_storage::*;
14
15    #[cfg(test)]
16    pub use linkrs_storage::MockStorage;
17}
18
19// Network service modules (moved from `linkrs-api::api::server`).
20pub mod http_server;
21mod shutdown;
22pub mod startup;
23pub mod value;
24
25#[cfg(feature = "vector")]
26pub mod vector_metrics;
27
28// Server sub-modules
29pub mod auth;
30pub mod batch;
31pub mod client;
32pub mod graph_service;
33#[cfg(feature = "grpc")]
34pub mod grpc;
35pub mod http;
36pub mod permission;
37pub mod session;
38pub mod web;
39
40pub use auth::{Authenticator, PasswordAuthenticator};
41pub use batch::BatchManager;
42pub use client::{ClientSession, Session};
43pub use graph_service::GraphService;
44#[cfg(feature = "grpc")]
45pub use grpc::{run_server, LinkrsService};
46pub use http::HttpServer;
47pub use permission::{Permission, PermissionChecker, PermissionManager, RoleType};
48pub use session::GraphSessionManager;
49pub use web::WebState;
50
51#[cfg(feature = "grpc")]
52pub use http_server::start_http_and_grpc_servers;
53pub use http_server::start_http_server;
54pub use shutdown::shutdown_signal;
55pub use startup::{
56    execute_query, start_service, start_service_with_config, start_service_with_config_path,
57};