Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func XForwardedHostUnaryServerInterceptor ¶
func XForwardedHostUnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Types ¶
type AdminAPIConf ¶
type AdminAPIConf struct { // Enabled defines whether the admin API is enabled. Enabled bool `yaml:"enabled"` // AdminCredentials defines the admin user credentials. AdminCredentials *AdminCredentialsConf `yaml:"adminCredentials"` }
type AdminCredentialsConf ¶
type CORSConf ¶
type CORSConf struct { // Disabled sets whether CORS is disabled. Disabled bool `yaml:"enabled"` // AllowedOrigins is the contents of the allowed-origins header. AllowedOrigins []string `yaml:"allowedOrigins"` // AllowedHeaders is the contents of the allowed-headers header. AllowedHeaders []string `yaml:"allowedHeaders"` // MaxAge is the max age of the CORS preflight check.kk MaxAge time.Duration `yaml:"maxAge"` }
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
Codec implements the grpc Codec interface to delegate encoding to VT where possible.
type Conf ¶
type Conf struct { // HTTPListenAddr is the dedicated HTTP address. HTTPListenAddr string `yaml:"httpListenAddr"` // GRPCListenAddr is the dedicated GRPC address. GRPCListenAddr string `yaml:"grpcListenAddr"` // TLS defines the TLS configuration for the server. TLS *TLSConf `yaml:"tls"` // CORS defines the CORS configuration for the server. CORS CORSConf `yaml:"cors"` // MetricsEnabled defines whether the metrics endpoint is enabled. MetricsEnabled bool `yaml:"metricsEnabled"` // LogRequestPayloads defines whether the request payloads should be logged. LogRequestPayloads bool `yaml:"logRequestPayloads"` // PlaygroundEnabled defines whether the playground API is enabled. PlaygroundEnabled bool `yaml:"playgroundEnabled"` // AdminAPI defines the admin API configuration. AdminAPI AdminAPIConf `yaml:"adminAPI"` }
Conf holds configuration pertaining to the server.
func (*Conf) SetDefaults ¶
func (c *Conf) SetDefaults()
type TLSConf ¶
type TLSConf struct { // Cert is the path to the TLS certificate file. Cert string `yaml:"cert"` // Key is the path to the TLS private key file. Key string `yaml:"key"` // CACert is the path to the optional CA certificate for verifying client requests. CACert string `yaml:"caCert"` }
TLSConf holds TLS configuration.
Click to show internal directories.
Click to hide internal directories.