Skip to main content

Module config

Module config 

Source
Expand description

ZLayer Plugin System - Host Interfaces

These interfaces define the capabilities that the ZLayer host provides to plugins. Plugins import these interfaces to access configuration, storage, logging, secrets, and metrics. Configuration interface for reading plugin and deployment config

Functions§

exists
Check if a configuration key exists
get
Get a configuration value by key Returns none if the key doesn’t exist
get_bool
Get a configuration value as a boolean Recognizes: “true”, “false”, “1”, “0”, “yes”, “no”
get_float
Get a configuration value as a float
get_int
Get a configuration value as an integer
get_many
Get multiple configuration values at once Returns list of (key, value) pairs for keys that exist
get_prefix
Get all configuration keys with a given prefix Example: get-prefix(“database.”) returns all database.* keys
get_required
Get a configuration value, returning error if not found

Type Aliases§

Error