View Source ConfluentSchema.Server (confluent_schema v0.1.0)
Server to periodically fetch and cache the latest Confluent schemas.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Start a server to periodically fetch and cache Confluent schemas.
Used on test setup to block test until server has started.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec start_link(Keyword.t()) :: Supervisor.on_start()
Start a server to periodically fetch and cache Confluent schemas.
You can get credentials from Confluent Cloud: Login > Home > Environments. Or you can also spin off your own Confluent Schema Registry server.
options
Options
period
- Period to update schemas (optional, default 5 minutes)debug
- Enable debug logs (optional, default false)
confluentschemaregistry-options
ConfluentSchemaRegistry options
base_url
- URL of schema registry (optional, default "http://localhost:8081")username
- username for BasicAuth (optional)password
- password for BasicAuth (optional)adapter
- Tesla adapter config (optional)middleware
- List of additional ConfluentSchemaRegistry middlewares (optional)
example
Example
opts = [
base_url: "https://foobar.region.aws.confluent.cloud",
username: "key",
password: "secret"
]
children = [{ConfluentSchema.Server, opts}]
Supervisor.start_link(children, strategy: :one_for_one)
Used on test setup to block test until server has started.