ServerService

interface ServerService

Service interface for interacting with the server.

Functions

Link copied to clipboard
abstract fun createMappedRoute(mappedRoute: MappedRoute, onRequest: suspend (MappedRoute) -> MappedResponse)

Creates a mapped route.

Link copied to clipboard
abstract fun createMappedRoutes(mappedRoutes: List<MappedRoute>, onEachRequest: suspend (MappedRoute) -> MappedResponse)

Creates mapped routes based on a list.

Link copied to clipboard
abstract fun startGenericMappingRoute(onReceive: suspend (MappedRoute, MiddlewareAuthHeader?) -> String)

Starts the generic mapping route.

Link copied to clipboard
abstract fun startPreviewRoute(onReceive: (String, String) -> String)

Starts the preview route.

Link copied to clipboard
abstract fun startQueryAllRoutesRoute(onReceive: suspend (String) -> List<MappedRoute>)

Starts the query all routes route.

Link copied to clipboard
abstract fun stopServer()

Stops the server.