{"modulePath":"github.com/mutablelogic/go-server","version":"v1.4.2","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package httpserver\n\nThe \\`httpserver\\` task implements a server which can serve requests over HTTP, HTTPS and FCGI\n\n## Types\n\n```go\ntype Config struct {\n\tListen string `hcl:\"listen\" description:\"Network address and port to listen on, or path to file socket\"`\n\tTLS    struct {\n\t\tKey  string `hcl:\"key\" description:\"Path to private key (if provided, tls.cert is also required)\"`\n\t\tCert string `hcl:\"cert\" description:\"Path to certificate (if provided, tls.key is also required)\"`\n\t} `hcl:\"tls\"`\n\tTimeout time.Duration `hcl:\"timeout\" description:\"Read request timeout\"`\n\tOwner   string        `hcl:\"owner\" description:\"User ID of the file socket (if listen is a file socket)\"`\n\tGroup   string        `hcl:\"group\" description:\"Group ID of the file socket (if listen is a file socket)\"`\n\tRouter  http.Handler  `hcl:\"router\" description:\"HTTP router for requests\"`\n}\n```\nServer configuration\n\n```go\nfunc (Config) Description() string\n```\nDescription returns the description of the service\n\n```go\nfunc (Config) Name() string\n```\nName returns the name of the service\n\n```go\nfunc (c Config) New() (server.Task, error)\n```\nCreate a new http server from the configuration\n\n```go\nfunc (c Config) String() string\n```\nReturn the configuration as a string\n\n```go\ntype Server interface {\n\tserver.Task\n\n\t// Return the type of server (http, https or fcgi)\n\tType() string\n\n\t// Return the listening address or path\n\tAddr() string\n\n\t// Return the router associated with the server\n\tRouter() http.Handler\n}\n```\nServer interface\n\n","path":"github.com/mutablelogic/go-server/pkg/httpserver","name":"httpserver","synopsis":"The `httpserver` task implements a server which can serve requests over HTTP, HTTPS and FCGI","isRedistributable":true}
