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