Documentation ¶
Overview ¶
Package server handles the GraphQL HTTP server.
Index ¶
- Constants
- func ConfigFlags(cmd *cobra.Command, prefix string) error
- func DevCheck(isProd bool) httprouter.Handle
- func Enable(ctx context.Context, config *Config, router *httprouter.Router) error
- func ReadLobbies(p string) httprouter.Handle
- func ReadTreatments(p string) httprouter.Handle
- func WriteLobbies(p string) httprouter.Handle
- func WriteTreatments(p string) httprouter.Handle
- type Config
- type Server
Constants ¶
View Source
const DefaultAddr = ":3000"
Variables ¶
This section is empty.
Functions ¶
func ConfigFlags ¶
ConfigFlags helps configure cobra and viper flags.
func DevCheck ¶
func DevCheck(isProd bool) httprouter.Handle
func WriteLobbies ¶
func WriteLobbies(p string) httprouter.Handle
func WriteTreatments ¶
func WriteTreatments(p string) httprouter.Handle
Types ¶
type Config ¶
type Config struct { Addr string `mapstructure:"addr"` Treatments string `mapstructure:"treatments"` Lobbies string `mapstructure:"lobbies"` // Player frontend proxy ProxyAddr string `mapstructure:"proxyaddr"` Production bool `mapstructure:"-"` }
Config is server configuration.
Click to show internal directories.
Click to hide internal directories.