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 *RelyXServerConfig, ts *gotel.OTelExporters, ) (*types.State, error)
NewState creates the handler state from config.
func SetupMiddlewares ¶
func SetupMiddlewares( ctx context.Context, conf *RelyXServerConfig, state *types.State, ts *gotel.OTelExporters, ) (chi.Middlewares, func(), error)
SetupMiddlewares sets up default middlewares and the shutdown function for the handler.
Types ¶
type RelyXRouterConfig ¶
type RelyXRouterConfig struct {
// Set the base path for all API handlers.
BasePath string `json:"basePath,omitempty" yaml:"basePath,omitempty" env:"RELYX_ROUTE_BASE_PATH"`
}
RelyXRouterConfig holds configurations of the rest handler.
type RelyXServerConfig ¶
type RelyXServerConfig struct {
Server gohttps.ServerConfig `json:"server" yaml:"server"`
Router RelyXRouterConfig `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:"RELYX_CONFIG_PATH"`
}
RelyXServerConfig holds information of required configurations to run the relyx server.
func LoadServerConfig ¶
func LoadServerConfig() (*RelyXServerConfig, error)
LoadServerConfig loads and parses configurations for [RelyAuthServerConfig].
func (RelyXServerConfig) GetConfigPath ¶
func (rlsc RelyXServerConfig) GetConfigPath() string
GetConfigPath returns the auth config path.
Click to show internal directories.
Click to hide internal directories.