fpm

package
v0.0.0-...-9d0e97a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2021 License: MIT Imports: 13 Imported by: 0

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 Container

type Container struct {
	Name    string
	Id      string
	Started bool
	Dirty   bool
	IPAddr  string
}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL