Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMissingGuardRailsAPIHost = errors.New("missing mandatory GUARDRAILS_API_HOST environment variables.")
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { HttpClient *HttpClientConfig GuardRailsClient *GuardRailsClient }
Config provides centralized configuration for the application.
type GuardRailsClient ¶
type GuardRailsClient struct {
APIHost string
}
GuardRailsClient contains configuration for guardrails client.
func NewGuardRailsClientConfig ¶
func NewGuardRailsClientConfig() *GuardRailsClient
type HttpClientConfig ¶
type HttpClientConfig struct { // PollingInterval define how long the client should wait before attempting to connect to API server. PollingInterval time.Duration // Timeout define maximum waiting time allowed for http connections before it considered timeout. Timeout time.Duration // RetryTimeout define maximum waiting time of doing backoff retry in case client get unexpected response from API server. RetryTimeout time.Duration }
HttpClientConfig provides configuration for guardrails cli http client.
Click to show internal directories.
Click to hide internal directories.