(start! options)(start! http-handler options)Starts a new server.
options can contain:
:http-handler - ring http handler function
:websocket-endpoints - websocket endpoints (map-of string-endpoint handler-fns-map), where handler if can be of :message, :ping, :pong, :close, :error, :open, :http-upgrade. handler-fns-map can also contain 2 extra keys, :extensions, :subprotocols, which are sets of exts/subprotos acceptable by the server.
:grpc-services - vector of gRPC service descriptors. Each entry can be:
{:proto <Descriptors$FileDescriptor> :name "ServiceName" :methods {"Method" {:type :unary|:server-stream|:client-stream|:bidi :handler <fn>}}}GrpcService instance:unary/:server-stream take [request response-observer];
for :client-stream/:bidi take [response-observer] and return a StreamObserver.:host - host of the default socket
:port - port the server listens to, default to 8080
:default-socket - map-of :write-queue-length :backlog :max-payload-size :receive-buffer-size :connection-options(map-of :socket-receive-buffer-size :socket-send-buffer-size :socket-reuse-address :socket-keep-alive :tcp-no-delay :read-timeout :connect-timeout)
:tls - a io.helidon.nima.common.tls.Tls instance
Starts a new server.
`options` can contain:
* `:http-handler` - ring http handler function
* `:websocket-endpoints` - websocket endpoints (map-of string-endpoint handler-fns-map), where handler if can be of `:message`, `:ping`, `:pong`, `:close`, `:error`, `:open`, `:http-upgrade`. `handler-fns-map` can also contain 2 extra keys, `:extensions`, `:subprotocols`, which are sets of exts/subprotos acceptable by the server.
* `:grpc-services` - vector of gRPC service descriptors. Each entry can be:
- a map `{:proto <Descriptors$FileDescriptor> :name "ServiceName" :methods {"Method" {:type :unary|:server-stream|:client-stream|:bidi :handler <fn>}}}`
- a `GrpcService` instance
- a zero-arg fn returning a descriptor map
Handler fns for `:unary`/`:server-stream` take `[request response-observer]`;
for `:client-stream`/`:bidi` take `[response-observer]` and return a `StreamObserver`.
* `:host` - host of the default socket
* `:port` - port the server listens to, default to 8080
* `:default-socket` - map-of :write-queue-length :backlog :max-payload-size :receive-buffer-size `:connection-options`(map-of `:socket-receive-buffer-size` `:socket-send-buffer-size` `:socket-reuse-address` `:socket-keep-alive` `:tcp-no-delay` `:read-timeout` `:connect-timeout`)
* `:tls` - a `io.helidon.nima.common.tls.Tls` instance(stop! server)Stops server, noop if already stopped
Stops server, noop if already stopped
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |