Documentation ¶
Index ¶
- func GetRemoteAddr(ctx context.Context) string
- func RegisterOriginType(typeName string, originConfigConstructor func() OriginConfig)
- func UnregisterOriginType(typeName string)
- func WithProxyConnOnQueryReceived(...) func(opts *ProxyConnOptions)
- func WithProxyConnTLS(tlsConfig *tls.Config) func(opts *ProxyConnOptions)
- type CacheDatabaseConfig
- type CacheInfo
- type CacheWriter
- type CertificateConfig
- type Column
- type CommonOriginConfig
- type Config
- type Migrator
- type Notifier
- type Origin
- type OriginConfig
- type OriginNotFoundError
- type ProxyConn
- type ProxyConnOptions
- type ProxyConnection
- type Server
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRemoteAddr ¶
func RegisterOriginType ¶
func RegisterOriginType(typeName string, originConfigConstructor func() OriginConfig)
func UnregisterOriginType ¶
func UnregisterOriginType(typeName string)
func WithProxyConnTLS ¶
func WithProxyConnTLS(tlsConfig *tls.Config) func(opts *ProxyConnOptions)
Types ¶
type CacheDatabaseConfig ¶
type CacheDatabaseConfig struct { Host string `yaml:"host,omitempty"` Username string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` Port int `yaml:"port,omitempty"` Database string `yaml:"database,omitempty"` SSLMode string `yaml:"ssl_mode,omitempty"` }
func (*CacheDatabaseConfig) DSN ¶
func (cfg *CacheDatabaseConfig) DSN() string
type CacheWriter ¶
type CertificateConfig ¶
type CommonOriginConfig ¶
type CommonOriginConfig struct { ID string `yaml:"id"` Type string `yaml:"type"` TTL *time.Duration `yaml:"ttl"` OriginConfig OriginConfig `yaml:"-"` }
func (*CommonOriginConfig) NewOrigin ¶
func (cfg *CommonOriginConfig) NewOrigin() (Origin, error)
func (*CommonOriginConfig) Ristrict ¶
func (cfg *CommonOriginConfig) Ristrict() error
func (*CommonOriginConfig) UnmarshalYAML ¶
func (cfg *CommonOriginConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type Config ¶
type Config struct { RequiredVersion string `yaml:"required_version,omitempty"` CacheDatabase *CacheDatabaseConfig `yaml:"cache_database,omitempty"` Certificates []*CertificateConfig `yaml:"certificates,omitempty"` DefaultTTL time.Duration `yaml:"default_ttl,omitempty"` Origins []*CommonOriginConfig `yaml:"origins,omitempty"` // contains filtered or unexported fields }
func DefaultConfig ¶
func DefaultConfig() *Config
func (*Config) ValidateVersion ¶
ValidateVersion validates a version satisfies required_version.
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func NewMigrator ¶
func NewMigrator(cfg *CacheDatabaseConfig) *Migrator
func (*Migrator) ExecuteMigration ¶
func (*Migrator) GenerateCreateSchemaStmt ¶
type OriginConfig ¶
func GetOriginConfig ¶
func GetOriginConfig(typeName string) (OriginConfig, bool)
type OriginNotFoundError ¶
type OriginNotFoundError struct {
// contains filtered or unexported fields
}
func WrapOriginNotFoundError ¶
func WrapOriginNotFoundError(err error) *OriginNotFoundError
func (*OriginNotFoundError) Error ¶
func (onfe *OriginNotFoundError) Error() string
func (*OriginNotFoundError) Unwrap ¶
func (onfe *OriginNotFoundError) Unwrap() error
type ProxyConn ¶
type ProxyConn struct {
// contains filtered or unexported fields
}
func NewProxyConn ¶
type ProxyConnOptions ¶
type ProxyConnOptions struct {
// contains filtered or unexported fields
}
type ProxyConnection ¶
type ProxyConnection struct { *pgx.Conn // contains filtered or unexported fields }
func (*ProxyConnection) ID ¶
func (conn *ProxyConnection) ID() string
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) RunWithContext ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.