Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config map[string]ServerConfig
type ConnectionHandler ¶
type EndpointConfig ¶
type EndpointConfig struct { PodData string `toml:"pod_data" default:"/podDataStructure"` OrderData string `toml:"order_data" default:"/orderStructures"` ProgramableBoards string `toml:"programable_boards" default:"/uploadableBoards"` Connections string `toml:"connections" default:"/backend"` Files string `toml:"files" default:"/"` }
type EndpointData ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func New ¶
func New(connections ConnectionHandler, data EndpointData, config Config) (*Handler, error)
func (*Handler) AddWebServer ¶
func (*Handler) ListenAndServe ¶
func (*Handler) RemoveServer ¶
type ServerConfig ¶
type ServerConfig struct { Addr string `toml:"address" default:"localhost:4000"` MaxConnections *int32 `toml:"client_limit,omitempty"` Endpoints EndpointConfig `toml:"endpoints"` StaticPath string `toml:"static" default:"./static"` }
type WebServer ¶
type WebServer struct {
// contains filtered or unexported fields
}
func NewWebServer ¶
func NewWebServer(name string, connectionHandle ConnectionHandler, staticData EndpointData, config ServerConfig) (*WebServer, error)
func (*WebServer) ListenAndServe ¶
Click to show internal directories.
Click to hide internal directories.