Documentation
¶
Index ¶
- Constants
- Variables
- func Check(filename, root string, out, errOut io.Writer) error
- func NewCommand(cfg *config.Config, globals *flags.Options) *cli.Command
- func NewHandler(root fs.FS) (http.Handler, error)
- func Run(ctx context.Context, args []string, appConfig config.Config, ...) error
- func Signal(appConfig config.Config, verb string, errOut io.Writer) error
- type Module
Constants ¶
const CoveragePath = "/debug/phpscript/coverage"
CoveragePath is where a running server publishes what it has counted so far.
A profile on disk needs a writable filesystem and a shutdown; a test flow wants the numbers while the server is still up, right after the suite that produced them. The endpoint answers that without either.
const DefaultDocumentRoot = "public"
DefaultDocumentRoot is the directory beneath an application root served over HTTP when the configuration names none.
const Name = "Run php server"
Name is the command title.
const SignalReload = "reload"
SignalReload is the one verb -s takes. nginx also has stop, quit and reopen; the first two are a kill with extra steps, and there are no log files to reopen.
Variables ¶
var ErrReported = errors.New("reported")
ErrReported ends the process non-zero without a second report: -t and -s have already printed what failed in their own words.
Functions ¶
func Check ¶ added in v0.6.0
Check is `phpscript -t`: it reports whatever would stop a server starting under filename, writes a verdict, and starts nothing.
func NewCommand ¶
NewCommand creates a new server command.
func NewHandler ¶ added in v0.2.0
NewHandler serves annotated project routes and files beneath public/.
Types ¶
type Module ¶
type Module struct {
platform.UnimplementedModule
// contains filtered or unexported fields
}
Module implements the platform.Module interface.