Documentation
¶
Index ¶
- type Config
- type Instance
- func (instance *Instance) Context() context.Context
- func (instance *Instance) Done() <-chan struct{}
- func (instance *Instance) Handler() http.Handler
- func (instance *Instance) ListenAndServe(binding string) error
- func (instance *Instance) ListenAndServeTLS(binding string, certFile, keyFile string) error
- func (instance *Instance) Server() *server.Server
- func (instance *Instance) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config description for new trusted-cgi instance.
func (*Config) New ¶
New instance of trusted-cgi using defaults storages and implementations. Also initializes SSH key (if enabled). Starts supporting go-routines that will be stopped when context will be canceled. The Done() channel can be used to determinate sub-routine termination. Global context could be nil - the Background will be used.
type Instance ¶
type Instance struct {
Location string // location as-is it used during initialization
// contains filtered or unexported fields
}
func (*Instance) Done ¶
func (instance *Instance) Done() <-chan struct{}
Returns channel that will be closed once all sub-routine (tracker dump and scheduler) finished.
func (*Instance) Handler ¶
Creates (every time new) server handlers (see Server::Handlers) using local (cancelable) context.
func (*Instance) ListenAndServe ¶
Listen and serves using provided binding - simple wrapper around Handler and http.Listen. Will shutdown in case of context cancel.
func (*Instance) ListenAndServeTLS ¶
Listen and serves using provided binding using TLS - simple wrapper around Handler and http.ListenTLS. Will shutdown in case of context cancel.