Documentation
¶
Overview ¶
Package config defines configurations to start the server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewState ¶
func NewState( ctx context.Context, conf *RelixyServerConfig, ts *gotel.OTelExporters, ) (*types.State, error)
NewState creates the handler state from config.
func SetupMiddlewares ¶
func SetupMiddlewares( ctx context.Context, conf *RelixyServerConfig, state *types.State, ts *gotel.OTelExporters, ) (chi.Middlewares, func(), error)
SetupMiddlewares sets up default middlewares and the shutdown function for the handler.
Types ¶
type RelixyRouterConfig ¶
type RelixyRouterConfig struct {
// Set the base path for all API handlers.
BasePath string `json:"basePath,omitempty" yaml:"basePath,omitempty" env:"RELIXY_ROUTE_BASE_PATH"`
}
RelixyRouterConfig holds configurations of the rest handler.
type RelixyServerConfig ¶
type RelixyServerConfig struct {
Server gohttps.ServerConfig `json:"server" yaml:"server"`
Router RelixyRouterConfig `json:"router,omitempty" yaml:"router"`
Telemetry gotel.OTLPConfig `json:"telemetry" yaml:"telemetry"`
Auth auth.RelyAuthConfig `json:"auth" yaml:"auth"`
ConfigPath string `json:"configPath" yaml:"configPath" env:"RELIXY_CONFIG_PATH"`
}
RelixyServerConfig holds information of required configurations to run the relixy server.
func LoadServerConfig ¶
func LoadServerConfig() (*RelixyServerConfig, error)
LoadServerConfig loads and parses configurations for [RelyAuthServerConfig].
func (RelixyServerConfig) GetConfigPath ¶
func (rlsc RelixyServerConfig) GetConfigPath() string
GetConfigPath returns the auth config path.
Click to show internal directories.
Click to hide internal directories.