Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

otto-de/tesla-httpkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#tesla-httpkit

This library provides a component, that adds an embedded httpkit server to tesla-microservice.

Clojars Project

Build Status Dependencies Status

Configuration

The config :server-port will be used as port. Default is 8080. The config :server-binding will be used as binding. Default is "0.0.0.0".

For a full list, see server-config in "serving-with-httpkit.clj"

Metrics

When the server starts up, some metrics (gauges) are initialized using metrics-clojure-jvm.
If you don't want these metrics, just set :httpkit-metrics? to false.

Metrics-overview:

  • httpkit.executor.active-threads
  • httpkit.queue.size
  • httpkit.executor.completed-tasks

Usage

Because tesla-microservice is a provided dependency, you must always specify two dependencies in your project clj:

:dependencies [[de.otto/tesla-microservice "0.1.32"]
               [de.otto/tesla-httpkit "0.2.0"]]

Add the server to the base-system before starting it. Pass in additional dependencies of the server (e.g. :my-page):

  (system/start (serving-with-httpkit/add-server (system/base-system {}) :my-page))

Compatibility

Versions 0.1.0 and above of tesla-httpkit are compatible with versions 0.1.15 and above of tesla-microservice.

License

Apache License

About

embedded httpkit server for tesla microservice

Resources

License

Stars

Watchers

Forks

Packages

No packages published