A standalone HTTP server for Durable Streams, KV, or both. Pass :streams
and/or :kv to select the services. At least one is required.
Add {Slap.Server, opts} to an application's supervision tree, or run the
mix slap.server task under Mix. The slap application starts no listener
on boot. The supported setup has one Streams cluster and one KV cluster per VM.
:store- required, as forSlap.SlateDB.open/2::memory,{:local, dir}or{:url, "s3://bucket/prefix", options}. For S3, the endpoint and credentials can also come fromAWS_*variables. The streams' shards are understreams/in it, KV's underkv/.:streams-[shards: n, settings: settings, child_options: service_options, http: router_options]. The shard count defaults to 8 and is fixed for the life of the data. SeeSlap.Streams.Clusterfor service options.:kv- the same keys (default 8 shards). SeeSlap.KV.Clusterfor itschild_options:. Settings merge with each cluster's defaults, which setflush_intervalto 10 ms.:port(default 4437),:ip(default:loopback) - the listener.:strategy- run as one node of a cluster:{module, opts}, aSlap.Cluster.Strategy, for both clusters. The nodes must be connected with distributed Erlang; requests for a shard on another node are served there (:erpc). Without it every shard is on this node (Local).:peers- node names to stay connected to (Slap.Cluster.Peers).
The listener does not authenticate (see the routers).
Summary
Functions
A single supervisor child for the configured server.
Starts a supervisor for the configured clusters and listener.
Functions
@spec child_spec(keyword()) :: Supervisor.child_spec()
A single supervisor child for the configured server.
@spec start_link(keyword()) :: Supervisor.on_start()
Starts a supervisor for the configured clusters and listener.