56 lines
1.4 KiB
TypeScript
56 lines
1.4 KiB
TypeScript
// Server-tier package — uses node:http (Node-only). Browser consumers cannot use this package.
|
|
|
|
// Errors
|
|
export {
|
|
NET_LIBP2P_SERVER_CODES,
|
|
NetLibp2pServerError,
|
|
type NetLibp2pServerErrorCode,
|
|
} from "./errors/errors.js";
|
|
// Health
|
|
export {
|
|
buildHealthResponse,
|
|
classifyHealthRequest,
|
|
HEALTH_PATHS,
|
|
type HealthKind,
|
|
type HealthPath,
|
|
type HealthResponse,
|
|
type HealthSnapshot,
|
|
handleHealth,
|
|
} from "./health/health.js";
|
|
// OTel
|
|
export {
|
|
adjustActivePeers,
|
|
type ConnectionOutcome,
|
|
recordConnection,
|
|
recordRelayedStream,
|
|
recordStartDuration,
|
|
withStartSpan,
|
|
withStopSpan,
|
|
} from "./otel/otel.js";
|
|
// Server
|
|
export { listenHttp } from "./server/health-listener.js";
|
|
export {
|
|
type PeerEventsBinding,
|
|
type PeerEventsContext,
|
|
unwirePeerEvents,
|
|
wirePeerEvents,
|
|
} from "./server/peer-events.js";
|
|
export { Libp2pServer } from "./server/server.js";
|
|
// Types
|
|
export type {
|
|
Libp2pServerConfig,
|
|
Libp2pServerEventMap,
|
|
Libp2pServerFactory,
|
|
Libp2pServerFactoryConfig,
|
|
Libp2pServerNodeLike,
|
|
Libp2pServerPeerConnectedEvent,
|
|
Libp2pServerPeerDisconnectedEvent,
|
|
Libp2pServerRelayStreamEvent,
|
|
Libp2pServerStartedEvent,
|
|
Libp2pServerStartResult,
|
|
Libp2pServerStoppedEvent,
|
|
ResolvedLibp2pServerConfig,
|
|
} from "./types/types.js";
|
|
// Schemas
|
|
export { Libp2pServerConfigSchema } from "./types/types.schemas.js";
|