Documentation ¶
Overview ¶
Package app helps with configuring and starting server applications from Camlistore.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppHandler ¶
type AppHandler struct {
// contains filtered or unexported fields
}
AppHandler acts as a reverse proxy for a server application started by Camlistore. It can also serve some extra JSON configuration to the app.
func New ¶
func New(conf jsonconfig.Obj, serverBaseURL string) (*AppHandler, error)
New returns a configured AppHandler that Camlistore can use during server initialization as a handler that proxies request to an app. It is also used to start the app. The conf object has the following members, related to the vars described in doc/app-environment.text: "program", string, required. Name of the app's program. "baseURL", string, required. See CAMLI_APP_BASEURL. "server", string, optional, overrides the camliBaseURL argument. See CAMLI_SERVER. "appConfig", object, optional. Additional configuration that the app can request from Camlistore.
func (*AppHandler) Name ¶
func (a *AppHandler) Name() string
func (*AppHandler) ServeHTTP ¶
func (a *AppHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)
func (*AppHandler) Start ¶
func (a *AppHandler) Start() error