Documentation ¶
Index ¶
- func EnvInt(key string, def int) int
- func EnvString(key, def string) string
- func HandleSignals(shutdownc <-chan io.Closer)
- func MinimalContainer(port int, endpoint func() http.Handler, shutdown func() error)
- func NewManagerEndPoint(config Config) http.Handler
- func RunServer(server *http.Server, stop chan bool) (stopped chan bool)
- func RunUpdate(request *UpdateExecutableRequest) <-chan UpdateResult
- func SavePidFile(args ...string) (string, error)
- func ShutdownHook(h func() error) closeWrapper
- func StandardContainer(port int, endpoint func() http.Handler, shutdown func() error)
- func StartUpdateHandler(resp http.ResponseWriter, request *http.Request)
- type BuildInfoProvider
- type Config
- type Info
- type ShutdownSequence
- type UpdateExecutableRequest
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleSignals ¶
func MinimalContainer ¶
func NewManagerEndPoint ¶
func RunServer ¶
Runs the http server. This server offers more control than the standard go's default http server in that when a 'true' is sent to the stop channel, the listener is closed to force a clean shutdown.
func RunUpdate ¶
func RunUpdate(request *UpdateExecutableRequest) <-chan UpdateResult
func SavePidFile ¶
func ShutdownHook ¶
func ShutdownHook(h func() error) closeWrapper
func StandardContainer ¶
func StartUpdateHandler ¶
func StartUpdateHandler(resp http.ResponseWriter, request *http.Request)
Types ¶
type BuildInfoProvider ¶
type Config ¶
type Config struct {
BuildInfo BuildInfoProvider
}
func (*Config) InfoHandler ¶
func (config *Config) InfoHandler(resp http.ResponseWriter, request *http.Request)
type ShutdownSequence ¶
type UpdateExecutableRequest ¶
type UpdateExecutableRequest struct {
DownloadUrl string `json:"downloadUrl"`
}
type UpdateResult ¶
Click to show internal directories.
Click to hide internal directories.