Documentation
¶
Overview ¶
Package cli holds the application struct that service.MainCmd parses CLI args into, plus the Run entry-point that delegates to the injected server factory. The factory itself lives in pkg/factory; this package is import-free of factory to keep the dependency direction (main -> factory -> ...) intact.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Listen string `arg:"listen" default:"127.0.0.1:8788" env:"LISTEN" required:"true" usage:"address to listen to"`
// contains filtered or unexported fields
}
App is the application wired by main and parsed by service.MainCmd's argument tagger. Exported fields with tags are CLI args; unexported fields are dependencies injected by main.
func NewApp ¶
func NewApp(serverFactory ServerFactory) *App
NewApp constructs the App with the server factory injected.
type ServerFactory ¶
ServerFactory is the dep cli requires to start the HTTP listener. Satisfied by factory.CreateServer.