Documentation
¶
Index ¶
- type CICDConfig
- type CICDNotificationConfig
- type Executor
- func (e *Executor) CancelStack(ctx context.Context) error
- func (e *Executor) DeployClientStack(ctx context.Context) error
- func (e *Executor) DestroyClientStack(ctx context.Context) error
- func (e *Executor) DestroyParentStack(ctx context.Context) error
- func (e *Executor) ProvisionParentStack(ctx context.Context) error
- type OperationConfig
- type OperationScope
- type OperationType
- type ServerConfig
- type SignalHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CICDConfig ¶
type CICDConfig struct {
Type string `yaml:"type"`
Config struct {
Organization string `yaml:"organization"`
AuthToken string `yaml:"auth-token"`
Notifications CICDNotificationConfig `yaml:"notifications"`
} `yaml:"config"`
}
CICDConfig represents the CI/CD section in server.yaml
type CICDNotificationConfig ¶
type CICDNotificationConfig struct {
Slack struct {
WebhookURL string `yaml:"webhook-url"`
Enabled bool `yaml:"enabled"`
} `yaml:"slack"`
Discord struct {
WebhookURL string `yaml:"webhook-url"`
Enabled bool `yaml:"enabled"`
} `yaml:"discord"`
Telegram struct {
BotToken string `yaml:"bot-token"`
ChatID string `yaml:"chat-id"`
Enabled bool `yaml:"enabled"`
} `yaml:"telegram"`
}
CICDNotificationConfig represents notification configuration in server.yaml
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor handles GitHub Actions using only SC's internal APIs
func NewExecutor ¶
func NewExecutor(prov provisioner.Provisioner, log logger.Logger, gitRepo git.Repo) *Executor
NewExecutor creates a new GitHub Actions executor using only SC's internal APIs
func (*Executor) CancelStack ¶
CancelStack cancels a running stack operation using SC's internal APIs
func (*Executor) DeployClientStack ¶
DeployClientStack deploys a client stack using SC's internal APIs
func (*Executor) DestroyClientStack ¶
DestroyClientStack destroys a client stack using SC's internal APIs
func (*Executor) DestroyParentStack ¶
DestroyParentStack destroys a parent stack using SC's internal APIs
type OperationConfig ¶
type OperationConfig struct {
Type OperationType
Scope OperationScope
StackName string
Env string
Version string
SkipRefresh bool
}
OperationConfig defines the configuration for a stack operation
type OperationScope ¶
type OperationScope string
OperationScope defines whether this is a parent or client operation
const ( ScopeParent OperationScope = "parent" ScopeClient OperationScope = "client" )
type OperationType ¶
type OperationType string
OperationType defines the type of operation
const ( OperationDeploy OperationType = "deploy" OperationProvision OperationType = "provision" OperationDestroy OperationType = "destroy" )
type ServerConfig ¶
type ServerConfig struct {
CICD CICDConfig `yaml:"cicd"`
}
ServerConfig represents the relevant parts of server.yaml
type SignalHandler ¶
type SignalHandler struct {
// contains filtered or unexported fields
}
SignalHandler manages graceful shutdown and panic recovery for GitHub Actions operations
func NewSignalHandler ¶
func NewSignalHandler(logger logger.Logger, prov provisioner.Provisioner) *SignalHandler
NewSignalHandler creates a new signal handler for GitHub Actions
func (*SignalHandler) CancelAllOperations ¶
func (sh *SignalHandler) CancelAllOperations(ctx context.Context)
CancelAllOperations cancels all active operations (useful for global shutdown)
func (*SignalHandler) WithSignalHandling ¶
func (sh *SignalHandler) WithSignalHandling(ctx context.Context, opType operationType, params interface{}, operation func(context.Context) error) error
WithSignalHandling wraps a GitHub Actions operation with signal handling and panic recovery