Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlueGreenManager ¶
type BlueGreenManager struct {
// contains filtered or unexported fields
}
BlueGreenManager manages blue-green deployments
func NewBlueGreenManager ¶
func NewBlueGreenManager(initialColor string, bluePort, greenPort int) *BlueGreenManager
NewBlueGreenManager creates a new blue-green deployment manager
func (*BlueGreenManager) GetStatus ¶
func (bgm *BlueGreenManager) GetStatus() BlueGreenStatus
GetStatus returns the current blue-green deployment status
func (*BlueGreenManager) RegisterHandlers ¶
func (bgm *BlueGreenManager) RegisterHandlers(mux *http.ServeMux)
RegisterHandlers registers blue-green HTTP handlers
func (*BlueGreenManager) Switch ¶
func (bgm *BlueGreenManager) Switch(ctx context.Context, req SwitchRequest) (*SwitchResponse, error)
Switch switches the active deployment from current to target color
type BlueGreenStatus ¶
type BlueGreenStatus struct {
CurrentActive string `json:"current_active"`
Blue DeploymentColor `json:"blue"`
Green DeploymentColor `json:"green"`
CanSwitch bool `json:"can_switch"`
SwitchMessage string `json:"switch_message,omitempty"`
}
BlueGreenStatus represents the current blue-green deployment status
type DeploymentColor ¶
type DeploymentColor struct {
Color string `json:"color"`
Port int `json:"port"`
Version string `json:"version"`
Active bool `json:"active"`
Healthy bool `json:"healthy"`
NodeCount uint64 `json:"node_count"`
EdgeCount uint64 `json:"edge_count"`
LastChecked time.Time `json:"last_checked"`
}
DeploymentColor represents a deployment environment
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
HealthChecker performs health checks on deployments
func (*HealthChecker) Check ¶
func (hc *HealthChecker) Check(port int) bool
Check performs a health check on the given port
func (*HealthChecker) FetchVersion ¶
func (hc *HealthChecker) FetchVersion(baseURL string) (string, error)
FetchVersion fetches the version from a deployment's health endpoint
Click to show internal directories.
Click to hide internal directories.