Documentation
¶
Index ¶
Constants ¶
View Source
const DynamicController = "dynamic"
View Source
const StaticController = "static"
Variables ¶
This section is empty.
Functions ¶
func NewSocketFCGIServer ¶
func NewSocketFCGIServer(config ControllerConfig, path, owner, group string) error
func NewTCPFCGIServer ¶
func NewTCPFCGIServer(config ControllerConfig, ipAddr string, port int) error
Types ¶
type ControllerConfig ¶
type ControllerConfig struct {
Deployment string
ContainerImage string
ContainerImageTag string
ContainerPort int
ContainerAmount int
Type string
DynIdleSeconds int
}
func DefaultConfig ¶
func DefaultConfig(deployment, image, tag string, port int) ControllerConfig
type ReqController ¶
type ReqController struct {
DockerCli docker.Client
Config ControllerConfig
Containers []Container
ContainerNo int
LastReq time.Time
Lock *sync.RWMutex
}
func NewReqController ¶
func NewReqController(conf ControllerConfig) (ReqController, error)
func (*ReqController) Close ¶
func (s *ReqController) Close() error
func (*ReqController) Init ¶
func (s *ReqController) Init() error
func (*ReqController) ServeHTTP ¶
func (s *ReqController) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.