Documentation
¶
Index ¶
- func GracefullyRemoveDockerContainer(ctx context.Context, containerID string) error
- func RemoveDockerContainer(ctx context.Context, containerID string) error
- func RemoveVolume(ctx context.Context, volumeID string) error
- func WaitForDockerContainer(ctx context.Context, containerID string, containerPort uint16) error
- type App
- type AppManager
- type Container
- func (c *Container) Remove(ctx context.Context) error
- func (c *Container) Start(ctx context.Context) error
- func (c *Container) Status(ctx context.Context) (string, error)
- func (c *Container) Stop(ctx context.Context) error
- func (c *Container) Upgrade(ctx context.Context, imageName, projectPath string, ...) (*Container, error)
- func (c *Container) Wait(ctx context.Context, port uint16) error
- type DeployRequest
- type DeployResponse
- type Deployment
- func (deployment *Deployment) NewDeploymentProxy() (*DeploymentProxy, error)
- func (d *Deployment) Remove(ctx context.Context) error
- func (d *Deployment) Start(ctx context.Context) error
- func (d *Deployment) Status(ctx context.Context) (string, error)
- func (d *Deployment) Stop(ctx context.Context) error
- func (deployment *Deployment) Upgrade(ctx context.Context, projectConfig pkg.ProjectConfig, imageName string, ...) error
- type DeploymentEvent
- type DeploymentLock
- type DeploymentProxy
- type FluxServer
- func (s *FluxServer) DaemonInfoHandler(w http.ResponseWriter, r *http.Request)
- func (s *FluxServer) DeleteAllDeploymentsHandler(w http.ResponseWriter, r *http.Request)
- func (s *FluxServer) DeleteDeployHandler(w http.ResponseWriter, r *http.Request)
- func (s *FluxServer) DeployHandler(w http.ResponseWriter, r *http.Request)
- func (s *FluxServer) ListAppsHandler(w http.ResponseWriter, r *http.Request)
- func (s *FluxServer) StartDeployHandler(w http.ResponseWriter, r *http.Request)
- func (s *FluxServer) Stop()
- func (s *FluxServer) StopDeployHandler(w http.ResponseWriter, r *http.Request)
- func (s *FluxServer) UploadAppCode(code io.Reader, projectConfig pkg.ProjectConfig) (string, error)
- type FluxServerConfig
- type Proxy
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoveDockerContainer ¶
RemoveContainer stops and removes a container, but be warned that this will not remove the container from the database
Types ¶
type App ¶
type App struct {
ID int64 `json:"id,omitempty"`
Deployment *Deployment `json:"-"`
Name string `json:"name,omitempty"`
DeploymentID int64 `json:"deployment_id,omitempty"`
}
type AppManager ¶
func (*AppManager) AddApp ¶
func (am *AppManager) AddApp(name string, app *App)
func (*AppManager) DeleteApp ¶
func (am *AppManager) DeleteApp(name string) error
func (*AppManager) GetAllApps ¶
func (am *AppManager) GetAllApps() []*App
func (*AppManager) GetApp ¶
func (am *AppManager) GetApp(name string) *App
func (*AppManager) Init ¶
func (am *AppManager) Init()
func (*AppManager) RemoveApp ¶
func (am *AppManager) RemoveApp(name string)
type Container ¶
type Container struct {
ID int64 `json:"id"`
Head bool `json:"head"` // if the container is the head of the deployment
Deployment *Deployment `json:"-"`
Volumes []Volume `json:"volumes"`
ContainerID [64]byte `json:"container_id"`
DeploymentID int64 `json:"deployment_id"`
}
func CreateContainer ¶
func CreateContainer(ctx context.Context, imageName, projectPath string, projectConfig pkg.ProjectConfig, head bool, deployment *Deployment) (c *Container, err error)
func CreateDockerContainer ¶
type DeployRequest ¶
type DeployResponse ¶
type DeployResponse struct {
App App `json:"app"`
}
type Deployment ¶
type Deployment struct {
ID int64 `json:"id"`
Head *Container `json:"head,omitempty"`
Containers []*Container `json:"containers,omitempty"`
Proxy *DeploymentProxy `json:"-"`
URL string `json:"url"`
Port uint16 `json:"port"`
}
func CreateDeployment ¶
Creates a deployment and containers in the database
func (*Deployment) NewDeploymentProxy ¶
func (deployment *Deployment) NewDeploymentProxy() (*DeploymentProxy, error)
func (*Deployment) Upgrade ¶
func (deployment *Deployment) Upgrade(ctx context.Context, projectConfig pkg.ProjectConfig, imageName string, projectPath string) error
type DeploymentEvent ¶
type DeploymentLock ¶
type DeploymentLock struct {
// contains filtered or unexported fields
}
func NewDeploymentLock ¶
func NewDeploymentLock() *DeploymentLock
func (*DeploymentLock) CompleteDeployment ¶
func (dt *DeploymentLock) CompleteDeployment(appName string)
func (*DeploymentLock) StartDeployment ¶
type DeploymentProxy ¶
type DeploymentProxy struct {
// contains filtered or unexported fields
}
func (*DeploymentProxy) GracefulShutdown ¶
func (dp *DeploymentProxy) GracefulShutdown(oldContainers []*Container)
type FluxServer ¶
type FluxServer struct {
Logger *zap.SugaredLogger
// contains filtered or unexported fields
}
var ( DefaultConfig = FluxServerConfig{ Builder: "paketobuildpacks/builder-jammy-tiny", Compression: pkg.Compression{ Enabled: false, Level: 0, }, } Flux *FluxServer )
func NewFluxServer ¶
func NewFluxServer() *FluxServer
func NewServer ¶
func NewServer() *FluxServer
func (*FluxServer) DaemonInfoHandler ¶
func (s *FluxServer) DaemonInfoHandler(w http.ResponseWriter, r *http.Request)
func (*FluxServer) DeleteAllDeploymentsHandler ¶
func (s *FluxServer) DeleteAllDeploymentsHandler(w http.ResponseWriter, r *http.Request)
func (*FluxServer) DeleteDeployHandler ¶
func (s *FluxServer) DeleteDeployHandler(w http.ResponseWriter, r *http.Request)
func (*FluxServer) DeployHandler ¶
func (s *FluxServer) DeployHandler(w http.ResponseWriter, r *http.Request)
func (*FluxServer) ListAppsHandler ¶
func (s *FluxServer) ListAppsHandler(w http.ResponseWriter, r *http.Request)
func (*FluxServer) StartDeployHandler ¶
func (s *FluxServer) StartDeployHandler(w http.ResponseWriter, r *http.Request)
func (*FluxServer) Stop ¶
func (s *FluxServer) Stop()
func (*FluxServer) StopDeployHandler ¶
func (s *FluxServer) StopDeployHandler(w http.ResponseWriter, r *http.Request)
func (*FluxServer) UploadAppCode ¶
func (s *FluxServer) UploadAppCode(code io.Reader, projectConfig pkg.ProjectConfig) (string, error)
type FluxServerConfig ¶
type FluxServerConfig struct {
Builder string `json:"builder"`
Compression pkg.Compression `json:"compression"`
}
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) AddDeployment ¶
func (p *Proxy) AddDeployment(deployment *Deployment)
func (*Proxy) RemoveDeployment ¶
func (p *Proxy) RemoveDeployment(deployment *Deployment)
Click to show internal directories.
Click to hide internal directories.