Create and handle Glowstone ServerConfig instances
Generally to configure Glowstone you edit YAML files, but that's not very
Clojure-y. This config munging below allows you to define config values as
inline EDN. The values in the config map that you provide to data-config
or server-config are keywords derived from the ServerConfig$Key enum,
see (keys config-keys)
Create and handle Glowstone ServerConfig instances Generally to configure Glowstone you edit YAML files, but that's not very Clojure-y. This config munging below allows you to define config values as inline EDN. The values in the config map that you provide to [[data-config]] or [[server-config]] are keywords derived from the `ServerConfig$Key` enum, see `(keys config-keys)`
Mapping from Clojure keyword to ServerConfig$Key enum entry.
Mapping from Clojure keyword to `ServerConfig$Key` enum entry.
(config-params opts)Convert a map using Clojure keywords to use ServerConfig$Key keys, the way
ServerConfig expects.
Convert a map using Clojure keywords to use `ServerConfig$Key` keys, the way `ServerConfig` expects.
(data-config opts)Creates an in-memory config based on the passed in data.
Makes sure all defaults are explicitly present in the map passed to ServerConfig, and overrides load/save to be no-ops.
Creates an in-memory config based on the passed in data. Makes sure all defaults are explicitly present in the map passed to ServerConfig, and overrides load/save to be no-ops.
All data encoded in the ServerConfig$Key enum as plain data.
All data encoded in the `ServerConfig$Key` enum as plain data.
(server-config {:keys [config-dir config-file]
:or {config-dir "config" config-file "glowstone.yml"}
:as config})Create a ServerConfig backed by a YAML file, takes the :config-dir and
:config-file (YAML), and optionally other config keys. Defaults to
config/glowstone.yml
Create a ServerConfig backed by a YAML file, takes the `:config-dir` and `:config-file` (YAML), and optionally other config keys. Defaults to `config/glowstone.yml`
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 |