feat: add PawSQL docs examples and image CI
All checks were successful
Build and Push Image / docker-build-and-push (push) Successful in 2m28s
All checks were successful
Build and Push Image / docker-build-and-push (push) Successful in 2m28s
This commit is contained in:
38
internal/config/config.go
Normal file
38
internal/config/config.go
Normal file
@@ -0,0 +1,38 @@
|
||||
// Package config defines PawSQL's declarative runtime configuration.
|
||||
package config
|
||||
|
||||
import "time"
|
||||
|
||||
// Config is the typed representation of a Barkfile.
|
||||
type Config struct {
|
||||
Listen string
|
||||
TLS TLSConfig
|
||||
Databases []DatabaseConfig
|
||||
}
|
||||
|
||||
// TLSConfig identifies the certificate material used to terminate client TLS.
|
||||
type TLSConfig struct {
|
||||
CertFile string
|
||||
KeyFile string
|
||||
}
|
||||
|
||||
// DatabaseConfig describes one PostgreSQL database. Hostname is optional:
|
||||
// clients without TLS SNI route by the database's configured Name. Exactly one
|
||||
// of Upstream and Postgres must be configured.
|
||||
type DatabaseConfig struct {
|
||||
Name string
|
||||
Hostname string
|
||||
Upstream string
|
||||
Postgres *PostgresConfig
|
||||
}
|
||||
|
||||
// PostgresConfig declares a PawSQL-managed PostgreSQL container. IdleTimeout
|
||||
// starts after the last proxied client session closes. TrafficIdleTimeout
|
||||
// applies to open sessions with no proxied bytes. Zero disables either timeout.
|
||||
type PostgresConfig struct {
|
||||
Image string
|
||||
Volume string
|
||||
PasswordEnv string
|
||||
IdleTimeout time.Duration
|
||||
TrafficIdleTimeout time.Duration
|
||||
}
|
||||
Reference in New Issue
Block a user