Documentation
¶
Overview ¶
Package module defines core interfaces for the workflow engine
Index ¶
- Constants
- Variables
- func BuildDeleteSQL(table string, where string, whereArgs ...any) (string, []any, error)
- func BuildInsertSQL(table string, data map[string]any) (string, []any, error)
- func BuildUpdateSQL(table string, data map[string]any, where string, whereArgs ...any) (string, []any, error)
- func CalculateBackoff(initialBackoff time.Duration, multiplier float64, maxBackoff time.Duration, ...) time.Duration
- func CreateIsolatedApp(t *testing.T) modular.Application
- func DefaultSummaryFields() []string
- func DefaultTransitionMap() map[string]string
- func ExpandEnvString(s string) string
- func GatewayTimeout(route *GatewayRoute, defaultTimeout time.Duration) time.Duration
- func GetRequestID(ctx context.Context) string
- func RegisterAdminSchemas(gen *OpenAPIGenerator)
- func SkipTestWithContext(ctx context.Context, skip bool) context.Context
- func StepTopic(workflowType, stepName, lifecycle string) string
- func WorkflowTopic(workflowType, lifecycle string) string
- type AIClassifyStep
- type AICompleteStep
- type AIExtractStep
- type APIGateway
- func (g *APIGateway) Handle(w http.ResponseWriter, r *http.Request)
- func (g *APIGateway) Init(_ modular.Application) error
- func (g *APIGateway) Name() string
- func (g *APIGateway) ProvidesServices() []modular.ServiceProvider
- func (g *APIGateway) RequiresServices() []modular.ServiceDependency
- func (g *APIGateway) Routes() []GatewayRoute
- func (g *APIGateway) SetAuth(cfg *AuthConfig)
- func (g *APIGateway) SetCORS(cfg *CORSConfig)
- func (g *APIGateway) SetGlobalRateLimit(cfg *RateLimitConfig)deprecated
- func (g *APIGateway) SetRateLimit(cfg *RateLimitConfig)
- func (g *APIGateway) SetRoutes(routes []GatewayRoute) error
- func (g *APIGateway) Start(_ context.Context) error
- func (g *APIGateway) Stop(_ context.Context) error
- type APIGatewayOption
- type AWSAPIGateway
- func (a *AWSAPIGateway) APIID() string
- func (a *AWSAPIGateway) Init(_ modular.Application) error
- func (a *AWSAPIGateway) Name() string
- func (a *AWSAPIGateway) ProvidesServices() []modular.ServiceProvider
- func (a *AWSAPIGateway) Region() string
- func (a *AWSAPIGateway) RequiresServices() []modular.ServiceDependency
- func (a *AWSAPIGateway) SetConfig(region, apiID, stage string)
- func (a *AWSAPIGateway) Stage() string
- func (a *AWSAPIGateway) Start(_ context.Context) error
- func (a *AWSAPIGateway) Stop(_ context.Context) error
- func (a *AWSAPIGateway) SyncRoutes(routes []GatewayRoute) error
- type AWSConfigProvider
- type ApigwApplyStep
- type ApigwDestroyStep
- type ApigwPlanStep
- type ApigwStatusStep
- type AppContainerModule
- func (m *AppContainerModule) Deploy() (*AppDeployResult, error)
- func (m *AppContainerModule) Init(app modular.Application) error
- func (m *AppContainerModule) Manifests() (any, error)
- func (m *AppContainerModule) Name() string
- func (m *AppContainerModule) ProvidesServices() []modular.ServiceProvider
- func (m *AppContainerModule) RequiresServices() []modular.ServiceDependency
- func (m *AppContainerModule) Rollback() (*AppDeployResult, error)
- func (m *AppContainerModule) Spec() AppContainerSpec
- func (m *AppContainerModule) Status() (*AppDeployResult, error)
- type AppContainerSpec
- type AppDeployResult
- type AppDeployStep
- type AppRollbackStep
- type AppStatusStep
- type ArgoContainer
- type ArgoDAGTask
- type ArgoDeleteStep
- type ArgoListStep
- type ArgoLogsStep
- type ArgoStatusStep
- type ArgoSubmitStep
- type ArgoTemplate
- type ArgoWorkflowSpec
- type ArgoWorkflowState
- type ArgoWorkflowsModule
- func (m *ArgoWorkflowsModule) Apply() (*PlatformResult, error)
- func (m *ArgoWorkflowsModule) DeleteWorkflow(workflowName string) error
- func (m *ArgoWorkflowsModule) Destroy() error
- func (m *ArgoWorkflowsModule) Init(app modular.Application) error
- func (m *ArgoWorkflowsModule) ListWorkflows(labelSelector string) ([]string, error)
- func (m *ArgoWorkflowsModule) Name() string
- func (m *ArgoWorkflowsModule) Plan() (*PlatformPlan, error)
- func (m *ArgoWorkflowsModule) ProvidesServices() []modular.ServiceProvider
- func (m *ArgoWorkflowsModule) RequiresServices() []modular.ServiceDependency
- func (m *ArgoWorkflowsModule) Status() (any, error)
- func (m *ArgoWorkflowsModule) SubmitWorkflow(spec *ArgoWorkflowSpec) (string, error)
- func (m *ArgoWorkflowsModule) WorkflowLogs(workflowName string) ([]string, error)
- func (m *ArgoWorkflowsModule) WorkflowStatus(workflowName string) (string, error)
- type ArtifactDeleteStep
- type ArtifactDownloadStep
- type ArtifactFSConfig
- type ArtifactFSModule
- func (m *ArtifactFSModule) Delete(_ context.Context, key string) error
- func (m *ArtifactFSModule) Download(_ context.Context, key string) (io.ReadCloser, map[string]string, error)
- func (m *ArtifactFSModule) Exists(_ context.Context, key string) (bool, error)
- func (m *ArtifactFSModule) Init(app modular.Application) error
- func (m *ArtifactFSModule) List(_ context.Context, prefix string) ([]ArtifactInfo, error)
- func (m *ArtifactFSModule) Name() string
- func (m *ArtifactFSModule) ProvidesServices() []modular.ServiceProvider
- func (m *ArtifactFSModule) RequiresServices() []modular.ServiceDependency
- func (m *ArtifactFSModule) Start(_ context.Context) error
- func (m *ArtifactFSModule) Stop(_ context.Context) error
- func (m *ArtifactFSModule) Upload(_ context.Context, key string, reader io.Reader, metadata map[string]string) error
- type ArtifactInfo
- type ArtifactListStep
- type ArtifactOutput
- type ArtifactPullStep
- type ArtifactPushStep
- type ArtifactS3Config
- type ArtifactS3Module
- func (m *ArtifactS3Module) Delete(ctx context.Context, key string) error
- func (m *ArtifactS3Module) Download(ctx context.Context, key string) (io.ReadCloser, map[string]string, error)
- func (m *ArtifactS3Module) Exists(ctx context.Context, key string) (bool, error)
- func (m *ArtifactS3Module) Init(app modular.Application) error
- func (m *ArtifactS3Module) List(ctx context.Context, prefix string) ([]ArtifactInfo, error)
- func (m *ArtifactS3Module) Name() string
- func (m *ArtifactS3Module) ProvidesServices() []modular.ServiceProvider
- func (m *ArtifactS3Module) RequiresServices() []modular.ServiceDependency
- func (m *ArtifactS3Module) Start(ctx context.Context) error
- func (m *ArtifactS3Module) Stop(_ context.Context) error
- func (m *ArtifactS3Module) Upload(ctx context.Context, key string, reader io.Reader, metadata map[string]string) error
- type ArtifactStore
- type ArtifactUploadStep
- type AuthConfig
- type AuthMiddleware
- func (m *AuthMiddleware) AddProvider(validTokens map[string]map[string]any)
- func (m *AuthMiddleware) Init(app modular.Application) error
- func (m *AuthMiddleware) Name() string
- func (m *AuthMiddleware) Process(next http.Handler) http.Handler
- func (m *AuthMiddleware) ProvidesServices() []modular.ServiceProvider
- func (m *AuthMiddleware) RegisterProvider(provider AuthProvider)
- func (m *AuthMiddleware) RequiresServices() []modular.ServiceDependency
- func (m *AuthMiddleware) Start(ctx context.Context) error
- func (m *AuthMiddleware) Stop(ctx context.Context) error
- type AuthProvider
- type BuildBinaryStep
- type BuildFromConfigStep
- type BuildUIStep
- type CORSConfig
- type CORSMiddleware
- func (m *CORSMiddleware) Init(app modular.Application) error
- func (m *CORSMiddleware) Name() string
- func (m *CORSMiddleware) Process(next http.Handler) http.Handler
- func (m *CORSMiddleware) ProvidesServices() []modular.ServiceProvider
- func (m *CORSMiddleware) RequiresServices() []modular.ServiceDependency
- func (m *CORSMiddleware) Start(ctx context.Context) error
- func (m *CORSMiddleware) Stop(ctx context.Context) error
- type CacheDeleteStep
- type CacheGetStep
- type CacheModule
- type CacheSetStep
- type CircuitBreakerStep
- type CircuitState
- type CloudAccount
- func (m *CloudAccount) AWSConfig(ctx context.Context) (aws.Config, error)
- func (m *CloudAccount) GetCredentials(_ context.Context) (*CloudCredentials, error)
- func (m *CloudAccount) Init(app modular.Application) error
- func (m *CloudAccount) Name() string
- func (m *CloudAccount) Provider() string
- func (m *CloudAccount) ProvidesServices() []modular.ServiceProvider
- func (m *CloudAccount) Region() string
- func (m *CloudAccount) RequiresServices() []modular.ServiceDependency
- func (m *CloudAccount) ValidateCredentials(ctx context.Context) error
- type CloudCredentialProvider
- type CloudCredentials
- type CloudValidateStep
- type CodeBuildBuild
- type CodeBuildCreateProjectStep
- type CodeBuildDeleteProjectStep
- type CodeBuildListBuildsStep
- type CodeBuildLogsStep
- type CodeBuildModule
- func (m *CodeBuildModule) CreateProject() error
- func (m *CodeBuildModule) DeleteProject() error
- func (m *CodeBuildModule) GenerateBuildspec(pipelineConfig map[string]any) string
- func (m *CodeBuildModule) GetBuildLogs(buildID string) ([]string, error)
- func (m *CodeBuildModule) GetBuildStatus(buildID string) (*CodeBuildBuild, error)
- func (m *CodeBuildModule) Init(app modular.Application) error
- func (m *CodeBuildModule) ListBuilds() ([]*CodeBuildBuild, error)
- func (m *CodeBuildModule) Name() string
- func (m *CodeBuildModule) ProvidesServices() []modular.ServiceProvider
- func (m *CodeBuildModule) RequiresServices() []modular.ServiceDependency
- func (m *CodeBuildModule) StartBuild(envOverrides map[string]string) (*CodeBuildBuild, error)
- type CodeBuildProjectState
- type CodeBuildStartStep
- type CodeBuildStatusStep
- type CommandFunc
- type CommandHandler
- func (h *CommandHandler) Handle(w http.ResponseWriter, r *http.Request)
- func (h *CommandHandler) Init(app modular.Application) error
- func (h *CommandHandler) Name() string
- func (h *CommandHandler) ProvidesServices() []modular.ServiceProvider
- func (h *CommandHandler) RegisterCommand(name string, fn CommandFunc)
- func (h *CommandHandler) RequiresServices() []modular.ServiceDependency
- func (h *CommandHandler) ResolveDelegatePostStart()
- func (h *CommandHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (h *CommandHandler) SetDelegate(name string)
- func (h *CommandHandler) SetDelegateHandler(handler http.Handler)
- func (h *CommandHandler) SetExecutionTracker(t ExecutionTrackerProvider)
- func (h *CommandHandler) SetRoutePipeline(routePath string, pipeline interfaces.PipelineRunner)
- type CompositeTransitionHandler
- type ConditionalStep
- type ConstraintCheckStep
- type CronScheduler
- type CrossWorkflowRouter
- type DBExecStep
- type DBProvider
- type DBQueryStep
- type DLQServiceConfig
- type DLQServiceModule
- func (m *DLQServiceModule) DLQMux() http.Handler
- func (m *DLQServiceModule) Init(_ modular.Application) error
- func (m *DLQServiceModule) MaxRetries() int
- func (m *DLQServiceModule) Name() string
- func (m *DLQServiceModule) ProvidesServices() []modular.ServiceProvider
- func (m *DLQServiceModule) RequiresServices() []modular.ServiceDependency
- func (m *DLQServiceModule) RetentionDays() int
- func (m *DLQServiceModule) Store() *evstore.InMemoryDLQStore
- type DNSApplyStep
- type DNSPlan
- type DNSPlanStep
- type DNSRecordConfig
- type DNSState
- type DNSStatusStep
- type DNSZoneConfig
- type DOAppState
- type DODNSPlan
- type DODNSRecordState
- type DODNSState
- type DODeployStep
- type DODestroyStep
- type DOFirewallConfig
- type DOFirewallRule
- type DOKSClusterState
- type DOKSNodePoolState
- type DOLogsStep
- type DONetworkPlan
- type DOScaleStep
- type DOStatusStep
- type DOVPCState
- type DataTransformer
- func (dt *DataTransformer) Init(app modular.Application) error
- func (dt *DataTransformer) Name() string
- func (dt *DataTransformer) RegisterPipeline(pipeline *TransformPipeline)
- func (dt *DataTransformer) Transform(ctx context.Context, pipelineName string, data any) (any, error)
- func (dt *DataTransformer) TransformWithOps(ctx context.Context, ops []TransformOperation, data any) (any, error)
- type DatabaseConfig
- type DatabaseIntegrationConnector
- func (c *DatabaseIntegrationConnector) Connect(ctx context.Context) error
- func (c *DatabaseIntegrationConnector) Disconnect(ctx context.Context) error
- func (c *DatabaseIntegrationConnector) Execute(ctx context.Context, action string, params map[string]any) (map[string]any, error)
- func (c *DatabaseIntegrationConnector) GetName() string
- func (c *DatabaseIntegrationConnector) IsConnected() bool
- type DelegateStep
- type DeployStep
- type DockerBuildStep
- type DockerPushStep
- type DockerRunStep
- type DriftCheckStep
- type DriftReport
- type DynamoDBNoSQL
- func (d *DynamoDBNoSQL) Delete(ctx context.Context, key string) error
- func (d *DynamoDBNoSQL) Get(ctx context.Context, key string) (map[string]any, error)
- func (d *DynamoDBNoSQL) Init(_ modular.Application) error
- func (d *DynamoDBNoSQL) Name() string
- func (d *DynamoDBNoSQL) ProvidesServices() []modular.ServiceProvider
- func (d *DynamoDBNoSQL) Put(ctx context.Context, key string, item map[string]any) error
- func (d *DynamoDBNoSQL) Query(ctx context.Context, params map[string]any) ([]map[string]any, error)
- func (d *DynamoDBNoSQL) RequiresServices() []modular.ServiceDependency
- type DynamoDBNoSQLConfig
- type ECSAppManifests
- type ECSAppServiceCfg
- type ECSAppTaskDef
- type ECSApplyStep
- type ECSContainer
- type ECSDestroyStep
- type ECSLoadBalancer
- type ECSPlanStep
- type ECSServiceState
- type ECSStatusStep
- type ECSTaskDefinition
- type ErrorStrategy
- type EventBridgeCarrier
- type EventBridgeTracePropagator
- func (p *EventBridgeTracePropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
- func (p *EventBridgeTracePropagator) ExtractDetail(ctx context.Context, detail map[string]any) context.Context
- func (p *EventBridgeTracePropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) error
- func (p *EventBridgeTracePropagator) InjectDetail(ctx context.Context, detail map[string]any) error
- type EventBusBridge
- func (b *EventBusBridge) Consumer() MessageConsumer
- func (b *EventBusBridge) Init(app modular.Application) error
- func (b *EventBusBridge) InitFromApp(app modular.Application) error
- func (b *EventBusBridge) Name() string
- func (b *EventBusBridge) Producer() MessageProducer
- func (b *EventBusBridge) SendMessage(topic string, message []byte) error
- func (b *EventBusBridge) SetEventBus(eb *eventbus.EventBusModule)
- func (b *EventBusBridge) Start(_ context.Context) error
- func (b *EventBusBridge) Stop(_ context.Context) error
- func (b *EventBusBridge) Subscribe(topic string, handler MessageHandler) error
- func (b *EventBusBridge) Unsubscribe(topic string) error
- type EventBusTrigger
- func (t *EventBusTrigger) Configure(app modular.Application, triggerConfig any) error
- func (t *EventBusTrigger) Init(app modular.Application) error
- func (t *EventBusTrigger) Name() string
- func (t *EventBusTrigger) SetEventBusAndEngine(eb *eventbus.EventBusModule, engine WorkflowEngine)
- func (t *EventBusTrigger) Start(ctx context.Context) error
- func (t *EventBusTrigger) Stop(_ context.Context) error
- type EventBusTriggerSubscription
- type EventData
- type EventHandler
- type EventPattern
- type EventProcessor
- func (p *EventProcessor) AddPattern(pattern *EventPattern)
- func (p *EventProcessor) Error() string
- func (p *EventProcessor) GetService(name string, out any) error
- func (p *EventProcessor) Init(app modular.Application) error
- func (p *EventProcessor) Name() string
- func (p *EventProcessor) ProcessEvent(ctx context.Context, event EventData) error
- func (p *EventProcessor) ProvidesServices() []modular.ServiceProvider
- func (p *EventProcessor) RegisterHandler(patternID string, handler EventHandler) error
- func (p *EventProcessor) RequiresServices() []modular.ServiceDependency
- func (p *EventProcessor) Service(name string) any
- func (p *EventProcessor) Services() map[string]any
- func (p *EventProcessor) SetError(err error)
- func (p *EventProcessor) Start(ctx context.Context) error
- func (p *EventProcessor) Stop(ctx context.Context) error
- type EventProcessorLocator
- type EventRecorder
- type EventStoreServiceConfig
- type EventStoreServiceModule
- func (m *EventStoreServiceModule) Init(_ modular.Application) error
- func (m *EventStoreServiceModule) Name() string
- func (m *EventStoreServiceModule) ProvidesServices() []modular.ServiceProvider
- func (m *EventStoreServiceModule) RequiresServices() []modular.ServiceDependency
- func (m *EventStoreServiceModule) RetentionDays() int
- func (m *EventStoreServiceModule) Store() *evstore.SQLiteEventStore
- type EventTrigger
- func (t *EventTrigger) Configure(app modular.Application, triggerConfig any) error
- func (t *EventTrigger) Init(app modular.Application) error
- func (t *EventTrigger) Name() string
- func (t *EventTrigger) SetBrokerAndEngine(broker MessageBroker, engine WorkflowEngine)
- func (t *EventTrigger) Start(ctx context.Context) error
- func (t *EventTrigger) Stop(ctx context.Context) error
- type EventTriggerConfig
- type EventTriggerSubscription
- type ExecutionTracker
- func (t *ExecutionTracker) RecordEvent(ctx context.Context, executionID string, eventType string, data map[string]any) error
- func (t *ExecutionTracker) SetEventStoreRecorder(r EventRecorder)
- func (t *ExecutionTracker) TrackPipelineExecution(ctx context.Context, pipeline *Pipeline, triggerData map[string]any, ...) (*PipelineContext, error)
- type ExecutionTrackerProvider
- type Executor
- type ExternalOperation
- type ExternalStateMachineDefinition
- type FFGateStep
- type FSIaCStateStore
- func (s *FSIaCStateStore) DeleteState(resourceID string) error
- func (s *FSIaCStateStore) GetState(resourceID string) (*IaCState, error)
- func (s *FSIaCStateStore) ListStates(filter map[string]string) ([]*IaCState, error)
- func (s *FSIaCStateStore) Lock(resourceID string) error
- func (s *FSIaCStateStore) SaveState(state *IaCState) error
- func (s *FSIaCStateStore) Unlock(resourceID string) error
- type FeatureFlagAdmin
- type FeatureFlagAdminAdapter
- func (a *FeatureFlagAdminAdapter) CreateFlag(data json.RawMessage) (any, error)
- func (a *FeatureFlagAdminAdapter) DeleteFlag(key string) error
- func (a *FeatureFlagAdminAdapter) EvaluateFlag(key string, user string, group string) (any, error)
- func (a *FeatureFlagAdminAdapter) GetFlag(key string) (any, error)
- func (a *FeatureFlagAdminAdapter) ListFlags() ([]any, error)
- func (a *FeatureFlagAdminAdapter) SSEHandler() http.Handler
- func (a *FeatureFlagAdminAdapter) SetOverrides(key string, data json.RawMessage) (any, error)
- func (a *FeatureFlagAdminAdapter) UpdateFlag(key string, data json.RawMessage) (any, error)
- type FeatureFlagModule
- func (m *FeatureFlagModule) Init(_ modular.Application) error
- func (m *FeatureFlagModule) Name() string
- func (m *FeatureFlagModule) ProvidesServices() []modular.ServiceProvider
- func (m *FeatureFlagModule) RequiresServices() []modular.ServiceDependency
- func (m *FeatureFlagModule) SSEEnabled() bool
- func (m *FeatureFlagModule) Service() *featureflag.Service
- func (m *FeatureFlagModule) Store() *generic.Store
- type FeatureFlagModuleConfig
- type FeatureFlagStep
- type FieldEncryptor
- func (e *FieldEncryptor) DecryptJSON(data []byte) ([]byte, error)
- func (e *FieldEncryptor) DecryptPIIFields(data map[string]any) (map[string]any, error)
- func (e *FieldEncryptor) DecryptValue(encoded string) (string, error)
- func (e *FieldEncryptor) Enabled() bool
- func (e *FieldEncryptor) EncryptJSON(data []byte) ([]byte, error)
- func (e *FieldEncryptor) EncryptPIIFields(data map[string]any) (map[string]any, error)
- func (e *FieldEncryptor) EncryptValue(plaintext string) (string, error)
- type FieldMapping
- func (fm *FieldMapping) Clone() *FieldMapping
- func (fm *FieldMapping) Has(logical string) bool
- func (fm *FieldMapping) MarshalJSON() ([]byte, error)
- func (fm *FieldMapping) Merge(other *FieldMapping)
- func (fm *FieldMapping) Primary(logical string) string
- func (fm *FieldMapping) Resolve(data map[string]any, logical string) (any, bool)
- func (fm *FieldMapping) ResolveSlice(data map[string]any, logical string) []any
- func (fm *FieldMapping) ResolveString(data map[string]any, logical string) string
- func (fm *FieldMapping) Set(logical string, actual ...string)
- func (fm *FieldMapping) SetValue(data map[string]any, logical string, value any)
- func (fm *FieldMapping) String() string
- func (fm *FieldMapping) UnmarshalJSON(data []byte) error
- type Finding
- type ForEachStep
- type FunctionHandler
- type FunctionJob
- type FunctionMessageHandler
- type FunctionTransitionHandler
- type GCSStorage
- func (g *GCSStorage) Delete(ctx context.Context, key string) error
- func (g *GCSStorage) Get(ctx context.Context, key string) (io.ReadCloser, error)
- func (g *GCSStorage) Init(app modular.Application) error
- func (g *GCSStorage) List(ctx context.Context, prefix string) ([]store.FileInfo, error)
- func (g *GCSStorage) MkdirAll(_ context.Context, _ string) error
- func (g *GCSStorage) Name() string
- func (g *GCSStorage) ProvidesServices() []modular.ServiceProvider
- func (g *GCSStorage) Put(ctx context.Context, key string, reader io.Reader) error
- func (g *GCSStorage) RequiresServices() []modular.ServiceDependency
- func (g *GCSStorage) SetBucket(bucket string)
- func (g *GCSStorage) SetBucketHandle(bh gcsBucketHandle)
- func (g *GCSStorage) SetCredentialsFile(path string)
- func (g *GCSStorage) SetProject(project string)
- func (g *GCSStorage) Start(ctx context.Context) error
- func (g *GCSStorage) Stat(ctx context.Context, key string) (store.FileInfo, error)
- func (g *GCSStorage) Stop(_ context.Context) error
- type GateStep
- type GatewayRoute
- type GitCheckoutStep
- type GitCloneStep
- type GitCommitStep
- type GitEvent
- type GitLabClient
- func (c *GitLabClient) CommentOnMR(projectID string, mrIID int, body string) error
- func (c *GitLabClient) CreateMergeRequest(projectID string, opts MROptions) (*GitLabMergeRequest, error)
- func (c *GitLabClient) GetPipeline(projectID string, pipelineID int) (*GitLabPipeline, error)
- func (c *GitLabClient) TriggerPipeline(projectID, ref string, variables map[string]string) (*GitLabPipeline, error)
- type GitLabClientModule
- type GitLabMergeRequest
- type GitLabPipeline
- type GitLabWebhookModule
- func (m *GitLabWebhookModule) Init(app modular.Application) error
- func (m *GitLabWebhookModule) Name() string
- func (m *GitLabWebhookModule) ParseEvent(eventType string, body []byte) (*GitEvent, error)
- func (m *GitLabWebhookModule) ProvidesServices() []modular.ServiceProvider
- func (m *GitLabWebhookModule) RegisterRoutes(router HTTPRouter)
- type GitLabWebhookParseStep
- type GitPushStep
- type GitTagStep
- type HTTPCallStep
- type HTTPHandler
- type HTTPHandlerAdapter
- type HTTPIntegrationConnector
- func (c *HTTPIntegrationConnector) AllowPrivateIPs()
- func (c *HTTPIntegrationConnector) Connect(ctx context.Context) error
- func (c *HTTPIntegrationConnector) DisallowPrivateIPs()
- func (c *HTTPIntegrationConnector) Disconnect(ctx context.Context) error
- func (c *HTTPIntegrationConnector) Execute(ctx context.Context, action string, params map[string]any) (map[string]any, error)
- func (c *HTTPIntegrationConnector) GetName() string
- func (c *HTTPIntegrationConnector) IsConnected() bool
- func (c *HTTPIntegrationConnector) SetBasicAuth(username, password string)
- func (c *HTTPIntegrationConnector) SetBearerAuth(token string)
- func (c *HTTPIntegrationConnector) SetDefaultHeader(key, value string)
- func (c *HTTPIntegrationConnector) SetHeader(key, value string)
- func (c *HTTPIntegrationConnector) SetRateLimit(requestsPerMinute int)
- func (c *HTTPIntegrationConnector) SetTimeout(timeout time.Duration)
- type HTTPMiddleware
- type HTTPRouter
- type HTTPServer
- type HTTPTracePropagator
- func (p *HTTPTracePropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
- func (p *HTTPTracePropagator) ExtractHeaders(ctx context.Context, headers http.Header) context.Context
- func (p *HTTPTracePropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) error
- func (p *HTTPTracePropagator) InjectHeaders(ctx context.Context, headers http.Header) error
- type HTTPTrigger
- type HTTPTriggerConfig
- type HTTPTriggerRoute
- type HealthCheck
- type HealthCheckConfig
- type HealthCheckResult
- type HealthCheckSpec
- type HealthCheckable
- type HealthChecker
- func (h *HealthChecker) AutoDiscover() bool
- func (h *HealthChecker) DiscoverHealthCheckables()
- func (h *HealthChecker) HealthHandler() http.HandlerFunc
- func (h *HealthChecker) HealthPath() string
- func (h *HealthChecker) Init(app modular.Application) error
- func (h *HealthChecker) LiveHandler() http.HandlerFunc
- func (h *HealthChecker) LivePath() string
- func (h *HealthChecker) Name() string
- func (h *HealthChecker) ProvidesServices() []modular.ServiceProvider
- func (h *HealthChecker) ReadyHandler() http.HandlerFunc
- func (h *HealthChecker) ReadyPath() string
- func (h *HealthChecker) RegisterCheck(name string, check HealthCheck)
- func (h *HealthChecker) RequiresServices() []modular.ServiceDependency
- func (h *HealthChecker) SetConfig(cfg HealthCheckerConfig)
- func (h *HealthChecker) SetStarted(started bool)
- type HealthCheckerConfig
- type HealthHTTPHandler
- type IaCApplyStep
- type IaCDestroyStep
- type IaCDriftDetectStep
- type IaCDriftDiff
- type IaCModule
- func (m *IaCModule) Init(app modular.Application) error
- func (m *IaCModule) Name() string
- func (m *IaCModule) ProvidesServices() []modular.ServiceProvider
- func (m *IaCModule) RequiresServices() []modular.ServiceDependency
- func (m *IaCModule) Start(_ context.Context) error
- func (m *IaCModule) Stop(_ context.Context) error
- type IaCPlanStep
- type IaCState
- type IaCStateStore
- type IaCStatusStep
- type InMemoryMessageBroker
- func (b *InMemoryMessageBroker) Consumer() MessageConsumer
- func (b *InMemoryMessageBroker) DeliveryTimeout() time.Duration
- func (b *InMemoryMessageBroker) Init(app modular.Application) error
- func (b *InMemoryMessageBroker) MaxQueueSize() int
- func (b *InMemoryMessageBroker) Name() string
- func (b *InMemoryMessageBroker) Producer() MessageProducer
- func (b *InMemoryMessageBroker) ProvidesServices() []modular.ServiceProvider
- func (b *InMemoryMessageBroker) RequiresServices() []modular.ServiceDependency
- func (b *InMemoryMessageBroker) SendMessage(topic string, message []byte) error
- func (b *InMemoryMessageBroker) SetDeliveryTimeout(d time.Duration)
- func (b *InMemoryMessageBroker) SetMaxQueueSize(n int)
- func (b *InMemoryMessageBroker) Start(ctx context.Context) error
- func (b *InMemoryMessageBroker) Stop(ctx context.Context) error
- func (b *InMemoryMessageBroker) Subscribe(topic string, handler MessageHandler) error
- type IntegrationConnector
- type IntegrationRegistry
- type JQStep
- type JSONResponseStep
- type JWTAuthModule
- func (j *JWTAuthModule) Authenticate(tokenStr string) (bool, map[string]any, error)
- func (j *JWTAuthModule) CreateOAuthUser(oauthKey, name string, meta map[string]any) (*User, error)
- func (j *JWTAuthModule) Handle(w http.ResponseWriter, r *http.Request)
- func (j *JWTAuthModule) Init(app modular.Application) error
- func (j *JWTAuthModule) Name() string
- func (j *JWTAuthModule) ProvidesServices() []modular.ServiceProvider
- func (j *JWTAuthModule) RequiresServices() []modular.ServiceDependency
- func (j *JWTAuthModule) SetAllowRegistration(allow bool)
- func (j *JWTAuthModule) SetResponseFormat(format string)
- func (j *JWTAuthModule) SetSeedFile(path string)
- func (j *JWTAuthModule) Start(ctx context.Context) error
- func (j *JWTAuthModule) Stop(ctx context.Context) error
- type Job
- type K8sApplyStep
- type K8sContainerPort
- type K8sContainerSpec
- type K8sDeploymentManifest
- type K8sDeploymentSpec
- type K8sDestroyStep
- type K8sEnvVar
- type K8sHTTPGetAction
- type K8sIngressBackend
- type K8sIngressHTTP
- type K8sIngressManifest
- type K8sIngressPath
- type K8sIngressRule
- type K8sIngressSpec
- type K8sIngressSvcBackend
- type K8sManifests
- type K8sObjectMeta
- type K8sPlanStep
- type K8sPodSpec
- type K8sPodTemplate
- type K8sProbe
- type K8sResourceReq
- type K8sSelector
- type K8sServiceManifest
- type K8sServicePort
- type K8sServicePortRef
- type K8sServiceSpec
- type K8sStatusStep
- type KafkaBroker
- func (b *KafkaBroker) Consumer() MessageConsumer
- func (b *KafkaBroker) HealthStatus() HealthCheckResult
- func (b *KafkaBroker) Init(app modular.Application) error
- func (b *KafkaBroker) Name() string
- func (b *KafkaBroker) Producer() MessageProducer
- func (b *KafkaBroker) ProvidesServices() []modular.ServiceProvider
- func (b *KafkaBroker) RequiresServices() []modular.ServiceDependency
- func (b *KafkaBroker) SetBrokers(brokers []string)
- func (b *KafkaBroker) SetGroupID(groupID string)
- func (b *KafkaBroker) Start(ctx context.Context) error
- func (b *KafkaBroker) Stop(_ context.Context) error
- func (b *KafkaBroker) Subscribe(topic string, handler MessageHandler) error
- type KafkaTracePropagator
- func (p *KafkaTracePropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
- func (p *KafkaTracePropagator) ExtractMap(ctx context.Context, headers map[string]string) context.Context
- func (p *KafkaTracePropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) error
- func (p *KafkaTracePropagator) InjectMap(ctx context.Context, headers map[string]string) error
- type KubernetesClusterState
- type LicenseModule
- func (m *LicenseModule) Init(_ modular.Application) error
- func (m *LicenseModule) Name() string
- func (m *LicenseModule) ProvidesServices() []modular.ServiceProvider
- func (m *LicenseModule) RequiresServices() []modular.ServiceDependency
- func (m *LicenseModule) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (m *LicenseModule) Start(ctx context.Context) error
- func (m *LicenseModule) Stop(ctx context.Context) error
- func (m *LicenseModule) Validator() *licensing.HTTPValidator
- type LicenseModuleConfig
- type ListenerAdapter
- type LocalStorageModule
- func (m *LocalStorageModule) Delete(ctx context.Context, path string) error
- func (m *LocalStorageModule) Get(ctx context.Context, path string) (io.ReadCloser, error)
- func (m *LocalStorageModule) Init(app modular.Application) error
- func (m *LocalStorageModule) List(ctx context.Context, prefix string) ([]store.FileInfo, error)
- func (m *LocalStorageModule) Name() string
- func (m *LocalStorageModule) ProvidesServices() []modular.ServiceProvider
- func (m *LocalStorageModule) Put(ctx context.Context, path string, reader io.Reader) error
- func (m *LocalStorageModule) RequiresServices() []modular.ServiceDependency
- func (m *LocalStorageModule) Start(_ context.Context) error
- func (m *LocalStorageModule) Stat(ctx context.Context, path string) (store.FileInfo, error)
- func (m *LocalStorageModule) Stop(_ context.Context) error
- func (m *LocalStorageModule) Storage() store.StorageProvider
- type LogCollector
- func (lc *LogCollector) AddEntry(entry LogEntry)
- func (lc *LogCollector) CollectFromEmitters()
- func (lc *LogCollector) Entries() []LogEntry
- func (lc *LogCollector) Init(app modular.Application) error
- func (lc *LogCollector) LogHandler() http.HandlerFunc
- func (lc *LogCollector) Name() string
- func (lc *LogCollector) ProvidesServices() []modular.ServiceProvider
- func (lc *LogCollector) RequiresServices() []modular.ServiceDependency
- func (lc *LogCollector) StartCollectionLoop(ctx context.Context, interval time.Duration) context.CancelFunc
- type LogCollectorConfig
- type LogEmitter
- type LogEntry
- type LogHTTPHandler
- type LogStep
- type LoggingMiddleware
- func (m *LoggingMiddleware) Init(app modular.Application) error
- func (m *LoggingMiddleware) Name() string
- func (m *LoggingMiddleware) Process(next http.Handler) http.Handler
- func (m *LoggingMiddleware) ProvidesServices() []modular.ServiceProvider
- func (m *LoggingMiddleware) RequiresServices() []modular.ServiceDependency
- type MROptions
- type MapCarrier
- type MarketplaceDetailStep
- type MarketplaceEntry
- type MarketplaceInstallStep
- type MarketplaceInstalledStep
- type MarketplaceRegistry
- type MarketplaceSearchStep
- type MarketplaceUninstallStep
- type MarketplaceUpdateStep
- type MemoryIaCStateStore
- func (s *MemoryIaCStateStore) DeleteState(resourceID string) error
- func (s *MemoryIaCStateStore) GetState(resourceID string) (*IaCState, error)
- func (s *MemoryIaCStateStore) ListStates(filter map[string]string) ([]*IaCState, error)
- func (s *MemoryIaCStateStore) Lock(resourceID string) error
- func (s *MemoryIaCStateStore) SaveState(state *IaCState) error
- func (s *MemoryIaCStateStore) Unlock(resourceID string) error
- type MemoryNoSQL
- func (m *MemoryNoSQL) Delete(_ context.Context, key string) error
- func (m *MemoryNoSQL) Get(_ context.Context, key string) (map[string]any, error)
- func (m *MemoryNoSQL) Init(_ modular.Application) error
- func (m *MemoryNoSQL) Name() string
- func (m *MemoryNoSQL) ProvidesServices() []modular.ServiceProvider
- func (m *MemoryNoSQL) Put(_ context.Context, key string, item map[string]any) error
- func (m *MemoryNoSQL) Query(_ context.Context, params map[string]any) ([]map[string]any, error)
- func (m *MemoryNoSQL) RequiresServices() []modular.ServiceDependency
- type MemoryNoSQLConfig
- type MessageBroker
- type MessageConsumer
- type MessageHandler
- type MessageHandlerAdapter
- type MessageHandlerJobAdapter
- type MessageProducer
- type MetricsCollector
- func (m *MetricsCollector) Handler() http.Handler
- func (m *MetricsCollector) Init(app modular.Application) error
- func (m *MetricsCollector) MetricsPath() string
- func (m *MetricsCollector) Name() string
- func (m *MetricsCollector) ProvidesServices() []modular.ServiceProvider
- func (m *MetricsCollector) RecordHTTPRequest(method, path string, statusCode int, duration time.Duration)
- func (m *MetricsCollector) RecordModuleOperation(module, operation, status string)
- func (m *MetricsCollector) RecordWorkflowDuration(workflowType, action string, duration time.Duration)
- func (m *MetricsCollector) RecordWorkflowExecution(workflowType, action, status string)
- func (m *MetricsCollector) RequiresServices() []modular.ServiceDependency
- func (m *MetricsCollector) SetActiveWorkflows(workflowType string, count float64)
- type MetricsCollectorConfig
- type MetricsHTTPHandler
- type MockApplication
- func (a *MockApplication) ConfigProvider() modular.ConfigProvider
- func (a *MockApplication) ConfigSections() map[string]modular.ConfigProvider
- func (a *MockApplication) GetAllModules() map[string]modular.Module
- func (a *MockApplication) GetConfig() map[string]any
- func (a *MockApplication) GetConfigSection(section string) (modular.ConfigProvider, error)
- func (a *MockApplication) GetModule(name string) modular.Module
- func (a *MockApplication) GetService(name string, out any) error
- func (a *MockApplication) GetServiceEntry(serviceName string) (*modular.ServiceRegistryEntry, bool)
- func (a *MockApplication) GetServicesByInterface(interfaceType reflect.Type) []*modular.ServiceRegistryEntry
- func (a *MockApplication) GetServicesByModule(moduleName string) []string
- func (a *MockApplication) Init() error
- func (a *MockApplication) IsVerboseConfig() bool
- func (a *MockApplication) Logger() modular.Logger
- func (a *MockApplication) OnConfigLoaded(hook func(modular.Application) error)
- func (a *MockApplication) RegisterConfigSection(name string, config modular.ConfigProvider)
- func (a *MockApplication) RegisterModule(module modular.Module)
- func (a *MockApplication) RegisterService(name string, service any) error
- func (a *MockApplication) Run() error
- func (a *MockApplication) SetLogger(logger modular.Logger)
- func (a *MockApplication) SetVerboseConfig(enabled bool)
- func (a *MockApplication) Start() error
- func (a *MockApplication) StartTime() time.Time
- func (a *MockApplication) Stop() error
- func (a *MockApplication) SvcRegistry() modular.ServiceRegistry
- type MockConfigProvider
- type MockLogger
- type MockScheduler
- func (s *MockScheduler) Init(registry modular.ServiceRegistry) error
- func (s *MockScheduler) Name() string
- func (s *MockScheduler) Schedule(job Job) error
- func (s *MockScheduler) SetCronExpression(index int, cronExpression string)
- func (s *MockScheduler) Start(ctx context.Context) error
- func (s *MockScheduler) Stop(ctx context.Context) error
- type MockWorkflowEngine
- type ModuleNamespace
- type ModuleNamespaceProvider
- type ModuleNamespaceProviderFunc
- func (m ModuleNamespaceProviderFunc) FormatName(baseName string) string
- func (m ModuleNamespaceProviderFunc) ResolveDependency(dependencyName string) string
- func (m ModuleNamespaceProviderFunc) ResolveServiceName(serviceName string) string
- func (m ModuleNamespaceProviderFunc) ValidateModuleName(moduleName string) error
- type MongoDBNoSQL
- func (m *MongoDBNoSQL) Delete(ctx context.Context, key string) error
- func (m *MongoDBNoSQL) Get(ctx context.Context, key string) (map[string]any, error)
- func (m *MongoDBNoSQL) Init(_ modular.Application) error
- func (m *MongoDBNoSQL) Name() string
- func (m *MongoDBNoSQL) ProvidesServices() []modular.ServiceProvider
- func (m *MongoDBNoSQL) Put(ctx context.Context, key string, item map[string]any) error
- func (m *MongoDBNoSQL) Query(ctx context.Context, params map[string]any) ([]map[string]any, error)
- func (m *MongoDBNoSQL) RequiresServices() []modular.ServiceDependency
- type MongoDBNoSQLConfig
- type MultiRegionModule
- func (m *MultiRegionModule) CheckHealth() ([]RegionHealth, error)
- func (m *MultiRegionModule) Deploy(region string) error
- func (m *MultiRegionModule) Failover(from, to string) error
- func (m *MultiRegionModule) Init(app modular.Application) error
- func (m *MultiRegionModule) Name() string
- func (m *MultiRegionModule) Promote(region string) error
- func (m *MultiRegionModule) ProvidesServices() []modular.ServiceProvider
- func (m *MultiRegionModule) RequiresServices() []modular.ServiceDependency
- func (m *MultiRegionModule) SetWeight(region string, weight int) error
- func (m *MultiRegionModule) Status() (*MultiRegionState, error)
- func (m *MultiRegionModule) Sync() error
- func (m *MultiRegionModule) Weights() map[string]int
- type MultiRegionRoutingModule
- func (r *MultiRegionRoutingModule) Failover(from, to string) error
- func (r *MultiRegionRoutingModule) Init(app modular.Application) error
- func (r *MultiRegionRoutingModule) Name() string
- func (r *MultiRegionRoutingModule) RouteRequest(ctx context.Context) (RegionDeployConfig, error)
- func (r *MultiRegionRoutingModule) SetRegions(regions []RegionDeployConfig)
- func (r *MultiRegionRoutingModule) SetState(region string, state RegionFailoverState) error
- func (r *MultiRegionRoutingModule) State(region string) (RegionFailoverState, bool)
- func (r *MultiRegionRoutingModule) Weights() map[string]int
- type MultiRegionState
- type NATSBroker
- func (b *NATSBroker) Consumer() MessageConsumer
- func (b *NATSBroker) Init(app modular.Application) error
- func (b *NATSBroker) Name() string
- func (b *NATSBroker) Producer() MessageProducer
- func (b *NATSBroker) ProvidesServices() []modular.ServiceProvider
- func (b *NATSBroker) RequiresServices() []modular.ServiceDependency
- func (b *NATSBroker) SetURL(url string)
- func (b *NATSBroker) Start(ctx context.Context) error
- func (b *NATSBroker) Stop(_ context.Context) error
- func (b *NATSBroker) Subscribe(topic string, handler MessageHandler) error
- type NetworkApplyStep
- type NetworkPlan
- type NetworkPlanStep
- type NetworkState
- type NetworkStatusStep
- type NoSQLDeleteStep
- type NoSQLGetStep
- type NoSQLPutStep
- type NoSQLQueryStep
- type NoSQLStore
- type NodeGroupState
- type OAuth2Module
- func (m *OAuth2Module) Handle(w http.ResponseWriter, r *http.Request)
- func (m *OAuth2Module) Init(_ modular.Application) error
- func (m *OAuth2Module) Name() string
- func (m *OAuth2Module) ProvidesServices() []modular.ServiceProvider
- func (m *OAuth2Module) RequiresServices() []modular.ServiceDependency
- func (m *OAuth2Module) SetJWTAuth(j *JWTAuthModule)
- type OAuth2ProviderConfig
- type OTelMiddleware
- func (m *OTelMiddleware) Init(_ modular.Application) error
- func (m *OTelMiddleware) Name() string
- func (m *OTelMiddleware) Process(next http.Handler) http.Handler
- func (m *OTelMiddleware) ProvidesServices() []modular.ServiceProvider
- func (m *OTelMiddleware) RequiresServices() []modular.ServiceDependency
- func (m *OTelMiddleware) Start(_ context.Context) error
- func (m *OTelMiddleware) Stop(_ context.Context) error
- type OTelTracing
- func (o *OTelTracing) Init(app modular.Application) error
- func (o *OTelTracing) Name() string
- func (o *OTelTracing) ProvidesServices() []modular.ServiceProvider
- func (o *OTelTracing) RequiresServices() []modular.ServiceDependency
- func (o *OTelTracing) SetEndpoint(endpoint string)
- func (o *OTelTracing) SetServiceName(serviceName string)
- func (o *OTelTracing) Start(ctx context.Context) error
- func (o *OTelTracing) Stop(ctx context.Context) error
- type OpenAPIComponents
- type OpenAPIConfig
- type OpenAPIConsumer
- func (c *OpenAPIConsumer) CallOperation(ctx context.Context, operationID string, data map[string]any) (map[string]any, error)
- func (c *OpenAPIConsumer) GetFieldMapping() *FieldMapping
- func (c *OpenAPIConsumer) GetSpec() *OpenAPISpec
- func (c *OpenAPIConsumer) Init(app modular.Application) error
- func (c *OpenAPIConsumer) ListOperations() []ExternalOperation
- func (c *OpenAPIConsumer) Name() string
- func (c *OpenAPIConsumer) ProvidesServices() []modular.ServiceProvider
- func (c *OpenAPIConsumer) RequiresServices() []modular.ServiceDependency
- func (c *OpenAPIConsumer) ServeOperations(w http.ResponseWriter, _ *http.Request)
- func (c *OpenAPIConsumer) ServeSpec(w http.ResponseWriter, _ *http.Request)
- func (c *OpenAPIConsumer) SetClient(client *http.Client)
- func (c *OpenAPIConsumer) SetFieldMapping(fm *FieldMapping)
- type OpenAPIConsumerConfig
- type OpenAPIGenerator
- func (g *OpenAPIGenerator) ApplySchemas()
- func (g *OpenAPIGenerator) BuildSpec(workflows map[string]any)
- func (g *OpenAPIGenerator) BuildSpecFromRoutes(routes []RouteDefinition)
- func (g *OpenAPIGenerator) GetSpec() *OpenAPISpec
- func (g *OpenAPIGenerator) Handle(w http.ResponseWriter, r *http.Request)
- func (g *OpenAPIGenerator) Init(app modular.Application) error
- func (g *OpenAPIGenerator) Name() string
- func (g *OpenAPIGenerator) ProvidesServices() []modular.ServiceProvider
- func (g *OpenAPIGenerator) RegisterAdminSchemas()
- func (g *OpenAPIGenerator) RegisterComponentSchema(name string, schema *OpenAPISchema)
- func (g *OpenAPIGenerator) RequiresServices() []modular.ServiceDependency
- func (g *OpenAPIGenerator) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (g *OpenAPIGenerator) ServeJSON(w http.ResponseWriter, _ *http.Request)
- func (g *OpenAPIGenerator) ServeYAML(w http.ResponseWriter, _ *http.Request)
- func (g *OpenAPIGenerator) SetOperationSchema(method, path string, req, resp *OpenAPISchema)
- func (g *OpenAPIGenerator) SortedPaths() []string
- type OpenAPIGeneratorConfig
- type OpenAPIHTTPHandler
- type OpenAPIInfo
- type OpenAPIMediaType
- type OpenAPIModule
- func (m *OpenAPIModule) Dependencies() []string
- func (m *OpenAPIModule) Init(app modular.Application) error
- func (m *OpenAPIModule) Name() string
- func (m *OpenAPIModule) ProvidesServices() []modular.ServiceProvider
- func (m *OpenAPIModule) RegisterRoutes(router HTTPRouter)
- func (m *OpenAPIModule) RequiresServices() []modular.ServiceDependency
- func (m *OpenAPIModule) RouterName() string
- func (m *OpenAPIModule) Start(_ context.Context) error
- func (m *OpenAPIModule) Stop(_ context.Context) error
- type OpenAPIOperation
- type OpenAPIParameter
- type OpenAPIPath
- type OpenAPIRequestBody
- type OpenAPIResponse
- type OpenAPISchema
- type OpenAPIServer
- type OpenAPISpec
- type OpenAPISwaggerUIConfig
- type OpenAPIValidationConfig
- type PatternMatch
- type PersistenceStore
- func (p *PersistenceStore) DeleteResource(resourceType, id string) error
- func (p *PersistenceStore) Init(app modular.Application) error
- func (p *PersistenceStore) LoadResource(resourceType, id string) (map[string]any, error)
- func (p *PersistenceStore) LoadResources(resourceType string) (map[string]map[string]any, error)
- func (p *PersistenceStore) LoadUsers() ([]UserRecord, error)
- func (p *PersistenceStore) LoadWorkflowInstances(workflowType string) ([]*WorkflowInstance, error)
- func (p *PersistenceStore) Name() string
- func (p *PersistenceStore) Ping(ctx context.Context) error
- func (p *PersistenceStore) ProvidesServices() []modular.ServiceProvider
- func (p *PersistenceStore) RequiresServices() []modular.ServiceDependency
- func (p *PersistenceStore) SaveResource(resourceType, id string, data map[string]any) error
- func (p *PersistenceStore) SaveUser(user UserRecord) error
- func (p *PersistenceStore) SaveWorkflowInstance(instance *WorkflowInstance) error
- func (p *PersistenceStore) SetDB(db *sql.DB)
- func (p *PersistenceStore) SetEncryptor(enc *FieldEncryptor)
- func (p *PersistenceStore) Start(ctx context.Context) error
- func (p *PersistenceStore) Stop(ctx context.Context) error
- type Pipeline
- func (p *Pipeline) Execute(ctx context.Context, triggerData map[string]any) (*PipelineContext, error)
- func (p *Pipeline) Run(ctx context.Context, data map[string]any) (map[string]any, error)
- func (p *Pipeline) SetEventRecorder(recorder interfaces.EventRecorder)
- func (p *Pipeline) SetLogger(logger *slog.Logger)
- type PipelineContext
- type PipelineLookupFn
- type PipelineStep
- type PipelineTracePropagator
- type PipelineTracingMiddleware
- type PlatformAPIGateway
- func (m *PlatformAPIGateway) Apply() (*PlatformGatewayState, error)
- func (m *PlatformAPIGateway) Destroy() error
- func (m *PlatformAPIGateway) Init(app modular.Application) error
- func (m *PlatformAPIGateway) Name() string
- func (m *PlatformAPIGateway) Plan() (*PlatformGatewayPlan, error)
- func (m *PlatformAPIGateway) ProvidesServices() []modular.ServiceProvider
- func (m *PlatformAPIGateway) RequiresServices() []modular.ServiceDependency
- func (m *PlatformAPIGateway) Status() (any, error)
- type PlatformAction
- type PlatformApplyStep
- type PlatformAutoscaling
- func (m *PlatformAutoscaling) Apply() (*ScalingState, error)
- func (m *PlatformAutoscaling) Destroy() error
- func (m *PlatformAutoscaling) Init(app modular.Application) error
- func (m *PlatformAutoscaling) Name() string
- func (m *PlatformAutoscaling) Plan() (*ScalingPlan, error)
- func (m *PlatformAutoscaling) ProvidesServices() []modular.ServiceProvider
- func (m *PlatformAutoscaling) RequiresServices() []modular.ServiceDependency
- func (m *PlatformAutoscaling) Status() (any, error)
- type PlatformDNS
- func (m *PlatformDNS) Apply() (*DNSState, error)
- func (m *PlatformDNS) Destroy() error
- func (m *PlatformDNS) Init(app modular.Application) error
- func (m *PlatformDNS) Name() string
- func (m *PlatformDNS) Plan() (*DNSPlan, error)
- func (m *PlatformDNS) ProvidesServices() []modular.ServiceProvider
- func (m *PlatformDNS) RequiresServices() []modular.ServiceDependency
- func (m *PlatformDNS) Status() (*DNSState, error)
- type PlatformDOApp
- func (m *PlatformDOApp) Deploy() (*DOAppState, error)
- func (m *PlatformDOApp) Destroy() error
- func (m *PlatformDOApp) Init(app modular.Application) error
- func (m *PlatformDOApp) Logs() (string, error)
- func (m *PlatformDOApp) Name() string
- func (m *PlatformDOApp) ProvidesServices() []modular.ServiceProvider
- func (m *PlatformDOApp) RequiresServices() []modular.ServiceDependency
- func (m *PlatformDOApp) Scale(instances int) (*DOAppState, error)
- func (m *PlatformDOApp) Status() (*DOAppState, error)
- type PlatformDODNS
- func (m *PlatformDODNS) Apply() (*DODNSState, error)
- func (m *PlatformDODNS) Destroy() error
- func (m *PlatformDODNS) Init(app modular.Application) error
- func (m *PlatformDODNS) Name() string
- func (m *PlatformDODNS) Plan() (*DODNSPlan, error)
- func (m *PlatformDODNS) ProvidesServices() []modular.ServiceProvider
- func (m *PlatformDODNS) RequiresServices() []modular.ServiceDependency
- func (m *PlatformDODNS) Status() (*DODNSState, error)
- type PlatformDOKS
- func (m *PlatformDOKS) Create() (*DOKSClusterState, error)
- func (m *PlatformDOKS) Delete() error
- func (m *PlatformDOKS) Get() (*DOKSClusterState, error)
- func (m *PlatformDOKS) Init(app modular.Application) error
- func (m *PlatformDOKS) ListNodePools() ([]DOKSNodePoolState, error)
- func (m *PlatformDOKS) Name() string
- func (m *PlatformDOKS) ProvidesServices() []modular.ServiceProvider
- func (m *PlatformDOKS) RequiresServices() []modular.ServiceDependency
- type PlatformDONetworking
- func (m *PlatformDONetworking) Apply() (*DOVPCState, error)
- func (m *PlatformDONetworking) Destroy() error
- func (m *PlatformDONetworking) Init(app modular.Application) error
- func (m *PlatformDONetworking) Name() string
- func (m *PlatformDONetworking) Plan() (*DONetworkPlan, error)
- func (m *PlatformDONetworking) ProvidesServices() []modular.ServiceProvider
- func (m *PlatformDONetworking) RequiresServices() []modular.ServiceDependency
- func (m *PlatformDONetworking) Status() (*DOVPCState, error)
- type PlatformDestroyStep
- type PlatformECS
- func (m *PlatformECS) Apply() (*PlatformResult, error)
- func (m *PlatformECS) Destroy() error
- func (m *PlatformECS) Init(app modular.Application) error
- func (m *PlatformECS) Name() string
- func (m *PlatformECS) Plan() (*PlatformPlan, error)
- func (m *PlatformECS) ProvidesServices() []modular.ServiceProvider
- func (m *PlatformECS) RequiresServices() []modular.ServiceDependency
- func (m *PlatformECS) Status() (any, error)
- type PlatformGatewayCORSConfig
- type PlatformGatewayPlan
- type PlatformGatewayRoute
- type PlatformGatewayState
- type PlatformKubernetes
- func (m *PlatformKubernetes) Apply() (*PlatformResult, error)
- func (m *PlatformKubernetes) Destroy() error
- func (m *PlatformKubernetes) Init(app modular.Application) error
- func (m *PlatformKubernetes) Name() string
- func (m *PlatformKubernetes) Plan() (*PlatformPlan, error)
- func (m *PlatformKubernetes) ProvidesServices() []modular.ServiceProvider
- func (m *PlatformKubernetes) RequiresServices() []modular.ServiceDependency
- func (m *PlatformKubernetes) Status() (any, error)
- type PlatformNetworking
- func (m *PlatformNetworking) Apply() (*NetworkState, error)
- func (m *PlatformNetworking) Destroy() error
- func (m *PlatformNetworking) Init(app modular.Application) error
- func (m *PlatformNetworking) Name() string
- func (m *PlatformNetworking) Plan() (*NetworkPlan, error)
- func (m *PlatformNetworking) ProvidesServices() []modular.ServiceProvider
- func (m *PlatformNetworking) RequiresServices() []modular.ServiceDependency
- func (m *PlatformNetworking) Status() (any, error)
- type PlatformPlan
- type PlatformPlanStep
- type PlatformProvider
- type PlatformResult
- type PlatformTemplateStep
- type PluginSpec
- type PolicyDecision
- type PolicyEngine
- type PolicyEngineModule
- func (m *PolicyEngineModule) Backend() string
- func (m *PolicyEngineModule) Engine() PolicyEngine
- func (m *PolicyEngineModule) Init(app modular.Application) error
- func (m *PolicyEngineModule) Name() string
- func (m *PolicyEngineModule) ProvidesServices() []modular.ServiceProvider
- func (m *PolicyEngineModule) RequiresServices() []modular.ServiceDependency
- type PolicyEvaluateStep
- type PolicyInfo
- type PolicyListStep
- type PolicyLoadStep
- type PolicyTestStep
- type PortAllocator
- type ProcessingStep
- func (ps *ProcessingStep) HandleTransition(ctx context.Context, event TransitionEvent) error
- func (ps *ProcessingStep) Init(app modular.Application) error
- func (ps *ProcessingStep) Name() string
- func (ps *ProcessingStep) ProvidesServices() []modular.ServiceProvider
- func (ps *ProcessingStep) RequiresServices() []modular.ServiceDependency
- func (ps *ProcessingStep) Start(_ context.Context) error
- func (ps *ProcessingStep) Stop(_ context.Context) error
- type ProcessingStepConfig
- type PublishStep
- type QueryFunc
- type QueryHandler
- func (h *QueryHandler) Handle(w http.ResponseWriter, r *http.Request)
- func (h *QueryHandler) Init(app modular.Application) error
- func (h *QueryHandler) Name() string
- func (h *QueryHandler) ProvidesServices() []modular.ServiceProvider
- func (h *QueryHandler) RegisterQuery(name string, fn QueryFunc)
- func (h *QueryHandler) RequiresServices() []modular.ServiceDependency
- func (h *QueryHandler) ResolveDelegatePostStart()
- func (h *QueryHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (h *QueryHandler) SetDelegate(name string)
- func (h *QueryHandler) SetDelegateHandler(handler http.Handler)
- func (h *QueryHandler) SetExecutionTracker(t ExecutionTrackerProvider)
- func (h *QueryHandler) SetRoutePipeline(routePath string, pipeline interfaces.PipelineRunner)
- type QueryResult
- type RESTAPIHandler
- func (h *RESTAPIHandler) Constructor() modular.ModuleConstructor
- func (h *RESTAPIHandler) Handle(w http.ResponseWriter, r *http.Request)
- func (h *RESTAPIHandler) Init(app modular.Application) error
- func (h *RESTAPIHandler) Name() string
- func (h *RESTAPIHandler) ProvidesServices() []modular.ServiceProvider
- func (h *RESTAPIHandler) RequiresServices() []modular.ServiceDependency
- func (h *RESTAPIHandler) SetFieldMapping(fm *FieldMapping)
- func (h *RESTAPIHandler) SetInitialTransition(t string)
- func (h *RESTAPIHandler) SetInstanceIDPrefix(prefix string)
- func (h *RESTAPIHandler) SetSeedFile(path string)
- func (h *RESTAPIHandler) SetSourceResourceName(name string)
- func (h *RESTAPIHandler) SetStateFilter(state string)
- func (h *RESTAPIHandler) SetSummaryFields(fields []string)
- func (h *RESTAPIHandler) SetTransitionMap(tm map[string]string)
- func (h *RESTAPIHandler) SetWorkflowEngine(we string)
- func (h *RESTAPIHandler) SetWorkflowType(wt string)
- func (h *RESTAPIHandler) Start(ctx context.Context) error
- func (h *RESTAPIHandler) Stop(ctx context.Context) error
- type RESTAPIHandlerConfig
- type RESTResource
- type RateLimitConfig
- type RateLimitMiddleware
- func NewRateLimitMiddleware(name string, requestsPerMinute, burstSize int) *RateLimitMiddleware
- func NewRateLimitMiddlewareWithHourlyRate(name string, requestsPerHour, burstSize int) *RateLimitMiddleware
- func NewRateLimitMiddlewareWithStrategy(name string, requestsPerMinute, burstSize int, strategy RateLimitStrategy) *RateLimitMiddleware
- func (m *RateLimitMiddleware) Init(app modular.Application) error
- func (m *RateLimitMiddleware) Name() string
- func (m *RateLimitMiddleware) Process(next http.Handler) http.Handler
- func (m *RateLimitMiddleware) ProvidesServices() []modular.ServiceProvider
- func (m *RateLimitMiddleware) RequiresServices() []modular.ServiceDependency
- func (m *RateLimitMiddleware) SetTokenHeader(header string)
- func (m *RateLimitMiddleware) Start(_ context.Context) error
- func (m *RateLimitMiddleware) Stop(_ context.Context) error
- func (m *RateLimitMiddleware) Strategy() RateLimitStrategy
- type RateLimitStep
- type RateLimitStrategy
- type ReconciliationTrigger
- func (t *ReconciliationTrigger) Configure(app modular.Application, triggerConfig any) error
- func (t *ReconciliationTrigger) Dependencies() []string
- func (t *ReconciliationTrigger) Init(app modular.Application) error
- func (t *ReconciliationTrigger) Name() string
- func (t *ReconciliationTrigger) Start(ctx context.Context) error
- func (t *ReconciliationTrigger) Stop(_ context.Context) error
- type RedisCache
- func (r *RedisCache) Delete(ctx context.Context, key string) error
- func (r *RedisCache) Get(ctx context.Context, key string) (string, error)
- func (r *RedisCache) Init(app modular.Application) error
- func (r *RedisCache) Name() string
- func (r *RedisCache) ProvidesServices() []modular.ServiceProvider
- func (r *RedisCache) RequiresServices() []modular.ServiceDependency
- func (r *RedisCache) Set(ctx context.Context, key, value string, ttl time.Duration) error
- func (r *RedisCache) Start(ctx context.Context) error
- func (r *RedisCache) Stop(_ context.Context) error
- type RedisCacheConfig
- type RedisClient
- type RedisNoSQL
- func (r *RedisNoSQL) Delete(ctx context.Context, key string) error
- func (r *RedisNoSQL) Get(ctx context.Context, key string) (map[string]any, error)
- func (r *RedisNoSQL) Init(_ modular.Application) error
- func (r *RedisNoSQL) Name() string
- func (r *RedisNoSQL) ProvidesServices() []modular.ServiceProvider
- func (r *RedisNoSQL) Put(ctx context.Context, key string, item map[string]any) error
- func (r *RedisNoSQL) Query(ctx context.Context, params map[string]any) ([]map[string]any, error)
- func (r *RedisNoSQL) RequiresServices() []modular.ServiceDependency
- type RedisNoSQLConfig
- type RegionDeployConfig
- type RegionDeployStep
- type RegionFailoverState
- type RegionFailoverStep
- type RegionHealth
- type RegionPromoteStep
- type RegionRouterInterface
- type RegionStatusStep
- type RegionSyncStep
- type RegionWeightStep
- type RequestIDMiddleware
- func (m *RequestIDMiddleware) Init(app modular.Application) error
- func (m *RequestIDMiddleware) Middleware() func(http.Handler) http.Handler
- func (m *RequestIDMiddleware) Name() string
- func (m *RequestIDMiddleware) Process(next http.Handler) http.Handler
- func (m *RequestIDMiddleware) ProvidesServices() []modular.ServiceProvider
- func (m *RequestIDMiddleware) RequiresServices() []modular.ServiceDependency
- type RequestParseStep
- type ResourceSpec
- type ResourceStateMapping
- type Route
- type RouteDefinition
- type RuntimeEngineBuilder
- type RuntimeHandler
- type RuntimeInstance
- type RuntimeManager
- func (rm *RuntimeManager) AnnounceServices(instance *RuntimeInstance)
- func (rm *RuntimeManager) GetInstance(id string) (*RuntimeInstance, bool)
- func (rm *RuntimeManager) LaunchFromPath(ctx context.Context, path string) (*RuntimeInstance, error)
- func (rm *RuntimeManager) LaunchFromWorkspace(ctx context.Context, id, name, yamlContent, workspaceDir string) error
- func (rm *RuntimeManager) LaunchFromYAML(ctx context.Context, id, name, yamlContent string) error
- func (rm *RuntimeManager) ListInstances() []RuntimeInstance
- func (rm *RuntimeManager) LoadFromPaths(ctx context.Context, paths []string) error
- func (rm *RuntimeManager) SetPortAllocator(pa *PortAllocator)
- func (rm *RuntimeManager) StopAll(ctx context.Context) error
- func (rm *RuntimeManager) StopWorkflow(ctx context.Context, id string) error
- type S3Storage
- func (s *S3Storage) DeleteObject(ctx context.Context, key string) error
- func (s *S3Storage) GetObject(ctx context.Context, key string) (io.ReadCloser, error)
- func (s *S3Storage) Init(app modular.Application) error
- func (s *S3Storage) Name() string
- func (s *S3Storage) ProvidesServices() []modular.ServiceProvider
- func (s *S3Storage) PutObject(ctx context.Context, key string, body io.Reader) error
- func (s *S3Storage) RequiresServices() []modular.ServiceDependency
- func (s *S3Storage) SetBucket(bucket string)
- func (s *S3Storage) SetClient(client *s3.Client)
- func (s *S3Storage) SetEndpoint(endpoint string)
- func (s *S3Storage) SetRegion(region string)
- func (s *S3Storage) Start(ctx context.Context) error
- func (s *S3Storage) Stop(_ context.Context) error
- type SQLiteStorage
- func (s *SQLiteStorage) DB() *sql.DB
- func (s *SQLiteStorage) Init(app modular.Application) error
- func (s *SQLiteStorage) Name() string
- func (s *SQLiteStorage) ProvidesServices() []modular.ServiceProvider
- func (s *SQLiteStorage) RequiresServices() []modular.ServiceDependency
- func (s *SQLiteStorage) SetMaxConnections(n int)
- func (s *SQLiteStorage) SetWALMode(enabled bool)
- func (s *SQLiteStorage) Start(_ context.Context) error
- func (s *SQLiteStorage) Stop(_ context.Context) error
- type SSEEvent
- type SSETracer
- type ScaffoldAnalyzeStep
- type ScaffoldStep
- type ScalingApplyStep
- type ScalingDestroyStep
- type ScalingPlan
- type ScalingPlanStep
- type ScalingPolicy
- type ScalingState
- type ScalingStatusStep
- type ScanContainerStep
- type ScanDepsStep
- type ScanResult
- type ScanSASTStep
- type ScanSummary
- type ScheduleTrigger
- func (t *ScheduleTrigger) Configure(app modular.Application, triggerConfig any) error
- func (t *ScheduleTrigger) Init(app modular.Application) error
- func (t *ScheduleTrigger) Name() string
- func (t *ScheduleTrigger) Start(ctx context.Context) error
- func (t *ScheduleTrigger) Stop(ctx context.Context) error
- type ScheduleTriggerConfig
- type ScheduleTriggerJob
- type ScheduledJobInfo
- type ScheduledWindow
- type Scheduler
- type SecretsAWSModule
- func (m *SecretsAWSModule) Get(ctx context.Context, key string) (string, error)
- func (m *SecretsAWSModule) Init(app modular.Application) error
- func (m *SecretsAWSModule) Name() string
- func (m *SecretsAWSModule) Provider() secrets.Provider
- func (m *SecretsAWSModule) ProvidesServices() []modular.ServiceProvider
- func (m *SecretsAWSModule) RequiresServices() []modular.ServiceDependency
- func (m *SecretsAWSModule) SetAccessKeyID(id string)
- func (m *SecretsAWSModule) SetRegion(region string)
- func (m *SecretsAWSModule) SetSecretAccessKey(key string)
- func (m *SecretsAWSModule) Start(_ context.Context) error
- func (m *SecretsAWSModule) Stop(_ context.Context) error
- type SecretsVaultModule
- func (m *SecretsVaultModule) Get(ctx context.Context, key string) (string, error)
- func (m *SecretsVaultModule) Init(app modular.Application) error
- func (m *SecretsVaultModule) Name() string
- func (m *SecretsVaultModule) Provider() secrets.Provider
- func (m *SecretsVaultModule) ProvidesServices() []modular.ServiceProvider
- func (m *SecretsVaultModule) RequiresServices() []modular.ServiceDependency
- func (m *SecretsVaultModule) SetAddress(addr string)
- func (m *SecretsVaultModule) SetMode(mode string)
- func (m *SecretsVaultModule) SetMountPath(path string)
- func (m *SecretsVaultModule) SetNamespace(ns string)
- func (m *SecretsVaultModule) SetToken(token string)
- func (m *SecretsVaultModule) Start(_ context.Context) error
- func (m *SecretsVaultModule) Stop(_ context.Context) error
- type SecurityGroupConfig
- type SecurityGroupRule
- type SecurityHeadersConfig
- type SecurityHeadersMiddleware
- func (m *SecurityHeadersMiddleware) Init(app modular.Application) error
- func (m *SecurityHeadersMiddleware) Middleware() func(http.Handler) http.Handler
- func (m *SecurityHeadersMiddleware) Name() string
- func (m *SecurityHeadersMiddleware) Process(next http.Handler) http.Handler
- func (m *SecurityHeadersMiddleware) ProvidesServices() []modular.ServiceProvider
- func (m *SecurityHeadersMiddleware) RequiresServices() []modular.ServiceDependency
- type ServiceInfo
- type ServiceModule
- type ServiceRegistry
- type SetStep
- type ShellExecStep
- type SimpleHTTPHandler
- func (h *SimpleHTTPHandler) Handle(w http.ResponseWriter, r *http.Request)
- func (h *SimpleHTTPHandler) Init(app modular.Application) error
- func (h *SimpleHTTPHandler) Name() string
- func (h *SimpleHTTPHandler) ProvidesServices() []modular.ServiceProvider
- func (h *SimpleHTTPHandler) RequiresServices() []modular.ServiceDependency
- func (h *SimpleHTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (h *SimpleHTTPHandler) SetHandleFunc(fn func(w http.ResponseWriter, r *http.Request))
- type SimpleMessageHandler
- func (h *SimpleMessageHandler) Constructor() modular.ModuleConstructor
- func (h *SimpleMessageHandler) Dependencies() []string
- func (h *SimpleMessageHandler) HandleMessage(message []byte) error
- func (h *SimpleMessageHandler) Init(app modular.Application) error
- func (h *SimpleMessageHandler) Name() string
- func (h *SimpleMessageHandler) ProvidesServices() []modular.ServiceProvider
- func (h *SimpleMessageHandler) RequiresServices() []modular.ServiceDependency
- func (h *SimpleMessageHandler) SetBrokerDependencies(brokerNames []string)
- func (h *SimpleMessageHandler) SetHandleFunc(fn func(message []byte) error)
- func (h *SimpleMessageHandler) SetProducer(producer MessageProducer)
- func (h *SimpleMessageHandler) SetTargetTopics(topics []string)
- func (h *SimpleMessageHandler) Start(ctx context.Context) error
- func (h *SimpleMessageHandler) Stop(ctx context.Context) error
- type SimpleProxy
- func (p *SimpleProxy) Handle(w http.ResponseWriter, r *http.Request)
- func (p *SimpleProxy) Init(_ modular.Application) error
- func (p *SimpleProxy) Name() string
- func (p *SimpleProxy) ProvidesServices() []modular.ServiceProvider
- func (p *SimpleProxy) RequiresServices() []modular.ServiceDependency
- func (p *SimpleProxy) SetTargets(targets map[string]string) error
- func (p *SimpleProxy) Start(_ context.Context) error
- func (p *SimpleProxy) Stop(_ context.Context) error
- type SimpleTokenProvider
- type SlackNotification
- func (s *SlackNotification) HandleMessage(message []byte) error
- func (s *SlackNotification) Init(app modular.Application) error
- func (s *SlackNotification) Name() string
- func (s *SlackNotification) ProvidesServices() []modular.ServiceProvider
- func (s *SlackNotification) RequiresServices() []modular.ServiceDependency
- func (s *SlackNotification) SetChannel(channel string)
- func (s *SlackNotification) SetClient(client *http.Client)
- func (s *SlackNotification) SetUsername(username string)
- func (s *SlackNotification) SetWebhookURL(url string)
- type StandardHTTPHandler
- type StandardHTTPRouter
- func (r *StandardHTTPRouter) AddGlobalMiddleware(mw HTTPMiddleware)
- func (r *StandardHTTPRouter) AddRoute(method, path string, handler HTTPHandler)
- func (r *StandardHTTPRouter) AddRouteWithMiddleware(method, path string, handler HTTPHandler, middlewares []HTTPMiddleware)
- func (r *StandardHTTPRouter) Constructor() modular.ModuleConstructor
- func (r *StandardHTTPRouter) Dependencies() []string
- func (r *StandardHTTPRouter) HasRoute(method, path string) bool
- func (r *StandardHTTPRouter) Init(app modular.Application) error
- func (r *StandardHTTPRouter) Name() string
- func (r *StandardHTTPRouter) ProvidesServices() []modular.ServiceProvider
- func (r *StandardHTTPRouter) RequiresServices() []modular.ServiceDependency
- func (r *StandardHTTPRouter) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (r *StandardHTTPRouter) SetServerDependencies(serverNames []string)
- func (r *StandardHTTPRouter) Start(ctx context.Context) error
- func (r *StandardHTTPRouter) Stop(ctx context.Context) error
- type StandardHTTPServer
- func (s *StandardHTTPServer) AddRouter(router HTTPRouter)
- func (s *StandardHTTPServer) Init(app modular.Application) error
- func (s *StandardHTTPServer) Name() string
- func (s *StandardHTTPServer) ProvidesServices() []modular.ServiceProvider
- func (s *StandardHTTPServer) RequiresServices() []modular.ServiceDependency
- func (s *StandardHTTPServer) SetTimeouts(read, write, idle time.Duration)
- func (s *StandardHTTPServer) Start(ctx context.Context) error
- func (s *StandardHTTPServer) Stop(ctx context.Context) error
- type StandardNamespace
- type State
- type StateChangeListener
- type StateInfo
- type StateMachineDefinition
- type StateMachineEngine
- func (e *StateMachineEngine) AddGlobalTransitionHandler(handler TransitionHandler)
- func (e *StateMachineEngine) AddTransitionListener(listener TransitionListener)
- func (e *StateMachineEngine) CreateWorkflow(workflowType string, id string, initialData map[string]any) (*WorkflowInstance, error)
- func (e *StateMachineEngine) GetAllInstances() ([]*WorkflowInstance, error)
- func (e *StateMachineEngine) GetInstance(id string) (*WorkflowInstance, error)
- func (e *StateMachineEngine) GetInstancesByType(workflowType string) ([]*WorkflowInstance, error)
- func (e *StateMachineEngine) GetOrphanedInstances() []*WorkflowInstance
- func (e *StateMachineEngine) GetTransitionHandler() TransitionHandler
- func (e *StateMachineEngine) HasTransitionHandler() bool
- func (e *StateMachineEngine) Init(app modular.Application) error
- func (e *StateMachineEngine) InstanceTTL() time.Duration
- func (e *StateMachineEngine) LoadAllPersistedInstances() error
- func (e *StateMachineEngine) MaxInstances() int
- func (e *StateMachineEngine) Name() string
- func (e *StateMachineEngine) ProvidesServices() []modular.ServiceProvider
- func (e *StateMachineEngine) RecoverProcessingInstances(ctx context.Context, processingStates []string) int
- func (e *StateMachineEngine) RegisterDefinition(def *StateMachineDefinition) error
- func (e *StateMachineEngine) RegisterWorkflow(def ExternalStateMachineDefinition) error
- func (e *StateMachineEngine) RequiresServices() []modular.ServiceDependency
- func (e *StateMachineEngine) SetInstanceTTL(d time.Duration)
- func (e *StateMachineEngine) SetMaxInstances(n int)
- func (e *StateMachineEngine) SetPersistence(ps *PersistenceStore)
- func (e *StateMachineEngine) SetTransitionHandler(handler TransitionHandler)
- func (e *StateMachineEngine) Start(ctx context.Context) error
- func (e *StateMachineEngine) Stop(ctx context.Context) error
- func (e *StateMachineEngine) TrackGoroutine(fn func())
- func (e *StateMachineEngine) TriggerTransition(ctx context.Context, workflowID string, transitionName string, ...) error
- type StateMachineGetStep
- type StateMachineStateConfig
- type StateMachineStateConnector
- func (c *StateMachineStateConnector) Configure(mappings []ResourceStateMapping) error
- func (c *StateMachineStateConnector) GetEngineForResourceType(resourceType string) (string, bool)
- func (c *StateMachineStateConnector) GetResourceState(resourceType, resourceID string) (string, map[string]any, error)
- func (c *StateMachineStateConnector) Init(app modular.Application) error
- func (c *StateMachineStateConnector) Name() string
- func (c *StateMachineStateConnector) ProvidesServices() []modular.ServiceProvider
- func (c *StateMachineStateConnector) RegisterMapping(resourceType, stateMachine, instanceIDKey string)
- func (c *StateMachineStateConnector) RequiresServices() []modular.ServiceDependency
- func (c *StateMachineStateConnector) Start(ctx context.Context) error
- func (c *StateMachineStateConnector) Stop(ctx context.Context) error
- func (c *StateMachineStateConnector) UpdateResourceState(resourceType, resourceID string) error
- type StateMachineTransitionConfig
- type StateMachineTransitionStep
- type StateTracker
- func (s *StateTracker) AddStateChangeListener(resourceType string, listener StateChangeListener)
- func (s *StateTracker) GetState(resourceType, resourceID string) (StateInfo, bool)
- func (s *StateTracker) Init(app modular.Application) error
- func (s *StateTracker) Name() string
- func (s *StateTracker) ProvidesServices() []modular.ServiceProvider
- func (s *StateTracker) RequiresServices() []modular.ServiceDependency
- func (s *StateTracker) RetentionDays() int
- func (s *StateTracker) SetRetentionDays(days int)
- func (s *StateTracker) SetState(resourceType, resourceID, state string, data map[string]any)
- func (s *StateTracker) Start(ctx context.Context) error
- func (s *StateTracker) Stop(ctx context.Context) error
- type StaticFileServer
- func (s *StaticFileServer) Handle(w http.ResponseWriter, r *http.Request)
- func (s *StaticFileServer) Init(app modular.Application) error
- func (s *StaticFileServer) Name() string
- func (s *StaticFileServer) Prefix() string
- func (s *StaticFileServer) ProvidesServices() []modular.ServiceProvider
- func (s *StaticFileServer) RequiresServices() []modular.ServiceDependency
- func (s *StaticFileServer) RouterName() string
- func (s *StaticFileServer) SPAFallbackEnabled() bool
- func (s *StaticFileServer) SetRouterName(name string)
- func (s *StaticFileServer) Start(ctx context.Context) error
- func (s *StaticFileServer) Stop(ctx context.Context) error
- type StaticFileServerOption
- type StdIntegrationRegistry
- func (r *StdIntegrationRegistry) GetConnector(name string) (IntegrationConnector, error)
- func (r *StdIntegrationRegistry) Init(app modular.Application) error
- func (r *StdIntegrationRegistry) ListConnectors() []string
- func (r *StdIntegrationRegistry) Name() string
- func (r *StdIntegrationRegistry) RegisterConnector(connector IntegrationConnector)
- func (r *StdIntegrationRegistry) Start() error
- func (r *StdIntegrationRegistry) Stop() error
- type StepFactory
- func NewAIClassifyStepFactory(registry *ai.AIModelRegistry) StepFactory
- func NewAICompleteStepFactory(registry *ai.AIModelRegistry) StepFactory
- func NewAIExtractStepFactory(registry *ai.AIModelRegistry) StepFactory
- func NewApigwApplyStepFactory() StepFactory
- func NewApigwDestroyStepFactory() StepFactory
- func NewApigwPlanStepFactory() StepFactory
- func NewApigwStatusStepFactory() StepFactory
- func NewAppDeployStepFactory() StepFactory
- func NewAppRollbackStepFactory() StepFactory
- func NewAppStatusStepFactory() StepFactory
- func NewArgoDeleteStepFactory() StepFactory
- func NewArgoListStepFactory() StepFactory
- func NewArgoLogsStepFactory() StepFactory
- func NewArgoStatusStepFactory() StepFactory
- func NewArgoSubmitStepFactory() StepFactory
- func NewArtifactDeleteStepFactory() StepFactory
- func NewArtifactDownloadStepFactory() StepFactory
- func NewArtifactListStepFactory() StepFactory
- func NewArtifactPullStepFactory() StepFactory
- func NewArtifactPushStepFactory() StepFactory
- func NewArtifactUploadStepFactory() StepFactory
- func NewBuildBinaryStepFactory() StepFactory
- func NewBuildFromConfigStepFactory() StepFactory
- func NewBuildUIStepFactory() StepFactory
- func NewCacheDeleteStepFactory() StepFactory
- func NewCacheGetStepFactory() StepFactory
- func NewCacheSetStepFactory() StepFactory
- func NewCircuitBreakerStepFactory() StepFactory
- func NewCloudValidateStepFactory() StepFactory
- func NewCodeBuildCreateProjectStepFactory() StepFactory
- func NewCodeBuildDeleteProjectStepFactory() StepFactory
- func NewCodeBuildListBuildsStepFactory() StepFactory
- func NewCodeBuildLogsStepFactory() StepFactory
- func NewCodeBuildStartStepFactory() StepFactory
- func NewCodeBuildStatusStepFactory() StepFactory
- func NewConditionalStepFactory() StepFactory
- func NewConstraintCheckStepFactory() StepFactory
- func NewDBExecStepFactory() StepFactory
- func NewDBQueryStepFactory() StepFactory
- func NewDNSApplyStepFactory() StepFactory
- func NewDNSPlanStepFactory() StepFactory
- func NewDNSStatusStepFactory() StepFactory
- func NewDODeployStepFactory() StepFactory
- func NewDODestroyStepFactory() StepFactory
- func NewDOLogsStepFactory() StepFactory
- func NewDOScaleStepFactory() StepFactory
- func NewDOStatusStepFactory() StepFactory
- func NewDelegateStepFactory() StepFactory
- func NewDeployStepFactory() StepFactory
- func NewDockerBuildStepFactory() StepFactory
- func NewDockerPushStepFactory() StepFactory
- func NewDockerRunStepFactory() StepFactory
- func NewDriftCheckStepFactory() StepFactory
- func NewECSApplyStepFactory() StepFactory
- func NewECSDestroyStepFactory() StepFactory
- func NewECSPlanStepFactory() StepFactory
- func NewECSStatusStepFactory() StepFactory
- func NewFFGateStepFactory(service *featureflag.Service) StepFactory
- func NewFeatureFlagStepFactory(service *featureflag.Service) StepFactory
- func NewForEachStepFactory(registryFn func() *StepRegistry, app modular.Application) StepFactory
- func NewGateStepFactory() StepFactory
- func NewGitCheckoutStepFactory() StepFactory
- func NewGitCloneStepFactory() StepFactory
- func NewGitCommitStepFactory() StepFactory
- func NewGitLabCreateMRStepFactory() StepFactory
- func NewGitLabMRCommentStepFactory() StepFactory
- func NewGitLabPipelineStatusStepFactory() StepFactory
- func NewGitLabTriggerPipelineStepFactory() StepFactory
- func NewGitLabWebhookParseStepFactory() StepFactory
- func NewGitPushStepFactory() StepFactory
- func NewGitTagStepFactory() StepFactory
- func NewHTTPCallStepFactory() StepFactory
- func NewIaCApplyStepFactory() StepFactory
- func NewIaCDestroyStepFactory() StepFactory
- func NewIaCDriftDetectStepFactory() StepFactory
- func NewIaCPlanStepFactory() StepFactory
- func NewIaCStatusStepFactory() StepFactory
- func NewJQStepFactory() StepFactory
- func NewJSONResponseStepFactory() StepFactory
- func NewK8sApplyStepFactory() StepFactory
- func NewK8sDestroyStepFactory() StepFactory
- func NewK8sPlanStepFactory() StepFactory
- func NewK8sStatusStepFactory() StepFactory
- func NewLogStepFactory() StepFactory
- func NewMarketplaceDetailStepFactory(registry MarketplaceRegistry) StepFactory
- func NewMarketplaceInstallStepFactory(registry MarketplaceRegistry) StepFactory
- func NewMarketplaceInstalledStepFactory(registry MarketplaceRegistry) StepFactory
- func NewMarketplaceSearchStepFactory(registry MarketplaceRegistry) StepFactory
- func NewMarketplaceUninstallStepFactory(registry MarketplaceRegistry) StepFactory
- func NewMarketplaceUpdateStepFactory(registry MarketplaceRegistry) StepFactory
- func NewNetworkApplyStepFactory() StepFactory
- func NewNetworkPlanStepFactory() StepFactory
- func NewNetworkStatusStepFactory() StepFactory
- func NewNoSQLDeleteStepFactory() StepFactory
- func NewNoSQLGetStepFactory() StepFactory
- func NewNoSQLPutStepFactory() StepFactory
- func NewNoSQLQueryStepFactory() StepFactory
- func NewPlatformApplyStepFactory() StepFactory
- func NewPlatformDestroyStepFactory() StepFactory
- func NewPlatformPlanStepFactory() StepFactory
- func NewPlatformTemplateStepFactory() StepFactory
- func NewPolicyEvaluateStepFactory() StepFactory
- func NewPolicyListStepFactory() StepFactory
- func NewPolicyLoadStepFactory() StepFactory
- func NewPolicyTestStepFactory() StepFactory
- func NewPublishStepFactory() StepFactory
- func NewRateLimitStepFactory() StepFactory
- func NewRegionDeployStepFactory() StepFactory
- func NewRegionFailoverStepFactory() StepFactory
- func NewRegionPromoteStepFactory() StepFactory
- func NewRegionStatusStepFactory() StepFactory
- func NewRegionSyncStepFactory() StepFactory
- func NewRegionWeightStepFactory() StepFactory
- func NewRequestParseStepFactory() StepFactory
- func NewScaffoldAnalyzeStepFactory() StepFactory
- func NewScaffoldStepFactory() StepFactory
- func NewScalingApplyStepFactory() StepFactory
- func NewScalingDestroyStepFactory() StepFactory
- func NewScalingPlanStepFactory() StepFactory
- func NewScalingStatusStepFactory() StepFactory
- func NewScanContainerStepFactory() StepFactory
- func NewScanDepsStepFactory() StepFactory
- func NewScanSASTStepFactory() StepFactory
- func NewSetStepFactory() StepFactory
- func NewShellExecStepFactory() StepFactory
- func NewStateMachineGetStepFactory() StepFactory
- func NewStateMachineTransitionStepFactory() StepFactory
- func NewSubWorkflowStepFactory(registry *plugin.PluginWorkflowRegistry, stepBuilder SubWorkflowStepBuilder) StepFactory
- func NewTraceAnnotateStepFactory() StepFactory
- func NewTraceExtractStepFactory() StepFactory
- func NewTraceInjectStepFactory() StepFactory
- func NewTraceLinkStepFactory() StepFactory
- func NewTraceStartStepFactory() StepFactory
- func NewTransformStepFactory() StepFactory
- func NewValidatePaginationStepFactory() StepFactory
- func NewValidatePathParamStepFactory() StepFactory
- func NewValidateRequestBodyStepFactory() StepFactory
- func NewValidateStepFactory() StepFactory
- func NewWebhookVerifyStepFactory() StepFactory
- func NewWorkflowCallStepFactory(lookup PipelineLookupFn) StepFactory
- type StepLifecycleEvent
- type StepRegistry
- type StepResult
- type SubWorkflowStep
- type SubWorkflowStepBuilder
- type SubnetConfig
- type TemplateEngine
- type TestHelper
- type TestLogger
- type TimelineServiceModule
- func (m *TimelineServiceModule) BackfillMux() http.Handler
- func (m *TimelineServiceModule) Init(_ modular.Application) error
- func (m *TimelineServiceModule) Name() string
- func (m *TimelineServiceModule) ProvidesServices() []modular.ServiceProvider
- func (m *TimelineServiceModule) ReplayMux() http.Handler
- func (m *TimelineServiceModule) RequiresServices() []modular.ServiceDependency
- func (m *TimelineServiceModule) TimelineMux() http.Handler
- type TraceAnnotateStep
- type TraceExtractStep
- type TraceInjectStep
- type TraceLinkStep
- type TracePropagationModule
- func (m *TracePropagationModule) EventBridgePropagator() *EventBridgeTracePropagator
- func (m *TracePropagationModule) Format() string
- func (m *TracePropagationModule) HTTPPropagator() *HTTPTracePropagator
- func (m *TracePropagationModule) Init(_ modular.Application) error
- func (m *TracePropagationModule) KafkaPropagator() *KafkaTracePropagator
- func (m *TracePropagationModule) Name() string
- func (m *TracePropagationModule) ProvidesServices() []modular.ServiceProvider
- func (m *TracePropagationModule) RequiresServices() []modular.ServiceDependency
- func (m *TracePropagationModule) Start(_ context.Context) error
- func (m *TracePropagationModule) Stop(_ context.Context) error
- func (m *TracePropagationModule) WebhookPropagator() *WebhookTracePropagator
- type TraceStartStep
- type TransformOperation
- type TransformPipeline
- type TransformStep
- type Transition
- type TransitionEvent
- type TransitionHandler
- type TransitionListener
- type TransitionTrigger
- type Trigger
- type TriggerRegistry
- type TriggerWorkflower
- type User
- type UserRecord
- type UserStore
- func (u *UserStore) CreateUser(email, name, password string, metadata map[string]any) (*User, error)
- func (u *UserStore) DeleteUser(id string) error
- func (u *UserStore) GetUser(email string) (*User, bool)
- func (u *UserStore) GetUserByID(id string) (*User, bool)
- func (u *UserStore) Init(app modular.Application) error
- func (u *UserStore) ListUsers() []*User
- func (u *UserStore) LoadSeedFile(path string) error
- func (u *UserStore) Name() string
- func (u *UserStore) ProvidesServices() []modular.ServiceProvider
- func (u *UserStore) RequiresServices() []modular.ServiceDependency
- func (u *UserStore) Start(_ context.Context) error
- func (u *UserStore) Stop(_ context.Context) error
- func (u *UserStore) UpdateUserMetadata(id string, metadata map[string]any) error
- func (u *UserStore) UserCount() int
- func (u *UserStore) VerifyPassword(email, password string) (*User, error)
- type V1APIHandler
- func (h *V1APIHandler) HandleV1(w http.ResponseWriter, r *http.Request)
- func (h *V1APIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (h *V1APIHandler) SetDataDir(dir string)
- func (h *V1APIHandler) SetFeatureFlagService(svc FeatureFlagAdmin)
- func (h *V1APIHandler) SetReloadFunc(fn func(configYAML string) error)
- func (h *V1APIHandler) SetRuntimeManager(rm *RuntimeManager)
- func (h *V1APIHandler) SetWorkspaceHandler(wh *WorkspaceHandler)
- type V1Company
- type V1Project
- type V1Store
- func (s *V1Store) Close() error
- func (s *V1Store) CompleteExecution(id, status string, completedAt time.Time, durationMs int64, errorMsg string) error
- func (s *V1Store) CompleteExecutionStep(id, status string, completedAt time.Time, durationMs int64, errorMsg string) error
- func (s *V1Store) CountExecutionsByWorkflow(workflowID string) (map[string]int, error)
- func (s *V1Store) CountLogsByWorkflow(workflowID string) (map[string]int, error)
- func (s *V1Store) CreateCompany(name, slug, ownerID string) (*V1Company, error)
- func (s *V1Store) CreateOrganization(parentID, name, slug, ownerID string) (*V1Company, error)
- func (s *V1Store) CreateProject(companyID, name, slug, description string) (*V1Project, error)
- func (s *V1Store) CreateWorkflow(projectID, name, slug, description, configYAML, createdBy string) (*V1Workflow, error)
- func (s *V1Store) DB() *sql.DB
- func (s *V1Store) DeleteWorkflow(id string) error
- func (s *V1Store) EnsureSystemHierarchy(ownerID, adminConfigYAML string) (companyID, orgID, projectID, workflowID string, err error)
- func (s *V1Store) GetCompany(id string) (*V1Company, error)
- func (s *V1Store) GetProject(id string) (*V1Project, error)
- func (s *V1Store) GetSystemWorkflow() (*V1Workflow, error)
- func (s *V1Store) GetVersion(workflowID string, version int) (*V1WorkflowVersion, error)
- func (s *V1Store) GetWorkflow(id string) (*V1Workflow, error)
- func (s *V1Store) GetWorkflowBySlugAndProject(slug, projectID string) (*V1Workflow, error)
- func (s *V1Store) InsertExecution(id, workflowID, triggerType, status, triggeredBy string, startedAt time.Time) error
- func (s *V1Store) InsertExecutionStep(id, executionID, stepName, stepType, status string, seqNum int, ...) error
- func (s *V1Store) InsertLog(workflowID, executionID, level, message, moduleName, fields string, ...) error
- func (s *V1Store) ListAllProjects() ([]V1Project, error)
- func (s *V1Store) ListCompanies(ownerID string) ([]V1Company, error)
- func (s *V1Store) ListOrganizations(parentID string) ([]V1Company, error)
- func (s *V1Store) ListProjects(companyID string) ([]V1Project, error)
- func (s *V1Store) ListVersions(workflowID string) ([]V1WorkflowVersion, error)
- func (s *V1Store) ListWorkflows(projectID string) ([]V1Workflow, error)
- func (s *V1Store) ResetSystemWorkflow(configYAML string) error
- func (s *V1Store) SaveVersion(workflowID, configYAML, createdBy string) error
- func (s *V1Store) SetWorkflowStatus(id, status string) (*V1Workflow, error)
- func (s *V1Store) SetWorkspaceDir(id, workspaceDir string) error
- func (s *V1Store) UpdateWorkflow(id string, name, description, configYAML, updatedBy string) (*V1Workflow, error)
- func (s *V1Store) UpdateWorkflowWorkspaceDir(id, workspaceDir string) error
- type V1Workflow
- type V1WorkflowVersion
- type VPCConfig
- type ValidatePaginationStep
- type ValidatePathParamStep
- type ValidateRequestBodyStep
- type ValidateStep
- type ValidatingNamespace
- type ValidationIssue
- type ValidationSeverity
- type WebhookConfig
- type WebhookDelivery
- type WebhookIntegrationConnector
- func (c *WebhookIntegrationConnector) Connect(ctx context.Context) error
- func (c *WebhookIntegrationConnector) Disconnect(ctx context.Context) error
- func (c *WebhookIntegrationConnector) Execute(ctx context.Context, action string, params map[string]any) (map[string]any, error)
- func (c *WebhookIntegrationConnector) GetName() string
- func (c *WebhookIntegrationConnector) IsConnected() bool
- func (c *WebhookIntegrationConnector) RegisterEventHandler(eventType string, handler func(context.Context, map[string]any) error)
- type WebhookSender
- func (ws *WebhookSender) GetDeadLetters() []*WebhookDelivery
- func (ws *WebhookSender) Init(app modular.Application) error
- func (ws *WebhookSender) Name() string
- func (ws *WebhookSender) RetryDeadLetter(ctx context.Context, id string) (*WebhookDelivery, error)
- func (ws *WebhookSender) Send(ctx context.Context, url string, payload []byte, headers map[string]string) (*WebhookDelivery, error)
- func (ws *WebhookSender) SetClient(client *http.Client)
- type WebhookTracePropagator
- func (p *WebhookTracePropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
- func (p *WebhookTracePropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) error
- func (p *WebhookTracePropagator) InjectRequest(ctx context.Context, req *http.Request) error
- type WebhookVerifyStep
- type WorkflowCallMode
- type WorkflowCallStep
- type WorkflowConfig
- type WorkflowDatabase
- func (w *WorkflowDatabase) Close() error
- func (w *WorkflowDatabase) DB() *sql.DB
- func (w *WorkflowDatabase) DeleteRows(ctx context.Context, table string, where string, whereArgs ...any) (int64, error)
- func (w *WorkflowDatabase) Execute(ctx context.Context, sqlStr string, args ...any) (int64, error)
- func (w *WorkflowDatabase) Init(app modular.Application) error
- func (w *WorkflowDatabase) InsertRow(ctx context.Context, table string, data map[string]any) (int64, error)
- func (w *WorkflowDatabase) Name() string
- func (w *WorkflowDatabase) Open() (*sql.DB, error)
- func (w *WorkflowDatabase) Ping(ctx context.Context) error
- func (w *WorkflowDatabase) ProvidesServices() []modular.ServiceProvider
- func (w *WorkflowDatabase) Query(ctx context.Context, sqlStr string, args ...any) (*QueryResult, error)
- func (w *WorkflowDatabase) RequiresServices() []modular.ServiceDependency
- func (w *WorkflowDatabase) UpdateRows(ctx context.Context, table string, data map[string]any, where string, ...) (int64, error)
- type WorkflowEngine
- type WorkflowEventEmitter
- func (e *WorkflowEventEmitter) EmitStepCompleted(ctx context.Context, workflowType, stepName, connector, action string, ...)
- func (e *WorkflowEventEmitter) EmitStepFailed(ctx context.Context, workflowType, stepName, connector, action string, ...)
- func (e *WorkflowEventEmitter) EmitStepStarted(ctx context.Context, workflowType, stepName, connector, action string)
- func (e *WorkflowEventEmitter) EmitWorkflowCompleted(ctx context.Context, workflowType, action string, duration time.Duration, ...)
- func (e *WorkflowEventEmitter) EmitWorkflowFailed(ctx context.Context, workflowType, action string, duration time.Duration, ...)
- func (e *WorkflowEventEmitter) EmitWorkflowStarted(ctx context.Context, workflowType, action string, data map[string]any)
- type WorkflowInstance
- type WorkflowLifecycleEvent
- type WorkflowRegistry
- func (w *WorkflowRegistry) Init(app modular.Application) error
- func (w *WorkflowRegistry) Name() string
- func (w *WorkflowRegistry) ProvidesServices() []modular.ServiceProvider
- func (w *WorkflowRegistry) RequiresServices() []modular.ServiceDependency
- func (w *WorkflowRegistry) Start(_ context.Context) error
- func (w *WorkflowRegistry) Stop(_ context.Context) error
- func (w *WorkflowRegistry) Store() *V1Store
- func (w *WorkflowRegistry) WorkflowStore() any
- type WorkflowTriggerInfo
- type WorkflowUIHandler
- func (h *WorkflowUIHandler) HandleGetConfig(w http.ResponseWriter, r *http.Request)
- func (h *WorkflowUIHandler) HandleGetModules(w http.ResponseWriter, r *http.Request)
- func (h *WorkflowUIHandler) HandleGetServices(w http.ResponseWriter, r *http.Request)
- func (h *WorkflowUIHandler) HandleManagement(w http.ResponseWriter, r *http.Request)
- func (h *WorkflowUIHandler) HandlePutConfig(w http.ResponseWriter, r *http.Request)
- func (h *WorkflowUIHandler) HandleReload(w http.ResponseWriter, r *http.Request)
- func (h *WorkflowUIHandler) HandleStatus(w http.ResponseWriter, r *http.Request)
- func (h *WorkflowUIHandler) HandleValidate(w http.ResponseWriter, r *http.Request)
- func (h *WorkflowUIHandler) RegisterRoutes(mux *http.ServeMux)
- func (h *WorkflowUIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (h *WorkflowUIHandler) SetReloadFunc(fn func(*config.WorkflowConfig) error)
- func (h *WorkflowUIHandler) SetServiceRegistry(fn func() map[string]any)
- func (h *WorkflowUIHandler) SetStatusFunc(fn func() map[string]any)
- type WorkspaceHandler
Constants ¶
const ( LifecycleStarted = "started" LifecycleCompleted = "completed" LifecycleFailed = "failed" )
Lifecycle constants for workflow and step events.
const EventBusBridgeName = "messaging.broker.eventbus"
EventBusBridgeName is the default service name for the EventBus bridge adapter.
const (
// EventBusTriggerName is the standard name for the EventBus trigger.
EventBusTriggerName = "trigger.eventbus"
)
const (
// EventTriggerName is the standard name for event triggers
EventTriggerName = "trigger.event"
)
const (
// HTTPTriggerName is the standard name for HTTP triggers
HTTPTriggerName = "trigger.http"
)
const (
InMemoryMessageBrokerName = "messaging.broker.memory"
)
Standard module name constants
const (
// ReconciliationTriggerName is the standard name for reconciliation triggers.
ReconciliationTriggerName = "trigger.reconciliation"
)
const (
// ScheduleTriggerName is the standard name for schedule triggers
ScheduleTriggerName = "trigger.schedule"
)
const (
SimpleMessageHandlerName = "messaging.handler"
)
Standard module name constants
const (
StateMachineEngineName = "statemachine.engine"
)
Standard module name constants
const StateMachineStateConnectorName = "workflow.connector.statemachine"
StateMachineStateConnectorName is the standard service name
const StateTrackerName = "workflow.service.statetracker"
StateTrackerName is the standard name for the state tracker service
Variables ¶
var ErrNotImplemented = errors.New("step not implemented: requires sandbox.DockerSandbox (not yet available)")
ErrNotImplemented is returned by pipeline steps that are defined but not yet backed by a real execution engine (e.g. steps that require sandbox.DockerSandbox). Callers should treat this as a hard failure; relying on a stub step would give false confidence in CI/CD pipelines.
var HTTPRequestContextKey = httpReqContextKey{}
HTTPRequestContextKey is the context key used to pass an *http.Request through the pipeline execution context. Pipeline.Execute extracts this value and injects it into PipelineContext.Metadata["_http_request"] so that steps can read request headers, path parameters, and the request body.
var HTTPResponseWriterContextKey = httpRWContextKey{}
HTTPResponseWriterContextKey is the context key used to pass an http.ResponseWriter through the pipeline execution context. Pipeline.Execute extracts this value and injects it into PipelineContext.Metadata["_http_response_writer"] so that steps like step.json_response can write directly to the HTTP response.
Functions ¶
func BuildDeleteSQL ¶
BuildDeleteSQL builds a DELETE SQL string (exported for testing). Returns an error if the table name contains unsafe characters.
func BuildInsertSQL ¶
BuildInsertSQL builds an INSERT SQL string and returns it with values (exported for testing). Returns an error if table or column names contain unsafe characters.
func BuildUpdateSQL ¶
func BuildUpdateSQL(table string, data map[string]any, where string, whereArgs ...any) (string, []any, error)
BuildUpdateSQL builds an UPDATE SQL string and returns it with values (exported for testing). Returns an error if table or column names contain unsafe characters.
func CalculateBackoff ¶
func CalculateBackoff(initialBackoff time.Duration, multiplier float64, maxBackoff time.Duration, attempt int) time.Duration
CalculateBackoff is exported for testing
func CreateIsolatedApp ¶
func CreateIsolatedApp(t *testing.T) modular.Application
CreateIsolatedApp creates an isolated application for tests
func DefaultSummaryFields ¶
func DefaultSummaryFields() []string
DefaultSummaryFields returns the default list of fields to include in summary responses.
func DefaultTransitionMap ¶
DefaultTransitionMap returns the default sub-action to state machine transition mapping.
func ExpandEnvString ¶ added in v0.2.7
ExpandEnvString resolves ${VAR} and $VAR environment variable references.
func GatewayTimeout ¶
func GatewayTimeout(route *GatewayRoute, defaultTimeout time.Duration) time.Duration
GatewayTimeout returns the parsed timeout for a route, or the default.
func GetRequestID ¶
GetRequestID extracts the request ID from the context.
func RegisterAdminSchemas ¶
func RegisterAdminSchemas(gen *OpenAPIGenerator)
RegisterAdminSchemas registers all admin API request/response schemas on the given OpenAPI generator. Call after BuildSpec and before ApplySchemas.
func SkipTestWithContext ¶
Skip tests with a context.Context parameter
func StepTopic ¶
StepTopic returns the event bus topic for a step lifecycle event. Format: "workflow.<workflowType>.step.<stepName>.<lifecycle>"
func WorkflowTopic ¶
WorkflowTopic returns the event bus topic for a workflow lifecycle event. Format: "workflow.<workflowType>.<lifecycle>"
Types ¶
type AIClassifyStep ¶
type AIClassifyStep struct {
// contains filtered or unexported fields
}
AIClassifyStep takes input text and a list of categories, then uses an AI provider to classify the text into one of the categories.
func (*AIClassifyStep) Execute ¶
func (s *AIClassifyStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*AIClassifyStep) Name ¶
func (s *AIClassifyStep) Name() string
type AICompleteStep ¶
type AICompleteStep struct {
// contains filtered or unexported fields
}
AICompleteStep invokes an AI provider to produce a text completion.
func (*AICompleteStep) Execute ¶
func (s *AICompleteStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*AICompleteStep) Name ¶
func (s *AICompleteStep) Name() string
type AIExtractStep ¶
type AIExtractStep struct {
// contains filtered or unexported fields
}
AIExtractStep takes input text and an extraction schema, then uses an AI provider with tool use to extract structured data from the text.
func (*AIExtractStep) Execute ¶
func (s *AIExtractStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*AIExtractStep) Name ¶
func (s *AIExtractStep) Name() string
type APIGateway ¶
type APIGateway struct {
// contains filtered or unexported fields
}
APIGateway is a composable gateway module that combines routing, auth, rate limiting, and proxying into a single module.
Each APIGateway instance maintains its own independent rate limiter state. Rate limiters are never shared across instances, so multiple APIGateway instances (e.g. in multi-tenant deployments) do not interfere with each other.
func NewAPIGateway ¶
func NewAPIGateway(name string, opts ...APIGatewayOption) *APIGateway
NewAPIGateway creates a new APIGateway module. Optional functional options can be provided to configure the instance at construction time (e.g. WithRateLimit).
func (*APIGateway) Handle ¶
func (g *APIGateway) Handle(w http.ResponseWriter, r *http.Request)
Handle processes incoming HTTP requests through the gateway pipeline: CORS -> rate limiting -> auth -> method check -> proxy.
func (*APIGateway) Init ¶
func (g *APIGateway) Init(_ modular.Application) error
Init initializes the module.
func (*APIGateway) ProvidesServices ¶
func (g *APIGateway) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*APIGateway) RequiresServices ¶
func (g *APIGateway) RequiresServices() []modular.ServiceDependency
RequiresServices returns no dependencies.
func (*APIGateway) Routes ¶
func (g *APIGateway) Routes() []GatewayRoute
Routes returns the configured routes (for introspection/testing).
func (*APIGateway) SetAuth ¶
func (g *APIGateway) SetAuth(cfg *AuthConfig)
SetAuth configures authentication settings.
func (*APIGateway) SetCORS ¶
func (g *APIGateway) SetCORS(cfg *CORSConfig)
SetCORS configures CORS settings.
func (*APIGateway) SetGlobalRateLimit
deprecated
func (g *APIGateway) SetGlobalRateLimit(cfg *RateLimitConfig)
SetGlobalRateLimit is deprecated: use SetRateLimit instead. The rate limiter has always been instance-scoped; this method was misleadingly named.
Deprecated: Use SetRateLimit.
func (*APIGateway) SetRateLimit ¶ added in v0.1.6
func (g *APIGateway) SetRateLimit(cfg *RateLimitConfig)
SetRateLimit configures an instance-level rate limit applied to all routes on this gateway. The limiter is scoped to this APIGateway instance and does not affect any other instance. Prefer injecting rate limit config via WithRateLimit at construction time when possible.
func (*APIGateway) SetRoutes ¶
func (g *APIGateway) SetRoutes(routes []GatewayRoute) error
SetRoutes configures the gateway routes.
type APIGatewayOption ¶ added in v0.1.6
type APIGatewayOption func(*APIGateway)
APIGatewayOption is a functional option for configuring an APIGateway at construction time.
func WithRateLimit ¶ added in v0.1.6
func WithRateLimit(cfg *RateLimitConfig) APIGatewayOption
WithRateLimit sets an instance-level rate limit applied to all requests before per-route limits are checked. The limiter is scoped to this APIGateway instance and does not affect any other instance.
type AWSAPIGateway ¶
type AWSAPIGateway struct {
// contains filtered or unexported fields
}
AWSAPIGateway is a stub module that syncs workflow HTTP routes to AWS API Gateway. Actual AWS SDK integration is future work.
func NewAWSAPIGateway ¶
func NewAWSAPIGateway(name string) *AWSAPIGateway
NewAWSAPIGateway creates a new AWS API Gateway sync module.
func (*AWSAPIGateway) APIID ¶
func (a *AWSAPIGateway) APIID() string
APIID returns the configured API ID.
func (*AWSAPIGateway) Init ¶
func (a *AWSAPIGateway) Init(_ modular.Application) error
Init initializes the module.
func (*AWSAPIGateway) ProvidesServices ¶
func (a *AWSAPIGateway) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*AWSAPIGateway) Region ¶
func (a *AWSAPIGateway) Region() string
Region returns the configured AWS region.
func (*AWSAPIGateway) RequiresServices ¶
func (a *AWSAPIGateway) RequiresServices() []modular.ServiceDependency
RequiresServices returns no dependencies.
func (*AWSAPIGateway) SetConfig ¶
func (a *AWSAPIGateway) SetConfig(region, apiID, stage string)
SetConfig configures the AWS API Gateway module.
func (*AWSAPIGateway) Stage ¶
func (a *AWSAPIGateway) Stage() string
Stage returns the configured deployment stage.
func (*AWSAPIGateway) Start ¶
func (a *AWSAPIGateway) Start(_ context.Context) error
Start logs that the module would sync routes (stub).
func (*AWSAPIGateway) SyncRoutes ¶
func (a *AWSAPIGateway) SyncRoutes(routes []GatewayRoute) error
SyncRoutes would sync the given routes to AWS API Gateway. This is a stub that only logs what it would do.
type AWSConfigProvider ¶ added in v0.2.15
type AWSConfigProvider interface {
CloudCredentialProvider
// AWSConfig returns a configured aws.Config for the current credential set.
AWSConfig(ctx context.Context) (aws.Config, error)
}
AWSConfigProvider extends CloudCredentialProvider with AWS SDK config loading. Platform modules that need to call AWS APIs type-assert their CloudCredentialProvider to this interface to obtain a properly configured aws.Config.
type ApigwApplyStep ¶ added in v0.2.14
type ApigwApplyStep struct {
// contains filtered or unexported fields
}
ApigwApplyStep calls Apply() on a named platform.apigateway module.
func (*ApigwApplyStep) Execute ¶ added in v0.2.14
func (s *ApigwApplyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ApigwApplyStep) Name ¶ added in v0.2.14
func (s *ApigwApplyStep) Name() string
type ApigwDestroyStep ¶ added in v0.2.14
type ApigwDestroyStep struct {
// contains filtered or unexported fields
}
ApigwDestroyStep calls Destroy() on a named platform.apigateway module.
func (*ApigwDestroyStep) Execute ¶ added in v0.2.14
func (s *ApigwDestroyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ApigwDestroyStep) Name ¶ added in v0.2.14
func (s *ApigwDestroyStep) Name() string
type ApigwPlanStep ¶ added in v0.2.14
type ApigwPlanStep struct {
// contains filtered or unexported fields
}
ApigwPlanStep calls Plan() on a named platform.apigateway module.
func (*ApigwPlanStep) Execute ¶ added in v0.2.14
func (s *ApigwPlanStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ApigwPlanStep) Name ¶ added in v0.2.14
func (s *ApigwPlanStep) Name() string
type ApigwStatusStep ¶ added in v0.2.14
type ApigwStatusStep struct {
// contains filtered or unexported fields
}
ApigwStatusStep calls Status() on a named platform.apigateway module.
func (*ApigwStatusStep) Execute ¶ added in v0.2.14
func (s *ApigwStatusStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ApigwStatusStep) Name ¶ added in v0.2.14
func (s *ApigwStatusStep) Name() string
type AppContainerModule ¶ added in v0.2.14
type AppContainerModule struct {
// contains filtered or unexported fields
}
AppContainerModule manages application containers on top of platform modules. Config:
environment: name of a platform.kubernetes or platform.ecs module (service registry) image: container image (required) replicas: desired replica count (default: 1) ports: list of container ports cpu: CPU request/limit (default: "256m") memory: memory request/limit (default: "512Mi") env: environment variables health_path: HTTP health check path (default: "/healthz") health_port: health check port (default: first port or 8080)
func NewAppContainerModule ¶ added in v0.2.14
func NewAppContainerModule(name string, cfg map[string]any) *AppContainerModule
NewAppContainerModule creates a new AppContainerModule.
func (*AppContainerModule) Deploy ¶ added in v0.2.14
func (m *AppContainerModule) Deploy() (*AppDeployResult, error)
Deploy stores the previous deployment state and creates a new deployment. The mock backend immediately transitions to "active".
func (*AppContainerModule) Init ¶ added in v0.2.14
func (m *AppContainerModule) Init(app modular.Application) error
Init resolves the environment module and initialises the platform backend.
func (*AppContainerModule) Manifests ¶ added in v0.2.14
func (m *AppContainerModule) Manifests() (any, error)
Manifests returns the generated platform-specific resource manifests.
func (*AppContainerModule) Name ¶ added in v0.2.14
func (m *AppContainerModule) Name() string
Name returns the module name.
func (*AppContainerModule) ProvidesServices ¶ added in v0.2.14
func (m *AppContainerModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*AppContainerModule) RequiresServices ¶ added in v0.2.14
func (m *AppContainerModule) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — environment is resolved by name, not declared.
func (*AppContainerModule) Rollback ¶ added in v0.2.14
func (m *AppContainerModule) Rollback() (*AppDeployResult, error)
Rollback reverts the deployment to the previous image/config. Returns an error if there is no previous deployment to roll back to.
func (*AppContainerModule) Spec ¶ added in v0.2.14
func (m *AppContainerModule) Spec() AppContainerSpec
Spec returns the parsed AppContainerSpec (used in tests and pipeline steps).
func (*AppContainerModule) Status ¶ added in v0.2.14
func (m *AppContainerModule) Status() (*AppDeployResult, error)
Status returns the current deployment result.
type AppContainerSpec ¶ added in v0.2.14
type AppContainerSpec struct {
Image string `json:"image"`
Replicas int `json:"replicas"`
Ports []int `json:"ports"`
Env map[string]string `json:"env"`
CPU string `json:"cpu"`
Memory string `json:"memory"`
HealthPath string `json:"healthPath"`
HealthPort int `json:"healthPort"`
}
AppContainerSpec describes the desired state of an application container.
type AppDeployResult ¶ added in v0.2.14
type AppDeployResult struct {
Platform string `json:"platform"` // kubernetes, ecs
Name string `json:"name"`
Status string `json:"status"` // deploying, active, failed, rolled_back
Endpoint string `json:"endpoint"`
Replicas int `json:"replicas"`
Image string `json:"image"`
}
AppDeployResult holds the current deployment state.
type AppDeployStep ¶ added in v0.2.14
type AppDeployStep struct {
// contains filtered or unexported fields
}
AppDeployStep deploys an app.container module.
func (*AppDeployStep) Execute ¶ added in v0.2.14
func (s *AppDeployStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*AppDeployStep) Name ¶ added in v0.2.14
func (s *AppDeployStep) Name() string
type AppRollbackStep ¶ added in v0.2.14
type AppRollbackStep struct {
// contains filtered or unexported fields
}
AppRollbackStep rolls back an app.container module to the previous deployment state.
func (*AppRollbackStep) Execute ¶ added in v0.2.14
func (s *AppRollbackStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*AppRollbackStep) Name ¶ added in v0.2.14
func (s *AppRollbackStep) Name() string
type AppStatusStep ¶ added in v0.2.14
type AppStatusStep struct {
// contains filtered or unexported fields
}
AppStatusStep returns the current deployment status of an app.container module.
func (*AppStatusStep) Execute ¶ added in v0.2.14
func (s *AppStatusStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*AppStatusStep) Name ¶ added in v0.2.14
func (s *AppStatusStep) Name() string
type ArgoContainer ¶ added in v0.2.15
type ArgoContainer struct {
Image string `json:"image"`
Command []string `json:"command,omitempty"`
Env map[string]string `json:"env,omitempty"`
}
ArgoContainer describes the container spec for a container template.
type ArgoDAGTask ¶ added in v0.2.15
type ArgoDAGTask struct {
Name string `json:"name"`
Template string `json:"template"`
Dependencies []string `json:"dependencies,omitempty"`
}
ArgoDAGTask is a task node in a DAG template.
type ArgoDeleteStep ¶ added in v0.2.15
type ArgoDeleteStep struct {
// contains filtered or unexported fields
}
ArgoDeleteStep removes a completed or failed Argo Workflow run.
func (*ArgoDeleteStep) Execute ¶ added in v0.2.15
func (s *ArgoDeleteStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
func (*ArgoDeleteStep) Name ¶ added in v0.2.15
func (s *ArgoDeleteStep) Name() string
type ArgoListStep ¶ added in v0.2.15
type ArgoListStep struct {
// contains filtered or unexported fields
}
ArgoListStep lists Argo Workflow runs with an optional label selector.
func (*ArgoListStep) Execute ¶ added in v0.2.15
func (s *ArgoListStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ArgoListStep) Name ¶ added in v0.2.15
func (s *ArgoListStep) Name() string
type ArgoLogsStep ¶ added in v0.2.15
type ArgoLogsStep struct {
// contains filtered or unexported fields
}
ArgoLogsStep retrieves log lines from an Argo Workflow run.
func (*ArgoLogsStep) Execute ¶ added in v0.2.15
func (s *ArgoLogsStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
func (*ArgoLogsStep) Name ¶ added in v0.2.15
func (s *ArgoLogsStep) Name() string
type ArgoStatusStep ¶ added in v0.2.15
type ArgoStatusStep struct {
// contains filtered or unexported fields
}
ArgoStatusStep checks the execution status of an Argo Workflow run.
func (*ArgoStatusStep) Execute ¶ added in v0.2.15
func (s *ArgoStatusStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
func (*ArgoStatusStep) Name ¶ added in v0.2.15
func (s *ArgoStatusStep) Name() string
type ArgoSubmitStep ¶ added in v0.2.15
type ArgoSubmitStep struct {
// contains filtered or unexported fields
}
ArgoSubmitStep submits an Argo Workflow built from pipeline step configs.
func (*ArgoSubmitStep) Execute ¶ added in v0.2.15
func (s *ArgoSubmitStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ArgoSubmitStep) Name ¶ added in v0.2.15
func (s *ArgoSubmitStep) Name() string
type ArgoTemplate ¶ added in v0.2.15
type ArgoTemplate struct {
Name string `json:"name"`
Kind string `json:"kind"` // dag, steps, container
DAG []ArgoDAGTask `json:"dag,omitempty"`
Container *ArgoContainer `json:"container,omitempty"`
}
ArgoTemplate is a single template (DAG or step list) within an Argo Workflow.
type ArgoWorkflowSpec ¶ added in v0.2.15
type ArgoWorkflowSpec struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Entrypoint string `json:"entrypoint"`
Templates []ArgoTemplate `json:"templates"`
Arguments map[string]string `json:"arguments,omitempty"`
}
ArgoWorkflowSpec is the translated Argo Workflow CRD spec derived from pipeline config.
func TranslatePipelineToArgo ¶ added in v0.2.15
func TranslatePipelineToArgo(workflowName, namespace string, steps []map[string]any) *ArgoWorkflowSpec
TranslatePipelineToArgo converts a list of pipeline step configs into an ArgoWorkflowSpec using a DAG template where each step becomes a task with sequential dependencies.
type ArgoWorkflowState ¶ added in v0.2.15
type ArgoWorkflowState struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Version string `json:"version"`
Status string `json:"status"` // pending, creating, running, deleting, deleted
Endpoint string `json:"endpoint"`
CreatedAt time.Time `json:"createdAt"`
}
ArgoWorkflowState holds the current state of a managed Argo Workflows installation.
type ArgoWorkflowsModule ¶ added in v0.2.15
type ArgoWorkflowsModule struct {
// contains filtered or unexported fields
}
ArgoWorkflowModule manages an Argo Workflows installation on Kubernetes. Config:
cluster: name of a platform.kubernetes module (resolved from service registry) namespace: Kubernetes namespace for Argo (default: argo) version: Argo Workflows version (e.g. "3.5")
func NewArgoWorkflowsModule ¶ added in v0.2.15
func NewArgoWorkflowsModule(name string, cfg map[string]any) *ArgoWorkflowsModule
NewArgoWorkflowsModule creates a new ArgoWorkflowsModule.
func (*ArgoWorkflowsModule) Apply ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) Apply() (*PlatformResult, error)
Apply installs or updates Argo Workflows.
func (*ArgoWorkflowsModule) DeleteWorkflow ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) DeleteWorkflow(workflowName string) error
DeleteWorkflow removes a completed or failed workflow.
func (*ArgoWorkflowsModule) Destroy ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) Destroy() error
Destroy uninstalls Argo Workflows.
func (*ArgoWorkflowsModule) Init ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) Init(app modular.Application) error
Init resolves optional cluster reference and initialises the mock backend.
func (*ArgoWorkflowsModule) ListWorkflows ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) ListWorkflows(labelSelector string) ([]string, error)
ListWorkflows lists workflows matching the optional label selector.
func (*ArgoWorkflowsModule) Name ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) Name() string
Name returns the module name.
func (*ArgoWorkflowsModule) Plan ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) Plan() (*PlatformPlan, error)
Plan returns the changes needed to install Argo Workflows.
func (*ArgoWorkflowsModule) ProvidesServices ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*ArgoWorkflowsModule) RequiresServices ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — cluster is resolved by name, not declared.
func (*ArgoWorkflowsModule) Status ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) Status() (any, error)
Status returns the current Argo Workflows installation state.
func (*ArgoWorkflowsModule) SubmitWorkflow ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) SubmitWorkflow(spec *ArgoWorkflowSpec) (string, error)
SubmitWorkflow translates a pipeline config into an Argo Workflow spec and submits it. Returns the workflow run name.
func (*ArgoWorkflowsModule) WorkflowLogs ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) WorkflowLogs(workflowName string) ([]string, error)
WorkflowLogs returns log lines from a workflow run.
func (*ArgoWorkflowsModule) WorkflowStatus ¶ added in v0.2.15
func (m *ArgoWorkflowsModule) WorkflowStatus(workflowName string) (string, error)
WorkflowStatus returns the execution status of a workflow run.
type ArtifactDeleteStep ¶ added in v0.2.13
type ArtifactDeleteStep struct {
// contains filtered or unexported fields
}
ArtifactDeleteStep removes an artifact from a named ArtifactStore.
func (*ArtifactDeleteStep) Execute ¶ added in v0.2.13
func (s *ArtifactDeleteStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*ArtifactDeleteStep) Name ¶ added in v0.2.13
func (s *ArtifactDeleteStep) Name() string
type ArtifactDownloadStep ¶ added in v0.2.13
type ArtifactDownloadStep struct {
// contains filtered or unexported fields
}
ArtifactDownloadStep downloads an artifact from a named ArtifactStore to a local path.
func (*ArtifactDownloadStep) Execute ¶ added in v0.2.13
func (s *ArtifactDownloadStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*ArtifactDownloadStep) Name ¶ added in v0.2.13
func (s *ArtifactDownloadStep) Name() string
type ArtifactFSConfig ¶ added in v0.2.13
ArtifactFSConfig holds configuration for the filesystem artifact store module.
type ArtifactFSModule ¶ added in v0.2.13
type ArtifactFSModule struct {
// contains filtered or unexported fields
}
ArtifactFSModule is a modular.Module that provides a filesystem-backed ArtifactStore. Module type: storage.artifact with backend: filesystem.
func NewArtifactFSModule ¶ added in v0.2.13
func NewArtifactFSModule(name string, cfg ArtifactFSConfig) *ArtifactFSModule
NewArtifactFSModule creates a new filesystem artifact store module.
func (*ArtifactFSModule) Delete ¶ added in v0.2.13
func (m *ArtifactFSModule) Delete(_ context.Context, key string) error
Delete removes the artifact and its sidecar.
func (*ArtifactFSModule) Download ¶ added in v0.2.13
func (m *ArtifactFSModule) Download(_ context.Context, key string) (io.ReadCloser, map[string]string, error)
Download retrieves content and metadata for key.
func (*ArtifactFSModule) Exists ¶ added in v0.2.13
Exists reports whether an artifact with the given key exists.
func (*ArtifactFSModule) Init ¶ added in v0.2.13
func (m *ArtifactFSModule) Init(app modular.Application) error
func (*ArtifactFSModule) List ¶ added in v0.2.13
func (m *ArtifactFSModule) List(_ context.Context, prefix string) ([]ArtifactInfo, error)
List returns ArtifactInfo for all artifacts whose key starts with prefix.
func (*ArtifactFSModule) Name ¶ added in v0.2.13
func (m *ArtifactFSModule) Name() string
func (*ArtifactFSModule) ProvidesServices ¶ added in v0.2.13
func (m *ArtifactFSModule) ProvidesServices() []modular.ServiceProvider
func (*ArtifactFSModule) RequiresServices ¶ added in v0.2.13
func (m *ArtifactFSModule) RequiresServices() []modular.ServiceDependency
func (*ArtifactFSModule) Start ¶ added in v0.2.13
func (m *ArtifactFSModule) Start(_ context.Context) error
type ArtifactInfo ¶ added in v0.2.13
ArtifactInfo describes a stored artifact.
type ArtifactListStep ¶ added in v0.2.13
type ArtifactListStep struct {
// contains filtered or unexported fields
}
ArtifactListStep lists artifacts in a named ArtifactStore.
func (*ArtifactListStep) Execute ¶ added in v0.2.13
func (s *ArtifactListStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*ArtifactListStep) Name ¶ added in v0.2.13
func (s *ArtifactListStep) Name() string
type ArtifactOutput ¶
ArtifactOutput defines an artifact to collect after shell execution.
type ArtifactPullStep ¶
type ArtifactPullStep struct {
// contains filtered or unexported fields
}
ArtifactPullStep retrieves an artifact from a configured source (previous execution, URL, or S3) and writes it to a destination path.
func (*ArtifactPullStep) Execute ¶
func (s *ArtifactPullStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute pulls the artifact from the configured source and writes it to dest.
func (*ArtifactPullStep) Name ¶
func (s *ArtifactPullStep) Name() string
Name returns the step name.
type ArtifactPushStep ¶
type ArtifactPushStep struct {
// contains filtered or unexported fields
}
ArtifactPushStep reads a file from sourcePath and stores it in the artifact store.
func (*ArtifactPushStep) Execute ¶
func (s *ArtifactPushStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute reads the source file and stores it as an artifact.
func (*ArtifactPushStep) Name ¶
func (s *ArtifactPushStep) Name() string
Name returns the step name.
type ArtifactS3Config ¶ added in v0.2.13
type ArtifactS3Config struct {
Bucket string
Prefix string
Region string
Endpoint string // "local" → filesystem fallback; otherwise S3 endpoint URL
BasePath string // used when Endpoint == "local"
Credentials struct {
AccessKeyID string
SecretAccessKey string
}
}
ArtifactS3Config holds configuration for the S3 artifact store module.
When Endpoint is set to "local", the module falls back to a filesystem backend rooted at BasePath (useful for local development and testing).
Full S3 implementation would use:
- aws-sdk-go-v2/service/s3 PutObject / GetObject / ListObjectsV2 / DeleteObject
- object key = Prefix + "/" + key
- metadata stored as S3 object user metadata (x-amz-meta-*)
- Exists implemented via HeadObject
type ArtifactS3Module ¶ added in v0.2.13
type ArtifactS3Module struct {
// contains filtered or unexported fields
}
ArtifactS3Module is a modular.Module that provides an S3-backed ArtifactStore. Module type: storage.artifact with backend: s3.
For MVP: when Endpoint == "local", delegates to the filesystem backend. Production S3 support requires wiring the aws-sdk-go-v2 S3 client.
func NewArtifactS3Module ¶ added in v0.2.13
func NewArtifactS3Module(name string, cfg ArtifactS3Config) *ArtifactS3Module
NewArtifactS3Module creates a new S3 artifact store module.
func (*ArtifactS3Module) Delete ¶ added in v0.2.13
func (m *ArtifactS3Module) Delete(ctx context.Context, key string) error
func (*ArtifactS3Module) Download ¶ added in v0.2.13
func (m *ArtifactS3Module) Download(ctx context.Context, key string) (io.ReadCloser, map[string]string, error)
func (*ArtifactS3Module) Init ¶ added in v0.2.13
func (m *ArtifactS3Module) Init(app modular.Application) error
func (*ArtifactS3Module) List ¶ added in v0.2.13
func (m *ArtifactS3Module) List(ctx context.Context, prefix string) ([]ArtifactInfo, error)
func (*ArtifactS3Module) Name ¶ added in v0.2.13
func (m *ArtifactS3Module) Name() string
func (*ArtifactS3Module) ProvidesServices ¶ added in v0.2.13
func (m *ArtifactS3Module) ProvidesServices() []modular.ServiceProvider
func (*ArtifactS3Module) RequiresServices ¶ added in v0.2.13
func (m *ArtifactS3Module) RequiresServices() []modular.ServiceDependency
func (*ArtifactS3Module) Start ¶ added in v0.2.13
func (m *ArtifactS3Module) Start(ctx context.Context) error
type ArtifactStore ¶ added in v0.2.13
type ArtifactStore interface {
// Upload stores content under key. metadata is optional.
Upload(ctx context.Context, key string, reader io.Reader, metadata map[string]string) error
// Download retrieves the content and metadata stored under key.
// The caller must close the returned ReadCloser.
Download(ctx context.Context, key string) (io.ReadCloser, map[string]string, error)
// List returns all artifacts whose key starts with prefix.
// Pass an empty prefix to list all artifacts.
List(ctx context.Context, prefix string) ([]ArtifactInfo, error)
// Delete removes the artifact stored under key.
Delete(ctx context.Context, key string) error
// Exists reports whether an artifact with the given key exists.
Exists(ctx context.Context, key string) (bool, error)
}
ArtifactStore is the interface for a named artifact storage backend. Unlike the execution-scoped artifact.Store, keys here are global (or caller-scoped) and support arbitrary metadata.
type ArtifactUploadStep ¶ added in v0.2.13
type ArtifactUploadStep struct {
// contains filtered or unexported fields
}
ArtifactUploadStep uploads a local file to a named ArtifactStore.
func (*ArtifactUploadStep) Execute ¶ added in v0.2.13
func (s *ArtifactUploadStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*ArtifactUploadStep) Name ¶ added in v0.2.13
func (s *ArtifactUploadStep) Name() string
type AuthConfig ¶
type AuthConfig struct {
Type string `json:"type"` // "bearer", "api_key", "basic"
Header string `json:"header"` // header name to check
}
AuthConfig defines authentication settings for the gateway.
type AuthMiddleware ¶
type AuthMiddleware struct {
// contains filtered or unexported fields
}
AuthMiddleware implements an HTTP authorization middleware
func NewAuthMiddleware ¶
func NewAuthMiddleware(name string, authType string) *AuthMiddleware
NewAuthMiddleware creates a new authentication middleware
func (*AuthMiddleware) AddProvider ¶
func (m *AuthMiddleware) AddProvider(validTokens map[string]map[string]any)
AddProvider creates and registers a simple token-based auth provider
func (*AuthMiddleware) Init ¶
func (m *AuthMiddleware) Init(app modular.Application) error
Init initializes the middleware with the application context
func (*AuthMiddleware) Process ¶
func (m *AuthMiddleware) Process(next http.Handler) http.Handler
Process implements the HTTPMiddleware interface
func (*AuthMiddleware) ProvidesServices ¶
func (m *AuthMiddleware) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module
func (*AuthMiddleware) RegisterProvider ¶
func (m *AuthMiddleware) RegisterProvider(provider AuthProvider)
RegisterProvider adds an authentication provider
func (*AuthMiddleware) RequiresServices ¶
func (m *AuthMiddleware) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module
type AuthProvider ¶
AuthProvider defines methods for authentication providers
type BuildBinaryStep ¶ added in v0.2.13
type BuildBinaryStep struct {
// contains filtered or unexported fields
}
BuildBinaryStep reads a workflow config YAML, generates a self-contained Go project that embeds the config, and compiles it into a standalone binary.
func (*BuildBinaryStep) Execute ¶ added in v0.2.13
func (s *BuildBinaryStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute generates the Go project and optionally compiles it.
func (*BuildBinaryStep) Name ¶ added in v0.2.13
func (s *BuildBinaryStep) Name() string
Name returns the step name.
type BuildFromConfigStep ¶ added in v0.2.6
type BuildFromConfigStep struct {
// contains filtered or unexported fields
}
BuildFromConfigStep reads a workflow config YAML file, assembles a Docker build context with the server binary and any required plugin binaries, generates a Dockerfile, builds the image, and optionally pushes it.
func (*BuildFromConfigStep) Execute ¶ added in v0.2.6
func (s *BuildFromConfigStep) Execute(ctx context.Context, _ *PipelineContext) (*StepResult, error)
Execute assembles the build context, generates a Dockerfile, builds the Docker image, and optionally pushes it.
func (*BuildFromConfigStep) Name ¶ added in v0.2.6
func (s *BuildFromConfigStep) Name() string
Name returns the step name.
type BuildUIStep ¶
type BuildUIStep struct {
// contains filtered or unexported fields
}
BuildUIStep executes a UI build pipeline natively (without Docker), producing static assets in a target directory for static.fileserver to serve. This enables config-driven UI builds without requiring external CLI commands.
func (*BuildUIStep) Execute ¶
func (s *BuildUIStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute runs the UI build process natively:
- Resolves source and output directories
- Runs npm install (or equivalent)
- Runs the build command
- Copies build output to the target directory
type CORSConfig ¶
type CORSConfig struct {
AllowOrigins []string `json:"allowOrigins"`
AllowMethods []string `json:"allowMethods"`
AllowHeaders []string `json:"allowHeaders"`
MaxAge int `json:"maxAge"`
}
CORSConfig defines CORS settings for the gateway.
type CORSMiddleware ¶
type CORSMiddleware struct {
// contains filtered or unexported fields
}
CORSMiddleware provides CORS support
func NewCORSMiddleware ¶
func NewCORSMiddleware(name string, allowedOrigins, allowedMethods []string) *CORSMiddleware
NewCORSMiddleware creates a new CORS middleware
func (*CORSMiddleware) Init ¶
func (m *CORSMiddleware) Init(app modular.Application) error
Init initializes the middleware
func (*CORSMiddleware) Process ¶
func (m *CORSMiddleware) Process(next http.Handler) http.Handler
Process implements middleware processing
func (*CORSMiddleware) ProvidesServices ¶
func (m *CORSMiddleware) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this middleware
func (*CORSMiddleware) RequiresServices ¶
func (m *CORSMiddleware) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this middleware
type CacheDeleteStep ¶ added in v0.2.7
type CacheDeleteStep struct {
// contains filtered or unexported fields
}
CacheDeleteStep removes a key from a named CacheModule.
func (*CacheDeleteStep) Execute ¶ added in v0.2.7
func (s *CacheDeleteStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*CacheDeleteStep) Name ¶ added in v0.2.7
func (s *CacheDeleteStep) Name() string
type CacheGetStep ¶ added in v0.2.7
type CacheGetStep struct {
// contains filtered or unexported fields
}
CacheGetStep reads a value from a named CacheModule and stores it in the pipeline context under a configurable output field.
func (*CacheGetStep) Execute ¶ added in v0.2.7
func (s *CacheGetStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*CacheGetStep) Name ¶ added in v0.2.7
func (s *CacheGetStep) Name() string
type CacheModule ¶ added in v0.2.7
type CacheModule interface {
Get(ctx context.Context, key string) (string, error)
Set(ctx context.Context, key, value string, ttl time.Duration) error
Delete(ctx context.Context, key string) error
}
CacheModule defines the interface for cache operations used by pipeline steps.
type CacheSetStep ¶ added in v0.2.7
type CacheSetStep struct {
// contains filtered or unexported fields
}
CacheSetStep writes a value to a named CacheModule.
func (*CacheSetStep) Execute ¶ added in v0.2.7
func (s *CacheSetStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*CacheSetStep) Name ¶ added in v0.2.7
func (s *CacheSetStep) Name() string
type CircuitBreakerStep ¶
type CircuitBreakerStep struct {
// contains filtered or unexported fields
}
CircuitBreakerStep implements the circuit breaker pattern as a pipeline step. It tracks failures per service and opens the circuit when the failure threshold is reached, preventing further calls until recovery.
func (*CircuitBreakerStep) Execute ¶
func (s *CircuitBreakerStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
Execute checks the circuit state. When closed or half-open the request is allowed through. When open the request is rejected unless the timeout has elapsed, in which case the circuit transitions to half-open.
func (*CircuitBreakerStep) Name ¶
func (s *CircuitBreakerStep) Name() string
Name returns the step name.
func (*CircuitBreakerStep) RecordFailure ¶
func (s *CircuitBreakerStep) RecordFailure()
RecordFailure records a failed call. If the failure threshold is reached the circuit opens.
func (*CircuitBreakerStep) RecordSuccess ¶
func (s *CircuitBreakerStep) RecordSuccess()
RecordSuccess records a successful call through the circuit breaker.
func (*CircuitBreakerStep) State ¶
func (s *CircuitBreakerStep) State() CircuitState
State returns the current circuit state.
type CircuitState ¶
type CircuitState string
CircuitState represents the current state of a circuit breaker.
const ( CircuitClosed CircuitState = "closed" CircuitOpen CircuitState = "open" CircuitHalfOpen CircuitState = "half-open" )
type CloudAccount ¶ added in v0.2.13
type CloudAccount struct {
// contains filtered or unexported fields
}
CloudAccount is a workflow module that stores cloud provider credentials and exposes them via the CloudCredentialProvider interface in the service registry.
func NewCloudAccount ¶ added in v0.2.13
func NewCloudAccount(name string, cfg map[string]any) *CloudAccount
NewCloudAccount creates a new CloudAccount module.
func (*CloudAccount) AWSConfig ¶ added in v0.2.15
AWSConfig builds an aws.Config from the cloud.account configuration. Supports credential types: static/access_key, role_arn, env, profile, default. This satisfies the AWSConfigProvider interface.
func (*CloudAccount) GetCredentials ¶ added in v0.2.13
func (m *CloudAccount) GetCredentials(_ context.Context) (*CloudCredentials, error)
GetCredentials returns the resolved credentials.
func (*CloudAccount) Init ¶ added in v0.2.13
func (m *CloudAccount) Init(app modular.Application) error
Init resolves credentials and registers the module as a service.
func (*CloudAccount) Name ¶ added in v0.2.13
func (m *CloudAccount) Name() string
Name returns the module name.
func (*CloudAccount) Provider ¶ added in v0.2.13
func (m *CloudAccount) Provider() string
Provider returns the cloud provider name (e.g. "aws", "gcp", "mock").
func (*CloudAccount) ProvidesServices ¶ added in v0.2.13
func (m *CloudAccount) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*CloudAccount) Region ¶ added in v0.2.13
func (m *CloudAccount) Region() string
Region returns the primary region.
func (*CloudAccount) RequiresServices ¶ added in v0.2.13
func (m *CloudAccount) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — cloud.account has no service dependencies.
func (*CloudAccount) ValidateCredentials ¶ added in v0.2.15
func (m *CloudAccount) ValidateCredentials(ctx context.Context) error
ValidateCredentials calls sts:GetCallerIdentity to verify the AWS credentials work.
type CloudCredentialProvider ¶ added in v0.2.13
type CloudCredentialProvider interface {
Provider() string
Region() string
GetCredentials(ctx context.Context) (*CloudCredentials, error)
}
CloudCredentialProvider provides cloud credentials to other modules.
type CloudCredentials ¶ added in v0.2.13
type CloudCredentials struct {
Provider string
Region string
// AWS
AccessKey string //nolint:gosec // G117: config struct field, not a hardcoded secret
SecretKey string
SessionToken string //nolint:gosec // G117: config struct field, not a hardcoded secret
RoleARN string
// GCP
ProjectID string
ServiceAccountJSON []byte
// Azure
TenantID string
ClientID string
ClientSecret string //nolint:gosec // G117: config struct field, not a hardcoded secret
SubscriptionID string
// Kubernetes
Kubeconfig []byte
Context string
// Generic / DigitalOcean
Token string
Extra map[string]string
}
CloudCredentials holds resolved credentials for a cloud provider.
type CloudValidateStep ¶ added in v0.2.13
type CloudValidateStep struct {
// contains filtered or unexported fields
}
CloudValidateStep validates that a cloud.account's credentials are resolvable and non-empty. It looks up a CloudCredentialProvider from the service registry by account name, calls GetCredentials, and returns a summary JSON result.
func (*CloudValidateStep) Execute ¶ added in v0.2.13
func (s *CloudValidateStep) Execute(ctx context.Context, _ *PipelineContext) (*StepResult, error)
Execute validates the configured cloud account's credentials.
func (*CloudValidateStep) Name ¶ added in v0.2.13
func (s *CloudValidateStep) Name() string
Name returns the step name.
type CodeBuildBuild ¶ added in v0.2.15
type CodeBuildBuild struct {
ID string `json:"id"`
ProjectName string `json:"projectName"`
Status string `json:"status"` // IN_PROGRESS, SUCCEEDED, FAILED, STOPPED
Phase string `json:"phase"`
StartTime time.Time `json:"startTime"`
EndTime *time.Time `json:"endTime,omitempty"`
Logs []string `json:"logs"`
EnvVars map[string]string `json:"envVars,omitempty"`
BuildNumber int64 `json:"buildNumber"`
}
CodeBuildBuild represents a single CodeBuild build invocation.
type CodeBuildCreateProjectStep ¶ added in v0.2.15
type CodeBuildCreateProjectStep struct {
// contains filtered or unexported fields
}
CodeBuildCreateProjectStep creates or updates a CodeBuild project.
func (*CodeBuildCreateProjectStep) Execute ¶ added in v0.2.15
func (s *CodeBuildCreateProjectStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*CodeBuildCreateProjectStep) Name ¶ added in v0.2.15
func (s *CodeBuildCreateProjectStep) Name() string
type CodeBuildDeleteProjectStep ¶ added in v0.2.15
type CodeBuildDeleteProjectStep struct {
// contains filtered or unexported fields
}
CodeBuildDeleteProjectStep removes a CodeBuild project.
func (*CodeBuildDeleteProjectStep) Execute ¶ added in v0.2.15
func (s *CodeBuildDeleteProjectStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*CodeBuildDeleteProjectStep) Name ¶ added in v0.2.15
func (s *CodeBuildDeleteProjectStep) Name() string
type CodeBuildListBuildsStep ¶ added in v0.2.15
type CodeBuildListBuildsStep struct {
// contains filtered or unexported fields
}
CodeBuildListBuildsStep lists builds for a CodeBuild project.
func (*CodeBuildListBuildsStep) Execute ¶ added in v0.2.15
func (s *CodeBuildListBuildsStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*CodeBuildListBuildsStep) Name ¶ added in v0.2.15
func (s *CodeBuildListBuildsStep) Name() string
type CodeBuildLogsStep ¶ added in v0.2.15
type CodeBuildLogsStep struct {
// contains filtered or unexported fields
}
CodeBuildLogsStep retrieves logs for a CodeBuild build.
func (*CodeBuildLogsStep) Execute ¶ added in v0.2.15
func (s *CodeBuildLogsStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
func (*CodeBuildLogsStep) Name ¶ added in v0.2.15
func (s *CodeBuildLogsStep) Name() string
type CodeBuildModule ¶ added in v0.2.15
type CodeBuildModule struct {
// contains filtered or unexported fields
}
CodeBuildModule manages AWS CodeBuild projects and builds via pluggable backends. Config:
account: name of a cloud.account module (resolved from service registry) region: AWS region (e.g. us-east-1) service_role: IAM role ARN for CodeBuild compute_type: BUILD_GENERAL1_SMALL, BUILD_GENERAL1_MEDIUM, etc. image: CodeBuild managed image (e.g. aws/codebuild/standard:7.0) source_type: GITHUB, CODECOMMIT, BITBUCKET, NO_SOURCE (default: NO_SOURCE)
func NewCodeBuildModule ¶ added in v0.2.15
func NewCodeBuildModule(name string, cfg map[string]any) *CodeBuildModule
NewCodeBuildModule creates a new CodeBuildModule.
func (*CodeBuildModule) CreateProject ¶ added in v0.2.15
func (m *CodeBuildModule) CreateProject() error
CreateProject creates or updates the CodeBuild project.
func (*CodeBuildModule) DeleteProject ¶ added in v0.2.15
func (m *CodeBuildModule) DeleteProject() error
DeleteProject removes the CodeBuild project.
func (*CodeBuildModule) GenerateBuildspec ¶ added in v0.2.15
func (m *CodeBuildModule) GenerateBuildspec(pipelineConfig map[string]any) string
GenerateBuildspec translates a pipeline step config into a CodeBuild buildspec YAML string. Supported config keys: install_commands, pre_build_commands, build_commands, post_build_commands, artifact_files, artifact_dir, cache_paths, env_variables.
func (*CodeBuildModule) GetBuildLogs ¶ added in v0.2.15
func (m *CodeBuildModule) GetBuildLogs(buildID string) ([]string, error)
GetBuildLogs retrieves the log lines for a build.
func (*CodeBuildModule) GetBuildStatus ¶ added in v0.2.15
func (m *CodeBuildModule) GetBuildStatus(buildID string) (*CodeBuildBuild, error)
GetBuildStatus returns the current status of a build.
func (*CodeBuildModule) Init ¶ added in v0.2.15
func (m *CodeBuildModule) Init(app modular.Application) error
Init resolves the cloud.account service and initializes the backend.
func (*CodeBuildModule) ListBuilds ¶ added in v0.2.15
func (m *CodeBuildModule) ListBuilds() ([]*CodeBuildBuild, error)
ListBuilds returns all builds for this project.
func (*CodeBuildModule) Name ¶ added in v0.2.15
func (m *CodeBuildModule) Name() string
Name returns the module name.
func (*CodeBuildModule) ProvidesServices ¶ added in v0.2.15
func (m *CodeBuildModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*CodeBuildModule) RequiresServices ¶ added in v0.2.15
func (m *CodeBuildModule) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — cloud.account is resolved by name, not declared.
func (*CodeBuildModule) StartBuild ¶ added in v0.2.15
func (m *CodeBuildModule) StartBuild(envOverrides map[string]string) (*CodeBuildBuild, error)
StartBuild starts a new build, optionally overriding environment variables.
type CodeBuildProjectState ¶ added in v0.2.15
type CodeBuildProjectState struct {
Name string `json:"name"`
Region string `json:"region"`
ServiceRole string `json:"serviceRole"`
ComputeType string `json:"computeType"`
Image string `json:"image"`
Status string `json:"status"` // pending, creating, ready, deleting, deleted
SourceType string `json:"sourceType"`
BuildspecPath string `json:"buildspecPath"`
EnvVars map[string]string `json:"envVars,omitempty"`
CreatedAt time.Time `json:"createdAt"`
ARN string `json:"arn"`
}
CodeBuildProjectState holds the current state of a managed CodeBuild project.
type CodeBuildStartStep ¶ added in v0.2.15
type CodeBuildStartStep struct {
// contains filtered or unexported fields
}
CodeBuildStartStep starts a new build on a CodeBuild project.
func (*CodeBuildStartStep) Execute ¶ added in v0.2.15
func (s *CodeBuildStartStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*CodeBuildStartStep) Name ¶ added in v0.2.15
func (s *CodeBuildStartStep) Name() string
type CodeBuildStatusStep ¶ added in v0.2.15
type CodeBuildStatusStep struct {
// contains filtered or unexported fields
}
CodeBuildStatusStep checks the status of a CodeBuild build.
func (*CodeBuildStatusStep) Execute ¶ added in v0.2.15
func (s *CodeBuildStatusStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
func (*CodeBuildStatusStep) Name ¶ added in v0.2.15
func (s *CodeBuildStatusStep) Name() string
type CommandFunc ¶
CommandFunc is a state-changing command function that returns a result or an error.
type CommandHandler ¶
type CommandHandler struct {
// contains filtered or unexported fields
}
CommandHandler dispatches POST/PUT/DELETE requests to named command functions. Each command is registered by name and dispatched by extracting the last path segment from the request URL. Route pipelines can be attached for composable per-route processing. A delegate service can be configured to handle requests that don't match any registered command name.
func NewCommandHandler ¶
func NewCommandHandler(name string) *CommandHandler
NewCommandHandler creates a new CommandHandler with the given name.
func (*CommandHandler) Handle ¶
func (h *CommandHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle dispatches an HTTP request to the appropriate command function.
func (*CommandHandler) Init ¶
func (h *CommandHandler) Init(app modular.Application) error
Init initializes the command handler and resolves the delegate service.
func (*CommandHandler) Name ¶
func (h *CommandHandler) Name() string
Name returns the unique identifier for this module.
func (*CommandHandler) ProvidesServices ¶
func (h *CommandHandler) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns a list of services provided by this module.
func (*CommandHandler) RegisterCommand ¶
func (h *CommandHandler) RegisterCommand(name string, fn CommandFunc)
RegisterCommand adds a named command function to the handler.
func (*CommandHandler) RequiresServices ¶
func (h *CommandHandler) RequiresServices() []modular.ServiceDependency
RequiresServices returns a list of services required by this module.
func (*CommandHandler) ResolveDelegatePostStart ¶
func (h *CommandHandler) ResolveDelegatePostStart()
ResolveDelegatePostStart is called after engine.Start to resolve delegates that may not have been available during Init (e.g., services registered by post-start hooks).
func (*CommandHandler) ServeHTTP ¶
func (h *CommandHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface. It looks up a route pipeline by the full "METHOD /path" pattern (set by Go 1.22+ ServeMux), falling back to the last path segment for backward compatibility with registered commands. Dispatch chain: RegisteredCommandFunc -> RoutePipeline -> DelegateHandler -> 404
func (*CommandHandler) SetDelegate ¶
func (h *CommandHandler) SetDelegate(name string)
SetDelegate sets the delegate service name. The service must implement http.Handler and will be resolved from the service registry during Init.
func (*CommandHandler) SetDelegateHandler ¶
func (h *CommandHandler) SetDelegateHandler(handler http.Handler)
SetDelegateHandler directly sets the HTTP handler used for delegation.
func (*CommandHandler) SetExecutionTracker ¶
func (h *CommandHandler) SetExecutionTracker(t ExecutionTrackerProvider)
SetExecutionTracker sets the execution tracker for recording pipeline executions.
func (*CommandHandler) SetRoutePipeline ¶
func (h *CommandHandler) SetRoutePipeline(routePath string, pipeline interfaces.PipelineRunner)
SetRoutePipeline attaches a pipeline to a specific route path.
type CompositeTransitionHandler ¶
type CompositeTransitionHandler struct {
// contains filtered or unexported fields
}
CompositeTransitionHandler combines multiple transition handlers
func NewCompositeTransitionHandler ¶
func NewCompositeTransitionHandler() *CompositeTransitionHandler
NewCompositeTransitionHandler creates a new composite handler
func (*CompositeTransitionHandler) AddHandler ¶
func (c *CompositeTransitionHandler) AddHandler(handler TransitionHandler)
AddHandler adds a handler to the composite
func (*CompositeTransitionHandler) HandleTransition ¶
func (c *CompositeTransitionHandler) HandleTransition(ctx context.Context, event TransitionEvent) error
HandleTransition calls all handlers in sequence
type ConditionalStep ¶
type ConditionalStep struct {
// contains filtered or unexported fields
}
ConditionalStep routes pipeline execution to different steps based on a field value in pc.Current.
func (*ConditionalStep) Execute ¶
func (s *ConditionalStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute resolves the field value and determines the next step.
type ConstraintCheckStep ¶
type ConstraintCheckStep struct {
// contains filtered or unexported fields
}
ConstraintCheckStep implements a pipeline step that validates capability declarations against a set of constraints. It uses the platform package's ConstraintValidator to check each declaration and outputs any violations.
func (*ConstraintCheckStep) Execute ¶
func (s *ConstraintCheckStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute validates each capability declaration against the configured constraints.
func (*ConstraintCheckStep) Name ¶
func (s *ConstraintCheckStep) Name() string
Name returns the step name.
type CronScheduler ¶
type CronScheduler struct {
// contains filtered or unexported fields
}
CronScheduler implements a cron-based scheduler
func NewCronScheduler ¶
func NewCronScheduler(name string, cronExpression string) *CronScheduler
NewCronScheduler creates a new cron scheduler
func (*CronScheduler) Init ¶
func (s *CronScheduler) Init(app modular.Application) error
Init initializes the scheduler
func (*CronScheduler) Schedule ¶
func (s *CronScheduler) Schedule(job Job) error
Schedule adds a job to the scheduler
type CrossWorkflowRouter ¶
type CrossWorkflowRouter struct {
// contains filtered or unexported fields
}
CrossWorkflowRouter routes events from one workflow to linked target workflows.
func NewCrossWorkflowRouter ¶
func NewCrossWorkflowRouter(linkStore store.CrossWorkflowLinkStore, getEngine func(uuid.UUID) (any, bool), logger *slog.Logger) *CrossWorkflowRouter
NewCrossWorkflowRouter creates a new router. The getEngine callback must return a value whose concrete type has a field or method that provides a TriggerWorkflower. In practice this is *workflow.ManagedEngine.
func (*CrossWorkflowRouter) RefreshLinks ¶
func (r *CrossWorkflowRouter) RefreshLinks(ctx context.Context) error
RefreshLinks reloads link configurations from the database.
func (*CrossWorkflowRouter) RouteEvent ¶
func (r *CrossWorkflowRouter) RouteEvent(ctx context.Context, sourceWorkflowID uuid.UUID, eventType string, eventData any) error
RouteEvent checks if an event from a source workflow should be forwarded to any target workflows based on configured links.
type DBExecStep ¶
type DBExecStep struct {
// contains filtered or unexported fields
}
DBExecStep executes parameterized SQL INSERT/UPDATE/DELETE against a named database service.
func (*DBExecStep) Execute ¶
func (s *DBExecStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
func (*DBExecStep) Name ¶
func (s *DBExecStep) Name() string
type DBProvider ¶
DBProvider is implemented by modules that provide a *sql.DB connection. Both SQLiteStorage and WorkflowDatabase satisfy this interface.
type DBQueryStep ¶
type DBQueryStep struct {
// contains filtered or unexported fields
}
DBQueryStep executes a parameterized SQL SELECT against a named database service.
func (*DBQueryStep) Execute ¶
func (s *DBQueryStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
func (*DBQueryStep) Name ¶
func (s *DBQueryStep) Name() string
type DLQServiceConfig ¶ added in v0.1.6
type DLQServiceConfig struct {
// MaxRetries is reserved for future implementation of per-entry retry limits.
// It is stored and exposed via MaxRetries() but not yet applied to the DLQ store.
MaxRetries int `yaml:"max_retries" default:"3"`
// RetentionDays is reserved for future implementation of automatic DLQ entry purging.
// It is stored and exposed via RetentionDays() but not yet applied to the DLQ store.
RetentionDays int `yaml:"retention_days" default:"30"`
}
DLQServiceConfig holds the configuration for the DLQ service module.
type DLQServiceModule ¶ added in v0.1.6
type DLQServiceModule struct {
// contains filtered or unexported fields
}
DLQServiceModule wraps an evstore.DLQHandler as a modular.Module. It initializes the in-memory DLQ store and handler, making them available in the modular service registry.
func NewDLQServiceModule ¶ added in v0.1.6
func NewDLQServiceModule(name string, cfg DLQServiceConfig) *DLQServiceModule
NewDLQServiceModule creates a new DLQ service module with the given name and config.
func (*DLQServiceModule) DLQMux ¶ added in v0.1.6
func (m *DLQServiceModule) DLQMux() http.Handler
DLQMux returns the HTTP mux for DLQ endpoints.
func (*DLQServiceModule) Init ¶ added in v0.1.6
func (m *DLQServiceModule) Init(_ modular.Application) error
Init implements modular.Module.
func (*DLQServiceModule) MaxRetries ¶ added in v0.1.6
func (m *DLQServiceModule) MaxRetries() int
MaxRetries returns the configured max retry count.
func (*DLQServiceModule) Name ¶ added in v0.1.6
func (m *DLQServiceModule) Name() string
Name implements modular.Module.
func (*DLQServiceModule) ProvidesServices ¶ added in v0.1.6
func (m *DLQServiceModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices implements modular.Module. The DLQ handler mux is registered under the module name and also under {name}.admin for admin route delegation.
func (*DLQServiceModule) RequiresServices ¶ added in v0.1.6
func (m *DLQServiceModule) RequiresServices() []modular.ServiceDependency
RequiresServices implements modular.Module.
func (*DLQServiceModule) RetentionDays ¶ added in v0.1.6
func (m *DLQServiceModule) RetentionDays() int
RetentionDays returns the configured retention period.
func (*DLQServiceModule) Store ¶ added in v0.1.6
func (m *DLQServiceModule) Store() *evstore.InMemoryDLQStore
Store returns the underlying DLQ store.
type DNSApplyStep ¶ added in v0.2.14
type DNSApplyStep struct {
// contains filtered or unexported fields
}
DNSApplyStep calls Apply() on a named platform.dns module.
func (*DNSApplyStep) Execute ¶ added in v0.2.14
func (s *DNSApplyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*DNSApplyStep) Name ¶ added in v0.2.14
func (s *DNSApplyStep) Name() string
type DNSPlan ¶ added in v0.2.14
type DNSPlan struct {
Zone DNSZoneConfig `json:"zone"`
Records []DNSRecordConfig `json:"records"`
Changes []string `json:"changes"`
}
DNSPlan holds the planned DNS changes.
type DNSPlanStep ¶ added in v0.2.14
type DNSPlanStep struct {
// contains filtered or unexported fields
}
DNSPlanStep calls Plan() on a named platform.dns module.
func (*DNSPlanStep) Execute ¶ added in v0.2.14
func (s *DNSPlanStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*DNSPlanStep) Name ¶ added in v0.2.14
func (s *DNSPlanStep) Name() string
type DNSRecordConfig ¶ added in v0.2.14
type DNSRecordConfig struct {
Name string `json:"name"`
Type string `json:"type"`
Value string `json:"value"`
TTL int `json:"ttl"`
}
DNSRecordConfig describes a single DNS record.
type DNSState ¶ added in v0.2.14
type DNSState struct {
ZoneID string `json:"zoneId"`
ZoneName string `json:"zoneName"`
Records []DNSRecordConfig `json:"records"`
Status string `json:"status"` // pending, active, deleting, deleted
}
DNSState describes the current state of a DNS zone.
type DNSStatusStep ¶ added in v0.2.14
type DNSStatusStep struct {
// contains filtered or unexported fields
}
DNSStatusStep calls Status() on a named platform.dns module.
func (*DNSStatusStep) Execute ¶ added in v0.2.14
func (s *DNSStatusStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*DNSStatusStep) Name ¶ added in v0.2.14
func (s *DNSStatusStep) Name() string
type DNSZoneConfig ¶ added in v0.2.14
type DNSZoneConfig struct {
Name string `json:"name"`
Comment string `json:"comment"`
Private bool `json:"private"`
VPCID string `json:"vpcId"` // for private hosted zones
}
DNSZoneConfig describes a DNS zone.
type DOAppState ¶ added in v0.2.15
type DOAppState struct {
ID string `json:"id"`
Name string `json:"name"`
Region string `json:"region"`
Status string `json:"status"` // pending, deploying, running, error, deleted
LiveURL string `json:"liveUrl"`
Instances int `json:"instances"`
Image string `json:"image"`
DeployedAt time.Time `json:"deployedAt"`
DeploymentID string `json:"deploymentId"`
}
DOAppState holds the current state of a DigitalOcean App Platform app.
type DODNSPlan ¶ added in v0.2.15
type DODNSPlan struct {
Domain string `json:"domain"`
Records []DODNSRecordState `json:"records"`
Changes []string `json:"changes"`
}
DODNSPlan describes planned DNS changes.
type DODNSRecordState ¶ added in v0.2.15
type DODNSRecordState struct {
ID int `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
Data string `json:"data"`
TTL int `json:"ttl"`
}
DODNSRecordState describes a single DigitalOcean DNS record.
type DODNSState ¶ added in v0.2.15
type DODNSState struct {
DomainName string `json:"domainName"`
Records []DODNSRecordState `json:"records"`
Status string `json:"status"` // pending, active, deleting, deleted
}
DODNSState holds the current state of DigitalOcean DNS.
type DODeployStep ¶ added in v0.2.15
type DODeployStep struct {
// contains filtered or unexported fields
}
DODeployStep deploys an app to DigitalOcean App Platform.
func (*DODeployStep) Execute ¶ added in v0.2.15
func (s *DODeployStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*DODeployStep) Name ¶ added in v0.2.15
func (s *DODeployStep) Name() string
type DODestroyStep ¶ added in v0.2.15
type DODestroyStep struct {
// contains filtered or unexported fields
}
DODestroyStep tears down a DO App Platform app.
func (*DODestroyStep) Execute ¶ added in v0.2.15
func (s *DODestroyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*DODestroyStep) Name ¶ added in v0.2.15
func (s *DODestroyStep) Name() string
type DOFirewallConfig ¶ added in v0.2.15
type DOFirewallConfig struct {
Name string `json:"name"`
InboundRules []DOFirewallRule `json:"inboundRules"`
OutboundRules []DOFirewallRule `json:"outboundRules"`
}
DOFirewallConfig describes a DigitalOcean firewall.
type DOFirewallRule ¶ added in v0.2.15
type DOFirewallRule struct {
Protocol string `json:"protocol"` // tcp, udp, icmp
PortRange string `json:"portRange"` // e.g. "80" or "8000-9000"
Sources string `json:"sources"` // CIDR, tag, or load_balancer_uid
}
DOFirewallRule describes a single firewall rule (inbound or outbound).
type DOKSClusterState ¶ added in v0.2.15
type DOKSClusterState struct {
ID string `json:"id"`
Name string `json:"name"`
Region string `json:"region"`
Version string `json:"version"`
Status string `json:"status"` // pending, creating, running, deleting, deleted
NodePools []DOKSNodePoolState `json:"nodePools"`
Endpoint string `json:"endpoint"`
CreatedAt time.Time `json:"createdAt"`
}
DOKSClusterState holds the current state of a managed DOKS cluster.
type DOKSNodePoolState ¶ added in v0.2.15
type DOKSNodePoolState struct {
ID string `json:"id"`
Name string `json:"name"`
Size string `json:"size"`
Count int `json:"count"`
AutoScale bool `json:"autoScale"`
MinNodes int `json:"minNodes"`
MaxNodes int `json:"maxNodes"`
}
DOKSNodePoolState describes a DOKS node pool.
type DOLogsStep ¶ added in v0.2.15
type DOLogsStep struct {
// contains filtered or unexported fields
}
DOLogsStep retrieves logs from a DO App Platform app.
func (*DOLogsStep) Execute ¶ added in v0.2.15
func (s *DOLogsStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*DOLogsStep) Name ¶ added in v0.2.15
func (s *DOLogsStep) Name() string
type DONetworkPlan ¶ added in v0.2.15
type DONetworkPlan struct {
VPC string `json:"vpc"`
Firewalls []DOFirewallConfig `json:"firewalls"`
Changes []string `json:"changes"`
}
DONetworkPlan describes planned networking changes.
type DOScaleStep ¶ added in v0.2.15
type DOScaleStep struct {
// contains filtered or unexported fields
}
DOScaleStep scales a DO App Platform app.
func (*DOScaleStep) Execute ¶ added in v0.2.15
func (s *DOScaleStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*DOScaleStep) Name ¶ added in v0.2.15
func (s *DOScaleStep) Name() string
type DOStatusStep ¶ added in v0.2.15
type DOStatusStep struct {
// contains filtered or unexported fields
}
DOStatusStep checks the status of a DO App Platform app.
func (*DOStatusStep) Execute ¶ added in v0.2.15
func (s *DOStatusStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*DOStatusStep) Name ¶ added in v0.2.15
func (s *DOStatusStep) Name() string
type DOVPCState ¶ added in v0.2.15
type DOVPCState struct {
ID string `json:"id"`
Name string `json:"name"`
Region string `json:"region"`
IPRange string `json:"ipRange"`
Status string `json:"status"` // pending, active, deleting, deleted
FirewallIDs []string `json:"firewallIds"`
LBID string `json:"lbId"`
Tags map[string]string `json:"tags"`
}
DOVPCState holds the current state of a DigitalOcean VPC.
type DataTransformer ¶
type DataTransformer struct {
// contains filtered or unexported fields
}
DataTransformer provides named data transformation pipelines
func NewDataTransformer ¶
func NewDataTransformer(name string) *DataTransformer
NewDataTransformer creates a new DataTransformer module
func (*DataTransformer) Init ¶
func (dt *DataTransformer) Init(app modular.Application) error
Init registers the data transformer as a service
func (*DataTransformer) Name ¶
func (dt *DataTransformer) Name() string
Name returns the module name
func (*DataTransformer) RegisterPipeline ¶
func (dt *DataTransformer) RegisterPipeline(pipeline *TransformPipeline)
RegisterPipeline registers a named transformation pipeline
func (*DataTransformer) Transform ¶
func (dt *DataTransformer) Transform(ctx context.Context, pipelineName string, data any) (any, error)
Transform runs a named pipeline on the given data
func (*DataTransformer) TransformWithOps ¶
func (dt *DataTransformer) TransformWithOps(ctx context.Context, ops []TransformOperation, data any) (any, error)
TransformWithOps runs a sequence of operations on the given data
type DatabaseConfig ¶
type DatabaseConfig struct {
Driver string `json:"driver" yaml:"driver"`
DSN string `json:"dsn" yaml:"dsn"`
MaxOpenConns int `json:"maxOpenConns" yaml:"maxOpenConns"`
MaxIdleConns int `json:"maxIdleConns" yaml:"maxIdleConns"`
ConnMaxLifetime time.Duration `json:"connMaxLifetime" yaml:"connMaxLifetime"`
MigrationsDir string `json:"migrationsDir" yaml:"migrationsDir"`
}
DatabaseConfig holds configuration for the workflow database module
type DatabaseIntegrationConnector ¶
type DatabaseIntegrationConnector struct {
// contains filtered or unexported fields
}
DatabaseIntegrationConnector implements IntegrationConnector for database operations
func NewDatabaseIntegrationConnector ¶
func NewDatabaseIntegrationConnector(name string, db *WorkflowDatabase) *DatabaseIntegrationConnector
NewDatabaseIntegrationConnector creates a new database integration connector
func (*DatabaseIntegrationConnector) Connect ¶
func (c *DatabaseIntegrationConnector) Connect(ctx context.Context) error
Connect opens the database connection
func (*DatabaseIntegrationConnector) Disconnect ¶
func (c *DatabaseIntegrationConnector) Disconnect(ctx context.Context) error
Disconnect closes the database connection
func (*DatabaseIntegrationConnector) Execute ¶
func (c *DatabaseIntegrationConnector) Execute(ctx context.Context, action string, params map[string]any) (map[string]any, error)
Execute dispatches to the appropriate WorkflowDatabase method based on action
func (*DatabaseIntegrationConnector) GetName ¶
func (c *DatabaseIntegrationConnector) GetName() string
GetName returns the connector name
func (*DatabaseIntegrationConnector) IsConnected ¶
func (c *DatabaseIntegrationConnector) IsConnected() bool
IsConnected returns whether the connector is connected
type DelegateStep ¶
type DelegateStep struct {
// contains filtered or unexported fields
}
DelegateStep forwards the HTTP request to a named service implementing http.Handler. This is a "passthrough" pipeline step: the delegate service handles the full HTTP response (status, headers, body). Because the delegate writes to the ResponseWriter directly, this step sets _response_handled in pipeline metadata and returns Stop: true.
func (*DelegateStep) Execute ¶
func (s *DelegateStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute forwards the request to the delegate service. It reads _http_request and _http_response_writer from the pipeline context metadata. If these are present (live HTTP context), the delegate writes directly to the response writer. If not present (e.g., test context), it uses httptest.ResponseRecorder and returns the captured response as output.
type DeployStep ¶
type DeployStep struct {
// contains filtered or unexported fields
}
DeployStep executes a deployment through the deploy.Executor, bridging pipeline execution to cloud providers via deployment strategies.
func (*DeployStep) Execute ¶
func (s *DeployStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute builds a deploy request and delegates to the deploy.Executor.
type DockerBuildStep ¶
type DockerBuildStep struct {
// contains filtered or unexported fields
}
DockerBuildStep builds a Docker image from a context directory and Dockerfile.
func (*DockerBuildStep) Execute ¶
func (s *DockerBuildStep) Execute(ctx context.Context, _ *PipelineContext) (*StepResult, error)
Execute builds a Docker image using the Docker SDK.
type DockerPushStep ¶
type DockerPushStep struct {
// contains filtered or unexported fields
}
DockerPushStep pushes a Docker image to a remote registry.
func (*DockerPushStep) Execute ¶
func (s *DockerPushStep) Execute(ctx context.Context, _ *PipelineContext) (*StepResult, error)
Execute pushes the image to the configured registry.
type DockerRunStep ¶
type DockerRunStep struct {
// contains filtered or unexported fields
}
DockerRunStep runs a command inside a Docker container using the sandbox.
func (*DockerRunStep) Execute ¶
func (s *DockerRunStep) Execute(ctx context.Context, _ *PipelineContext) (*StepResult, error)
Execute runs the container and returns exit code, stdout, and stderr.
type DriftCheckStep ¶
type DriftCheckStep struct {
// contains filtered or unexported fields
}
DriftCheckStep implements a pipeline step that checks for configuration drift by comparing expected resource state against the actual provider state. For each resource, it calls the provider's resource driver Diff method.
func (*DriftCheckStep) Execute ¶
func (s *DriftCheckStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute checks each resource for drift by comparing desired properties against the provider's actual state using the Diff method on resource drivers.
type DriftReport ¶
type DriftReport struct {
// ResourceName is the name of the resource that was checked.
ResourceName string `json:"resourceName"`
// ResourceType is the provider-specific resource type.
ResourceType string `json:"resourceType"`
// Drifted indicates whether drift was detected.
Drifted bool `json:"drifted"`
// Diffs contains the field-level differences between desired and actual state.
Diffs []platform.DiffEntry `json:"diffs,omitempty"`
// Error is set if the drift check failed for this resource.
Error string `json:"error,omitempty"`
}
DriftReport describes drift detected for a single resource.
type DynamoDBNoSQL ¶ added in v0.2.13
type DynamoDBNoSQL struct {
// contains filtered or unexported fields
}
DynamoDBNoSQL is the nosql.dynamodb module. In local mode (endpoint: "local") it delegates to MemoryNoSQL. For a real AWS implementation, replace the backend field with a DynamoDB client and implement Get/Put/Delete/Query using dynamodb.GetItem, PutItem, DeleteItem, Scan.
func NewDynamoDBNoSQL ¶ added in v0.2.13
func NewDynamoDBNoSQL(name string, cfg DynamoDBNoSQLConfig) *DynamoDBNoSQL
NewDynamoDBNoSQL creates a new DynamoDBNoSQL module.
func (*DynamoDBNoSQL) Delete ¶ added in v0.2.13
func (d *DynamoDBNoSQL) Delete(ctx context.Context, key string) error
func (*DynamoDBNoSQL) Init ¶ added in v0.2.13
func (d *DynamoDBNoSQL) Init(_ modular.Application) error
func (*DynamoDBNoSQL) Name ¶ added in v0.2.13
func (d *DynamoDBNoSQL) Name() string
func (*DynamoDBNoSQL) ProvidesServices ¶ added in v0.2.13
func (d *DynamoDBNoSQL) ProvidesServices() []modular.ServiceProvider
func (*DynamoDBNoSQL) RequiresServices ¶ added in v0.2.13
func (d *DynamoDBNoSQL) RequiresServices() []modular.ServiceDependency
type DynamoDBNoSQLConfig ¶ added in v0.2.13
type DynamoDBNoSQLConfig struct {
TableName string `json:"tableName" yaml:"tableName"`
Region string `json:"region" yaml:"region"`
Endpoint string `json:"endpoint" yaml:"endpoint"` // "local" => in-memory fallback
Credentials string `json:"credentials" yaml:"credentials"` // ref to cloud.account module name
}
DynamoDBNoSQLConfig holds configuration for the nosql.dynamodb module.
Full AWS DynamoDB implementation would use:
- github.com/aws/aws-sdk-go-v2/service/dynamodb
- github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue
When endpoint == "local" the module falls back to the in-memory backend, which is useful for local development and tests without a real DynamoDB endpoint.
type ECSAppManifests ¶ added in v0.2.14
type ECSAppManifests struct {
TaskDefinition ECSAppTaskDef `json:"taskDefinition"`
Service ECSAppServiceCfg `json:"service"`
}
ECSAppManifests holds the generated ECS task definition and service config.
type ECSAppServiceCfg ¶ added in v0.2.14
type ECSAppServiceCfg struct {
Name string `json:"name"`
TaskDefinition string `json:"taskDefinition"`
DesiredCount int `json:"desiredCount"`
LaunchType string `json:"launchType"`
}
ECSAppServiceCfg represents ECS service configuration for an app container.
type ECSAppTaskDef ¶ added in v0.2.14
type ECSAppTaskDef struct {
Family string `json:"family"`
CPU string `json:"cpu"`
Memory string `json:"memory"`
Containers []ECSContainer `json:"containers"`
}
ECSAppTaskDef represents an ECS task definition for an app container.
type ECSApplyStep ¶ added in v0.2.14
type ECSApplyStep struct {
// contains filtered or unexported fields
}
ECSApplyStep calls Apply() on a named platform.ecs module.
func (*ECSApplyStep) Execute ¶ added in v0.2.14
func (s *ECSApplyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ECSApplyStep) Name ¶ added in v0.2.14
func (s *ECSApplyStep) Name() string
type ECSContainer ¶ added in v0.2.14
type ECSContainer struct {
Name string `json:"name"`
Image string `json:"image"`
Port int `json:"port,omitempty"`
}
ECSContainer describes a container within a task definition.
type ECSDestroyStep ¶ added in v0.2.14
type ECSDestroyStep struct {
// contains filtered or unexported fields
}
ECSDestroyStep calls Destroy() on a named platform.ecs module.
func (*ECSDestroyStep) Execute ¶ added in v0.2.14
func (s *ECSDestroyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ECSDestroyStep) Name ¶ added in v0.2.14
func (s *ECSDestroyStep) Name() string
type ECSLoadBalancer ¶ added in v0.2.14
type ECSLoadBalancer struct {
TargetGroupARN string `json:"targetGroupArn"`
ContainerName string `json:"containerName"`
ContainerPort int `json:"containerPort"`
}
ECSLoadBalancer describes the ALB/NLB configuration for an ECS service.
type ECSPlanStep ¶ added in v0.2.14
type ECSPlanStep struct {
// contains filtered or unexported fields
}
ECSPlanStep calls Plan() on a named platform.ecs module.
func (*ECSPlanStep) Execute ¶ added in v0.2.14
func (s *ECSPlanStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ECSPlanStep) Name ¶ added in v0.2.14
func (s *ECSPlanStep) Name() string
type ECSServiceState ¶ added in v0.2.14
type ECSServiceState struct {
Name string `json:"name"`
Cluster string `json:"cluster"`
Region string `json:"region"`
LaunchType string `json:"launchType"`
Status string `json:"status"` // pending, creating, running, deleting, deleted
DesiredCount int `json:"desiredCount"`
RunningCount int `json:"runningCount"`
TaskDefinition ECSTaskDefinition `json:"taskDefinition"`
LoadBalancer *ECSLoadBalancer `json:"loadBalancer,omitempty"`
CreatedAt time.Time `json:"createdAt"`
}
ECSServiceState holds the current state of a managed ECS service.
type ECSStatusStep ¶ added in v0.2.14
type ECSStatusStep struct {
// contains filtered or unexported fields
}
ECSStatusStep calls Status() on a named platform.ecs module.
func (*ECSStatusStep) Execute ¶ added in v0.2.14
func (s *ECSStatusStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ECSStatusStep) Name ¶ added in v0.2.14
func (s *ECSStatusStep) Name() string
type ECSTaskDefinition ¶ added in v0.2.14
type ECSTaskDefinition struct {
Family string `json:"family"`
Revision int `json:"revision"`
CPU string `json:"cpu"`
Memory string `json:"memory"`
Containers []ECSContainer `json:"containers"`
}
ECSTaskDefinition describes an ECS task definition.
type ErrorStrategy ¶
type ErrorStrategy string
ErrorStrategy defines how a pipeline handles step errors.
const ( ErrorStrategyStop ErrorStrategy = "stop" ErrorStrategySkip ErrorStrategy = "skip" ErrorStrategyCompensate ErrorStrategy = "compensate" )
type EventBridgeCarrier ¶ added in v0.2.15
EventBridgeCarrier wraps a map[string]any as a TextMapCarrier. Only string values are propagated; non-string values are ignored on Get.
func (EventBridgeCarrier) Get ¶ added in v0.2.15
func (c EventBridgeCarrier) Get(key string) string
func (EventBridgeCarrier) Keys ¶ added in v0.2.15
func (c EventBridgeCarrier) Keys() []string
func (EventBridgeCarrier) Set ¶ added in v0.2.15
func (c EventBridgeCarrier) Set(key, value string)
type EventBridgeTracePropagator ¶ added in v0.2.15
type EventBridgeTracePropagator struct {
// contains filtered or unexported fields
}
EventBridgeTracePropagator propagates trace context in EventBridge event detail metadata.
func NewEventBridgeTracePropagator ¶ added in v0.2.15
func NewEventBridgeTracePropagator() *EventBridgeTracePropagator
NewEventBridgeTracePropagator creates an EventBridge trace propagator.
func (*EventBridgeTracePropagator) Extract ¶ added in v0.2.15
func (p *EventBridgeTracePropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
func (*EventBridgeTracePropagator) ExtractDetail ¶ added in v0.2.15
func (p *EventBridgeTracePropagator) ExtractDetail(ctx context.Context, detail map[string]any) context.Context
ExtractDetail extracts trace context from an EventBridge detail map.
func (*EventBridgeTracePropagator) Inject ¶ added in v0.2.15
func (p *EventBridgeTracePropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) error
func (*EventBridgeTracePropagator) InjectDetail ¶ added in v0.2.15
InjectDetail injects trace context into an EventBridge detail map.
type EventBusBridge ¶
type EventBusBridge struct {
// contains filtered or unexported fields
}
EventBusBridge adapts the modular framework's EventBusModule to the workflow engine's MessageBroker interface. It allows the workflow engine to publish and subscribe to events through the EventBus using the existing MessageBroker API.
func NewEventBusBridge ¶
func NewEventBusBridge(name string) *EventBusBridge
NewEventBusBridge creates a new EventBusBridge with the given name.
func (*EventBusBridge) Consumer ¶
func (b *EventBusBridge) Consumer() MessageConsumer
Consumer returns the bridge itself, which implements MessageConsumer.
func (*EventBusBridge) Init ¶
func (b *EventBusBridge) Init(app modular.Application) error
Init registers the bridge as a service in the application's service registry. It does not look up the EventBus here; that is done via SetEventBus or InitFromApp after the application has been fully initialized.
func (*EventBusBridge) InitFromApp ¶
func (b *EventBusBridge) InitFromApp(app modular.Application) error
InitFromApp looks up the EventBusModule from the application's service registry using the well-known service name "eventbus.provider".
func (*EventBusBridge) Name ¶
func (b *EventBusBridge) Name() string
Name returns the bridge's service name.
func (*EventBusBridge) Producer ¶
func (b *EventBusBridge) Producer() MessageProducer
Producer returns the bridge itself, which implements MessageProducer.
func (*EventBusBridge) SendMessage ¶
func (b *EventBusBridge) SendMessage(topic string, message []byte) error
SendMessage publishes a message to the EventBus. The message bytes are unmarshalled from JSON into an interface{} payload. If unmarshalling fails, the raw bytes are published as the payload. Returns nil (no-op) if no EventBus has been set.
func (*EventBusBridge) SetEventBus ¶
func (b *EventBusBridge) SetEventBus(eb *eventbus.EventBusModule)
SetEventBus injects the EventBusModule directly. This is useful when the engine already has a reference to the EventBus after app.Init().
func (*EventBusBridge) Start ¶
func (b *EventBusBridge) Start(_ context.Context) error
Start is a no-op; the EventBus lifecycle is managed externally.
func (*EventBusBridge) Stop ¶
func (b *EventBusBridge) Stop(_ context.Context) error
Stop cancels all active subscriptions and clears the subscription map.
func (*EventBusBridge) Subscribe ¶
func (b *EventBusBridge) Subscribe(topic string, handler MessageHandler) error
Subscribe registers a MessageHandler to receive events from the EventBus on the given topic. Events are marshalled to JSON before being passed to the handler. Returns nil (no-op) if no EventBus has been set.
func (*EventBusBridge) Unsubscribe ¶
func (b *EventBusBridge) Unsubscribe(topic string) error
Unsubscribe cancels the subscription for the given topic and removes it.
type EventBusTrigger ¶
type EventBusTrigger struct {
// contains filtered or unexported fields
}
EventBusTrigger implements the Trigger interface and starts workflows in response to events published on the EventBus.
func NewEventBusTrigger ¶
func NewEventBusTrigger() *EventBusTrigger
NewEventBusTrigger creates a new EventBus trigger with default namespace.
func NewEventBusTriggerWithNamespace ¶
func NewEventBusTriggerWithNamespace(namespace ModuleNamespaceProvider) *EventBusTrigger
NewEventBusTriggerWithNamespace creates a new EventBus trigger with namespace support.
func (*EventBusTrigger) Configure ¶
func (t *EventBusTrigger) Configure(app modular.Application, triggerConfig any) error
Configure parses the trigger config and resolves the EventBus and engine services from the application.
func (*EventBusTrigger) Init ¶
func (t *EventBusTrigger) Init(app modular.Application) error
Init registers the trigger as a service.
func (*EventBusTrigger) Name ¶
func (t *EventBusTrigger) Name() string
Name returns the trigger name.
func (*EventBusTrigger) SetEventBusAndEngine ¶
func (t *EventBusTrigger) SetEventBusAndEngine(eb *eventbus.EventBusModule, engine WorkflowEngine)
SetEventBusAndEngine allows directly setting the EventBus and engine for testing.
type EventBusTriggerSubscription ¶
type EventBusTriggerSubscription struct {
Topic string `json:"topic" yaml:"topic"`
Event string `json:"event,omitempty" yaml:"event,omitempty"`
Workflow string `json:"workflow" yaml:"workflow"`
Action string `json:"action" yaml:"action"`
Async bool `json:"async,omitempty" yaml:"async,omitempty"`
Params map[string]any `json:"params,omitempty" yaml:"params,omitempty"`
}
EventBusTriggerSubscription defines a single subscription that the trigger listens to on the EventBus and maps to a workflow execution.
type EventData ¶
type EventData struct {
EventType string `json:"eventType"`
Timestamp time.Time `json:"timestamp"`
SourceID string `json:"sourceId"`
CorrelID string `json:"correlId,omitempty"`
Data map[string]any `json:"data,omitempty"`
RawMessage []byte `json:"-"`
}
EventData represents an event in the system
type EventHandler ¶
type EventHandler interface {
HandlePattern(ctx context.Context, match PatternMatch) error
}
EventHandler processes matched event patterns
type EventPattern ¶
type EventPattern struct {
PatternID string `json:"patternId" yaml:"patternId"`
EventTypes []string `json:"eventTypes" yaml:"eventTypes"`
WindowTime time.Duration `json:"windowTime" yaml:"windowTime"`
Condition string `json:"condition" yaml:"condition"`
MinOccurs int `json:"minOccurs" yaml:"minOccurs"`
MaxOccurs int `json:"maxOccurs" yaml:"maxOccurs"`
OrderMatters bool `json:"orderMatters" yaml:"orderMatters"`
ExtraParams map[string]any `json:"extraParams,omitempty" yaml:"extraParams,omitempty"`
}
EventPattern defines a pattern for matching complex event sequences
type EventProcessor ¶
type EventProcessor struct {
// contains filtered or unexported fields
}
EventProcessor processes complex event patterns
func GetProcessor ¶
func GetProcessor(app modular.Application) (*EventProcessor, error)
GetProcessor is a utility to get an event processor from the app
func NewEventProcessor ¶
func NewEventProcessor(name string) *EventProcessor
NewEventProcessor creates a new complex event processor
func (*EventProcessor) AddPattern ¶
func (p *EventProcessor) AddPattern(pattern *EventPattern)
AddPattern adds a new event pattern to monitor
func (*EventProcessor) Error ¶
func (p *EventProcessor) Error() string
Error returns the last error from the processor - implements the error interface
func (*EventProcessor) GetService ¶
func (p *EventProcessor) GetService(name string, out any) error
GetService implements the service functionality expected by handlers. It follows the modular.Application interface signature
func (*EventProcessor) Init ¶
func (p *EventProcessor) Init(app modular.Application) error
Init initializes the event processor
func (*EventProcessor) ProcessEvent ¶
func (p *EventProcessor) ProcessEvent(ctx context.Context, event EventData) error
ProcessEvent processes a new event and checks for pattern matches
func (*EventProcessor) ProvidesServices ¶
func (p *EventProcessor) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns services provided by this processor
func (*EventProcessor) RegisterHandler ¶
func (p *EventProcessor) RegisterHandler(patternID string, handler EventHandler) error
RegisterHandler registers a handler for a specific pattern
func (*EventProcessor) RequiresServices ¶
func (p *EventProcessor) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this processor
func (*EventProcessor) Service ¶
func (p *EventProcessor) Service(name string) any
Service provides access to a named service
func (*EventProcessor) Services ¶
func (p *EventProcessor) Services() map[string]any
Services returns a map of all available services
func (*EventProcessor) SetError ¶
func (p *EventProcessor) SetError(err error)
SetError sets the processor error
type EventProcessorLocator ¶
type EventProcessorLocator struct {
App modular.Application
}
EventProcessorLocator helps locate the event processor
func NewEventProcessorLocator ¶
func NewEventProcessorLocator(app modular.Application) *EventProcessorLocator
NewEventProcessorLocator creates a new locator
func (*EventProcessorLocator) Locate ¶
func (l *EventProcessorLocator) Locate(name string) (*EventProcessor, error)
Locate finds an event processor by name
func (*EventProcessorLocator) LocateDefault ¶
func (l *EventProcessorLocator) LocateDefault() (*EventProcessor, error)
LocateDefault finds the default event processor
type EventRecorder ¶
type EventRecorder = interfaces.EventRecorder
EventRecorder is an optional interface for recording execution events. When set on Pipeline, execution events are appended for observability. The store.EventStore can satisfy this via an adapter at the wiring layer. This is a type alias for interfaces.EventRecorder so callers using module.EventRecorder or interfaces.EventRecorder interchangeably are unaffected.
type EventStoreServiceConfig ¶ added in v0.1.6
type EventStoreServiceConfig struct {
DBPath string `yaml:"db_path" default:"data/events.db"`
// RetentionDays is reserved for future implementation of automatic event pruning.
// It is stored and exposed via RetentionDays() but not yet applied to the store.
RetentionDays int `yaml:"retention_days" default:"90"`
}
EventStoreServiceConfig holds the configuration for the event store service module.
type EventStoreServiceModule ¶ added in v0.1.6
type EventStoreServiceModule struct {
// contains filtered or unexported fields
}
EventStoreServiceModule wraps an evstore.SQLiteEventStore as a modular.Module. It initializes the store and makes it available in the modular service registry.
func NewEventStoreServiceModule ¶ added in v0.1.6
func NewEventStoreServiceModule(name string, cfg EventStoreServiceConfig) (*EventStoreServiceModule, error)
NewEventStoreServiceModule creates a new event store service module with the given name and config.
func (*EventStoreServiceModule) Init ¶ added in v0.1.6
func (m *EventStoreServiceModule) Init(_ modular.Application) error
Init implements modular.Module.
func (*EventStoreServiceModule) Name ¶ added in v0.1.6
func (m *EventStoreServiceModule) Name() string
Name implements modular.Module.
func (*EventStoreServiceModule) ProvidesServices ¶ added in v0.1.6
func (m *EventStoreServiceModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices implements modular.Module. The event store is registered under the module name so other modules (timeline, replay, DLQ) can look it up.
func (*EventStoreServiceModule) RequiresServices ¶ added in v0.1.6
func (m *EventStoreServiceModule) RequiresServices() []modular.ServiceDependency
RequiresServices implements modular.Module.
func (*EventStoreServiceModule) RetentionDays ¶ added in v0.1.6
func (m *EventStoreServiceModule) RetentionDays() int
RetentionDays returns the configured retention period.
func (*EventStoreServiceModule) Store ¶ added in v0.1.6
func (m *EventStoreServiceModule) Store() *evstore.SQLiteEventStore
Store returns the underlying SQLiteEventStore for direct use.
type EventTrigger ¶
type EventTrigger struct {
// contains filtered or unexported fields
}
EventTrigger implements a trigger that starts workflows from messaging events
func NewEventTrigger ¶
func NewEventTrigger() *EventTrigger
NewEventTrigger creates a new event trigger
func NewEventTriggerWithNamespace ¶
func NewEventTriggerWithNamespace(namespace ModuleNamespaceProvider) *EventTrigger
NewEventTriggerWithNamespace creates a new event trigger with namespace support
func (*EventTrigger) Configure ¶
func (t *EventTrigger) Configure(app modular.Application, triggerConfig any) error
Configure sets up the trigger from configuration
func (*EventTrigger) Init ¶
func (t *EventTrigger) Init(app modular.Application) error
Init initializes the trigger
func (*EventTrigger) Name ¶
func (t *EventTrigger) Name() string
Name returns the name of this trigger
func (*EventTrigger) SetBrokerAndEngine ¶
func (t *EventTrigger) SetBrokerAndEngine(broker MessageBroker, engine WorkflowEngine)
SetBrokerAndEngine allows directly setting the broker and engine for testing
type EventTriggerConfig ¶
type EventTriggerConfig struct {
Subscriptions []EventTriggerSubscription `json:"subscriptions" yaml:"subscriptions"`
}
EventTriggerConfig represents the configuration for an event trigger
type EventTriggerSubscription ¶
type EventTriggerSubscription struct {
Topic string `json:"topic" yaml:"topic"`
Event string `json:"event" yaml:"event"`
Workflow string `json:"workflow" yaml:"workflow"`
Action string `json:"action" yaml:"action"`
Params map[string]any `json:"params,omitempty" yaml:"params,omitempty"`
}
EventTriggerSubscription represents a subscription to a message topic
type ExecutionTracker ¶
type ExecutionTracker struct {
Store *V1Store
WorkflowID string
// EventStoreRecorder is an optional EventRecorder (typically the
// EventRecorderAdapter wrapping the SQLite event store) that should
// receive copies of all events. When CQRS handler pipelines don't
// have their own EventRecorder, this ensures events still flow to
// the event store for the store browser and timeline features.
EventStoreRecorder EventRecorder
// Tracer is an optional OTEL WorkflowTracer. When set, the tracker
// creates spans for each execution and step alongside DB writes.
Tracer *tracing.WorkflowTracer
// contains filtered or unexported fields
}
ExecutionTracker wraps pipeline execution with V1Store recording. It also implements EventRecorder so the pipeline can push step-level events that are persisted to execution_steps and execution_logs.
func (*ExecutionTracker) RecordEvent ¶
func (t *ExecutionTracker) RecordEvent(ctx context.Context, executionID string, eventType string, data map[string]any) error
RecordEvent implements EventRecorder. It is called by the Pipeline for each execution event (step.started, step.completed, step.failed, etc.). Events are recorded best-effort — errors are silently ignored.
func (*ExecutionTracker) SetEventStoreRecorder ¶ added in v0.1.6
func (t *ExecutionTracker) SetEventStoreRecorder(r EventRecorder)
SetEventStoreRecorder sets the optional event store recorder that receives copies of all execution events. This is used by the server to wire the SQLite event store without directly assigning the exported field.
func (*ExecutionTracker) TrackPipelineExecution ¶
func (t *ExecutionTracker) TrackPipelineExecution( ctx context.Context, pipeline *Pipeline, triggerData map[string]any, r *http.Request, ) (*PipelineContext, error)
TrackPipelineExecution wraps a pipeline execution call, recording the execution and its steps in the V1Store. It returns the PipelineContext and any error from the underlying pipeline execution.
type ExecutionTrackerProvider ¶ added in v0.1.5
type ExecutionTrackerProvider interface {
TrackPipelineExecution(ctx context.Context, pipeline *Pipeline, triggerData map[string]any, r *http.Request) (*PipelineContext, error)
}
ExecutionTrackerProvider is the minimal interface required to track pipeline executions. *ExecutionTracker satisfies this interface.
type Executor ¶
type Executor interface {
Execute(ctx context.Context, params map[string]any) (map[string]any, error)
}
Executor is the interface that dynamic components satisfy.
type ExternalOperation ¶
type ExternalOperation struct {
Method string `json:"method"`
Path string `json:"path"`
OperationID string `json:"operationId"`
Summary string `json:"summary"`
Tags []string `json:"tags"`
HasBody bool `json:"hasBody"`
}
ExternalOperation describes a callable operation from an external API spec.
type ExternalStateMachineDefinition ¶
type ExternalStateMachineDefinition struct {
ID string `json:"id" yaml:"id"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
InitialState string `json:"initialState" yaml:"initialState"`
States map[string]StateMachineStateConfig `json:"states" yaml:"states"`
Transitions map[string]StateMachineTransitionConfig `json:"transitions" yaml:"transitions"`
}
ExternalStateMachineDefinition is used for registering state machines from configuration
type FFGateStep ¶
type FFGateStep struct {
// contains filtered or unexported fields
}
FFGateStep combines feature flag evaluation with conditional routing. Based on the flag result, it routes to either the on_enabled or on_disabled step.
func (*FFGateStep) Execute ¶
func (s *FFGateStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute evaluates the flag and routes to the appropriate next step.
type FSIaCStateStore ¶ added in v0.2.13
type FSIaCStateStore struct {
// contains filtered or unexported fields
}
FSIaCStateStore persists IaC state as JSON files under a configured directory. Lock files (resourceID + ".lock") are used for concurrent safety.
func NewFSIaCStateStore ¶ added in v0.2.13
func NewFSIaCStateStore(dir string) *FSIaCStateStore
NewFSIaCStateStore creates a filesystem-backed state store rooted at dir. The directory is created on first use if it does not exist.
func (*FSIaCStateStore) DeleteState ¶ added in v0.2.13
func (s *FSIaCStateStore) DeleteState(resourceID string) error
DeleteState removes the JSON state file for resourceID.
func (*FSIaCStateStore) GetState ¶ added in v0.2.13
func (s *FSIaCStateStore) GetState(resourceID string) (*IaCState, error)
GetState reads the JSON state file for resourceID. Returns nil, nil when not found.
func (*FSIaCStateStore) ListStates ¶ added in v0.2.13
func (s *FSIaCStateStore) ListStates(filter map[string]string) ([]*IaCState, error)
ListStates reads all JSON files from the directory and returns those matching filter. Supported filter keys: "resource_type", "provider", "status".
func (*FSIaCStateStore) Lock ¶ added in v0.2.13
func (s *FSIaCStateStore) Lock(resourceID string) error
Lock creates a lock file for resourceID. Fails if the lock file already exists.
func (*FSIaCStateStore) SaveState ¶ added in v0.2.13
func (s *FSIaCStateStore) SaveState(state *IaCState) error
SaveState writes the state record as a JSON file, creating the directory as needed.
func (*FSIaCStateStore) Unlock ¶ added in v0.2.13
func (s *FSIaCStateStore) Unlock(resourceID string) error
Unlock removes the lock file for resourceID.
type FeatureFlagAdmin ¶
type FeatureFlagAdmin interface {
// ListFlags returns all flag definitions as JSON-serializable objects.
ListFlags() ([]any, error)
// GetFlag returns a single flag by key.
GetFlag(key string) (any, error)
// CreateFlag creates a new flag from a JSON body.
CreateFlag(data json.RawMessage) (any, error)
// UpdateFlag updates an existing flag from a JSON body.
UpdateFlag(key string, data json.RawMessage) (any, error)
// DeleteFlag removes a flag by key.
DeleteFlag(key string) error
// SetOverrides replaces overrides for a flag from a JSON body.
SetOverrides(key string, data json.RawMessage) (any, error)
// EvaluateFlag evaluates a flag with the given user/group context.
EvaluateFlag(key string, user string, group string) (any, error)
// SSEHandler returns an http.Handler that streams flag change events.
SSEHandler() http.Handler
}
FeatureFlagAdmin is the interface the feature flag service must implement for the admin API handler. This is defined here to avoid a hard dependency on the featureflag package — the service is wired in via SetFeatureFlagService.
type FeatureFlagAdminAdapter ¶
type FeatureFlagAdminAdapter struct {
// contains filtered or unexported fields
}
FeatureFlagAdminAdapter bridges the featureflag.Service and generic.Store to the FeatureFlagAdmin interface required by V1APIHandler.
func NewFeatureFlagAdminAdapter ¶
func NewFeatureFlagAdminAdapter(service *featureflag.Service, store *generic.Store) *FeatureFlagAdminAdapter
NewFeatureFlagAdminAdapter creates an adapter implementing FeatureFlagAdmin.
func (*FeatureFlagAdminAdapter) CreateFlag ¶
func (a *FeatureFlagAdminAdapter) CreateFlag(data json.RawMessage) (any, error)
func (*FeatureFlagAdminAdapter) DeleteFlag ¶
func (a *FeatureFlagAdminAdapter) DeleteFlag(key string) error
func (*FeatureFlagAdminAdapter) EvaluateFlag ¶
func (*FeatureFlagAdminAdapter) GetFlag ¶
func (a *FeatureFlagAdminAdapter) GetFlag(key string) (any, error)
func (*FeatureFlagAdminAdapter) ListFlags ¶
func (a *FeatureFlagAdminAdapter) ListFlags() ([]any, error)
func (*FeatureFlagAdminAdapter) SSEHandler ¶
func (a *FeatureFlagAdminAdapter) SSEHandler() http.Handler
func (*FeatureFlagAdminAdapter) SetOverrides ¶
func (a *FeatureFlagAdminAdapter) SetOverrides(key string, data json.RawMessage) (any, error)
func (*FeatureFlagAdminAdapter) UpdateFlag ¶
func (a *FeatureFlagAdminAdapter) UpdateFlag(key string, data json.RawMessage) (any, error)
type FeatureFlagModule ¶
type FeatureFlagModule struct {
// contains filtered or unexported fields
}
FeatureFlagModule wraps a featureflag.Service as a modular.Module. It initializes the configured provider and makes the service available in the modular service registry.
func NewFeatureFlagModule ¶
func NewFeatureFlagModule(name string, cfg FeatureFlagModuleConfig) (*FeatureFlagModule, error)
NewFeatureFlagModule creates a new feature flag module with the given name and config.
func (*FeatureFlagModule) Init ¶
func (m *FeatureFlagModule) Init(_ modular.Application) error
Init implements modular.Module.
func (*FeatureFlagModule) Name ¶
func (m *FeatureFlagModule) Name() string
Name implements modular.Module.
func (*FeatureFlagModule) ProvidesServices ¶
func (m *FeatureFlagModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices implements modular.Module. The service is registered under the module name so other modules (and the engine) can look it up. A FeatureFlagAdmin adapter is also registered so that the V1 API handler can discover it from the service registry without explicit wiring in main.
func (*FeatureFlagModule) RequiresServices ¶
func (m *FeatureFlagModule) RequiresServices() []modular.ServiceDependency
RequiresServices implements modular.Module.
func (*FeatureFlagModule) SSEEnabled ¶
func (m *FeatureFlagModule) SSEEnabled() bool
SSEEnabled returns whether SSE streaming is enabled for this module.
func (*FeatureFlagModule) Service ¶
func (m *FeatureFlagModule) Service() *featureflag.Service
Service returns the underlying FF service for direct use (e.g. step factories).
func (*FeatureFlagModule) Store ¶
func (m *FeatureFlagModule) Store() *generic.Store
Store returns the underlying generic store, or nil if using a non-generic provider.
type FeatureFlagModuleConfig ¶
type FeatureFlagModuleConfig struct {
Provider string `yaml:"provider" default:"generic"`
CacheTTL string `yaml:"cache_ttl" default:"30s"`
SSEEnabled bool `yaml:"sse_enabled" default:"true"`
DBPath string `yaml:"db_path" default:"data/featureflags.db"`
}
FeatureFlagModuleConfig holds the configuration for the feature flag module.
type FeatureFlagStep ¶
type FeatureFlagStep struct {
// contains filtered or unexported fields
}
FeatureFlagStep evaluates a feature flag within a pipeline and stores the result in the pipeline context under a configurable output key.
func (*FeatureFlagStep) Execute ¶
func (s *FeatureFlagStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute evaluates the configured feature flag and puts the result into the pipeline context. The output is a map keyed by output_key containing:
{enabled: bool, variant: string, value: any}
type FieldEncryptor ¶
type FieldEncryptor struct {
// contains filtered or unexported fields
}
FieldEncryptor provides AES-256-GCM encryption for PII fields in data maps. It encrypts specific fields before storage and decrypts them on retrieval, ensuring data at rest contains no plaintext PII.
func NewFieldEncryptor ¶
func NewFieldEncryptor(keyStr string) *FieldEncryptor
NewFieldEncryptor creates a FieldEncryptor from a key string. If the key is empty, encryption is disabled (passthrough mode).
func NewFieldEncryptorFromEnv ¶
func NewFieldEncryptorFromEnv() *FieldEncryptor
NewFieldEncryptorFromEnv creates a FieldEncryptor using the ENCRYPTION_KEY environment variable. Returns a disabled encryptor if the var is not set.
func (*FieldEncryptor) DecryptJSON ¶
func (e *FieldEncryptor) DecryptJSON(data []byte) ([]byte, error)
DecryptJSON decrypts an entire JSON payload (for Kafka messages). Non-encrypted payloads (no "_encrypted" key) are returned as-is.
func (*FieldEncryptor) DecryptPIIFields ¶
DecryptPIIFields decrypts known PII fields in a data map. Values without the "enc::" prefix are returned as-is (backward compatible).
func (*FieldEncryptor) DecryptValue ¶
func (e *FieldEncryptor) DecryptValue(encoded string) (string, error)
DecryptValue decrypts a single AES-256-GCM encrypted value. Values without the "enc::" prefix are returned as-is (plaintext passthrough).
func (*FieldEncryptor) Enabled ¶
func (e *FieldEncryptor) Enabled() bool
Enabled returns whether encryption is active.
func (*FieldEncryptor) EncryptJSON ¶
func (e *FieldEncryptor) EncryptJSON(data []byte) ([]byte, error)
EncryptJSON encrypts an entire JSON payload (for Kafka messages). The entire message is encrypted as a single blob.
func (*FieldEncryptor) EncryptPIIFields ¶
EncryptPIIFields encrypts known PII fields in a data map. It handles nested "messages" arrays where each message may contain PII.
func (*FieldEncryptor) EncryptValue ¶
func (e *FieldEncryptor) EncryptValue(plaintext string) (string, error)
EncryptValue encrypts a single string value using AES-256-GCM. Returns the encrypted value prefixed with "enc::" for identification.
type FieldMapping ¶
type FieldMapping struct {
// contains filtered or unexported fields
}
FieldMapping provides configurable field name resolution with fallback chains. Each logical field name maps to an ordered list of actual field names to try when reading from a data map. This eliminates hard-coded field references and allows YAML configuration to remap fields without code changes.
func DefaultRESTFieldMapping ¶
func DefaultRESTFieldMapping() *FieldMapping
DefaultRESTFieldMapping returns the default field mapping for REST API handlers. This matches the existing hard-coded behavior for full backwards compatibility.
func FieldMappingFromConfig ¶
func FieldMappingFromConfig(cfg map[string]any) *FieldMapping
FieldMappingFromConfig parses a field mapping from a config map. The config format is: {"logicalName": ["actual1", "actual2"]} or {"logicalName": "actual1"}
func NewFieldMapping ¶
func NewFieldMapping() *FieldMapping
NewFieldMapping creates a FieldMapping with no mappings defined.
func (*FieldMapping) Clone ¶
func (fm *FieldMapping) Clone() *FieldMapping
Clone returns a deep copy of the field mapping.
func (*FieldMapping) Has ¶
func (fm *FieldMapping) Has(logical string) bool
Has returns true if a mapping is defined for the given logical name.
func (*FieldMapping) MarshalJSON ¶
func (fm *FieldMapping) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler for FieldMapping.
func (*FieldMapping) Merge ¶
func (fm *FieldMapping) Merge(other *FieldMapping)
Merge copies all mappings from other into fm. Existing mappings are overwritten.
func (*FieldMapping) Primary ¶
func (fm *FieldMapping) Primary(logical string) string
Primary returns the primary (first) field name for a logical field. If no mapping is defined, returns the logical name itself.
func (*FieldMapping) Resolve ¶
Resolve looks up a logical field name in data, trying each actual name in order. Returns the value and true if found, or nil and false if no actual name matched.
func (*FieldMapping) ResolveSlice ¶
func (fm *FieldMapping) ResolveSlice(data map[string]any, logical string) []any
ResolveSlice resolves a logical field name to a []interface{} value. Returns nil if not found or not a slice.
func (*FieldMapping) ResolveString ¶
func (fm *FieldMapping) ResolveString(data map[string]any, logical string) string
ResolveString resolves a logical field name to a string value. Returns empty string if not found or not a string.
func (*FieldMapping) Set ¶
func (fm *FieldMapping) Set(logical string, actual ...string)
Set defines the actual field name(s) for a logical field. The first name is the "primary" used for writes; all names are tried in order for reads.
func (*FieldMapping) SetValue ¶
func (fm *FieldMapping) SetValue(data map[string]any, logical string, value any)
SetValue sets a value in data using the primary (first) field name for a logical field.
func (*FieldMapping) String ¶
func (fm *FieldMapping) String() string
String returns a human-readable representation of the field mapping.
func (*FieldMapping) UnmarshalJSON ¶
func (fm *FieldMapping) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler for FieldMapping.
type Finding ¶
type Finding struct {
RuleID string `json:"rule_id"`
Severity string `json:"severity"` // "critical", "high", "medium", "low", "info"
Message string `json:"message"`
Location string `json:"location"`
Line int `json:"line,omitempty"`
}
Finding represents a single issue found by a scanner.
type ForEachStep ¶ added in v0.2.3
type ForEachStep struct {
// contains filtered or unexported fields
}
ForEachStep iterates over a collection and executes sub-steps for each item.
func (*ForEachStep) Execute ¶ added in v0.2.3
func (s *ForEachStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute iterates over the collection and runs sub-steps for each item.
func (*ForEachStep) Name ¶ added in v0.2.3
func (s *ForEachStep) Name() string
Name returns the step name.
type FunctionHandler ¶
type FunctionHandler struct {
// contains filtered or unexported fields
}
FunctionHandler is a simple EventHandler that executes a function
func NewFunctionHandler ¶
func NewFunctionHandler(fn func(ctx context.Context, match PatternMatch) error) *FunctionHandler
NewFunctionHandler creates a new function-based event handler
func (*FunctionHandler) HandlePattern ¶
func (h *FunctionHandler) HandlePattern(ctx context.Context, match PatternMatch) error
HandlePattern handles a pattern match by calling the function
type FunctionJob ¶
type FunctionJob struct {
// contains filtered or unexported fields
}
FunctionJob is a Job implementation that executes a function
func NewFunctionJob ¶
func NewFunctionJob(fn func(context.Context) error) *FunctionJob
NewFunctionJob creates a new job from a function
type FunctionMessageHandler ¶
type FunctionMessageHandler struct {
// contains filtered or unexported fields
}
FunctionMessageHandler adapts a function to the MessageHandler interface
func NewFunctionMessageHandler ¶
func NewFunctionMessageHandler(fn func(message []byte) error) *FunctionMessageHandler
NewFunctionMessageHandler creates a new message handler from a function
func (*FunctionMessageHandler) HandleMessage ¶
func (h *FunctionMessageHandler) HandleMessage(message []byte) error
HandleMessage implements the MessageHandler interface
type FunctionTransitionHandler ¶
type FunctionTransitionHandler struct {
// contains filtered or unexported fields
}
FunctionTransitionHandler is a simple TransitionHandler that executes a function
func NewFunctionTransitionHandler ¶
func NewFunctionTransitionHandler(fn func(ctx context.Context, event TransitionEvent) error) *FunctionTransitionHandler
NewFunctionTransitionHandler creates a new function-based transition handler
func (*FunctionTransitionHandler) HandleTransition ¶
func (h *FunctionTransitionHandler) HandleTransition(ctx context.Context, event TransitionEvent) error
HandleTransition handles a state transition by calling the function
type GCSStorage ¶
type GCSStorage struct {
// contains filtered or unexported fields
}
GCSStorage provides object storage operations using Google Cloud Storage.
func NewGCSStorage ¶
func NewGCSStorage(name string) *GCSStorage
NewGCSStorage creates a new GCS storage module.
func (*GCSStorage) Delete ¶
func (g *GCSStorage) Delete(ctx context.Context, key string) error
Delete removes an object from GCS.
func (*GCSStorage) Get ¶
func (g *GCSStorage) Get(ctx context.Context, key string) (io.ReadCloser, error)
Get retrieves an object from GCS.
func (*GCSStorage) Init ¶
func (g *GCSStorage) Init(app modular.Application) error
func (*GCSStorage) MkdirAll ¶ added in v0.1.5
func (g *GCSStorage) MkdirAll(_ context.Context, _ string) error
MkdirAll is a no-op for object storage (GCS has no real directories).
func (*GCSStorage) Name ¶
func (g *GCSStorage) Name() string
func (*GCSStorage) ProvidesServices ¶
func (g *GCSStorage) ProvidesServices() []modular.ServiceProvider
func (*GCSStorage) RequiresServices ¶
func (g *GCSStorage) RequiresServices() []modular.ServiceDependency
func (*GCSStorage) SetBucket ¶
func (g *GCSStorage) SetBucket(bucket string)
SetBucket sets the GCS bucket name.
func (*GCSStorage) SetBucketHandle ¶ added in v0.1.5
func (g *GCSStorage) SetBucketHandle(bh gcsBucketHandle)
SetBucketHandle injects a gcsBucketHandle, used in tests to avoid real GCS calls.
func (*GCSStorage) SetCredentialsFile ¶
func (g *GCSStorage) SetCredentialsFile(path string)
SetCredentialsFile sets the path to a service account JSON key file.
func (*GCSStorage) SetProject ¶
func (g *GCSStorage) SetProject(project string)
SetProject sets the GCP project ID.
func (*GCSStorage) Start ¶
func (g *GCSStorage) Start(ctx context.Context) error
Start initializes the GCS client.
type GateStep ¶
type GateStep struct {
// contains filtered or unexported fields
}
GateStep implements an approval gate within a pipeline. It supports manual, automated, and scheduled gate types.
func (*GateStep) Execute ¶
func (s *GateStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute evaluates the gate based on its type and returns a gate result.
type GatewayRoute ¶
type GatewayRoute struct {
PathPrefix string `json:"pathPrefix"`
Backend string `json:"backend"`
StripPrefix bool `json:"stripPrefix"`
Methods []string `json:"methods"`
RateLimit *RateLimitConfig `json:"rateLimit,omitempty"`
Auth bool `json:"auth"`
Timeout string `json:"timeout"`
}
GatewayRoute defines a single route in the API gateway.
type GitCheckoutStep ¶ added in v0.2.9
type GitCheckoutStep struct {
// contains filtered or unexported fields
}
GitCheckoutStep checks out a branch, tag, or creates a new branch.
func (*GitCheckoutStep) Execute ¶ added in v0.2.9
func (s *GitCheckoutStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute checks out the configured branch or creates it.
func (*GitCheckoutStep) Name ¶ added in v0.2.9
func (s *GitCheckoutStep) Name() string
Name returns the step name.
type GitCloneStep ¶ added in v0.2.9
type GitCloneStep struct {
// contains filtered or unexported fields
}
GitCloneStep clones a git repository to a local directory.
func (*GitCloneStep) Execute ¶ added in v0.2.9
func (s *GitCloneStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute clones the repository to the configured directory.
func (*GitCloneStep) Name ¶ added in v0.2.9
func (s *GitCloneStep) Name() string
Name returns the step name.
type GitCommitStep ¶ added in v0.2.9
type GitCommitStep struct {
// contains filtered or unexported fields
}
GitCommitStep creates a git commit in a local repository.
func (*GitCommitStep) Execute ¶ added in v0.2.9
func (s *GitCommitStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute stages files and creates a commit.
func (*GitCommitStep) Name ¶ added in v0.2.9
func (s *GitCommitStep) Name() string
Name returns the step name.
type GitEvent ¶ added in v0.2.13
type GitEvent struct {
Provider string `json:"provider"`
Event string `json:"event"`
Ref string `json:"ref"`
Commit string `json:"commit"`
Author string `json:"author"`
Repository string `json:"repository"`
URL string `json:"url"`
// MR / PR fields
MRNumber int `json:"mr_number,omitempty"`
MRTitle string `json:"mr_title,omitempty"`
MRAction string `json:"mr_action,omitempty"`
}
GitEvent is the normalized representation of a git provider webhook event. Both the GitLab and GitHub webhook modules emit this structure.
type GitLabClient ¶ added in v0.2.13
type GitLabClient struct {
// contains filtered or unexported fields
}
GitLabClient is a lightweight GitLab REST API v4 client. When baseURL is "mock://", all methods return canned responses for testing.
func NewGitLabClient ¶ added in v0.2.13
func NewGitLabClient(baseURL, token string) *GitLabClient
NewGitLabClient creates a new GitLabClient.
func (*GitLabClient) CommentOnMR ¶ added in v0.2.13
func (c *GitLabClient) CommentOnMR(projectID string, mrIID int, body string) error
CommentOnMR posts a note (comment) on a merge request.
func (*GitLabClient) CreateMergeRequest ¶ added in v0.2.13
func (c *GitLabClient) CreateMergeRequest(projectID string, opts MROptions) (*GitLabMergeRequest, error)
CreateMergeRequest creates a merge request in the given project.
func (*GitLabClient) GetPipeline ¶ added in v0.2.13
func (c *GitLabClient) GetPipeline(projectID string, pipelineID int) (*GitLabPipeline, error)
GetPipeline retrieves the status of a pipeline by ID.
func (*GitLabClient) TriggerPipeline ¶ added in v0.2.13
func (c *GitLabClient) TriggerPipeline(projectID, ref string, variables map[string]string) (*GitLabPipeline, error)
TriggerPipeline triggers a pipeline for the given project ref.
type GitLabClientModule ¶ added in v0.2.13
type GitLabClientModule struct {
// contains filtered or unexported fields
}
GitLabClientModule is a workflow module that creates a GitLabClient and registers it in the service registry under its module name.
Config:
- name: gitlab-client type: gitlab.client config: url: "https://gitlab.com" # or self-hosted URL; use "mock://" for testing token: "${GITLAB_TOKEN}"
func NewGitLabClientModule ¶ added in v0.2.13
func NewGitLabClientModule(name string, cfg map[string]any) *GitLabClientModule
NewGitLabClientModule creates a new gitlab.client module.
func (*GitLabClientModule) Init ¶ added in v0.2.13
func (m *GitLabClientModule) Init(app modular.Application) error
Init resolves configuration, creates the client, and registers it as a service.
func (*GitLabClientModule) Name ¶ added in v0.2.13
func (m *GitLabClientModule) Name() string
Name returns the module name.
func (*GitLabClientModule) ProvidesServices ¶ added in v0.2.13
func (m *GitLabClientModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service provided by this module.
type GitLabMergeRequest ¶ added in v0.2.13
type GitLabMergeRequest struct {
ID int `json:"id"`
IID int `json:"iid"`
Title string `json:"title"`
State string `json:"state"`
SourceBranch string `json:"source_branch"`
TargetBranch string `json:"target_branch"`
WebURL string `json:"web_url"`
}
GitLabMergeRequest represents a GitLab merge request.
type GitLabPipeline ¶ added in v0.2.13
type GitLabPipeline struct {
ID int `json:"id"`
Status string `json:"status"`
Ref string `json:"ref"`
SHA string `json:"sha"`
WebURL string `json:"web_url"`
CreatedAt string `json:"created_at"`
}
GitLabPipeline represents a GitLab CI pipeline.
type GitLabWebhookModule ¶ added in v0.2.13
type GitLabWebhookModule struct {
// contains filtered or unexported fields
}
GitLabWebhookModule registers an HTTP route that receives GitLab webhook events, validates the X-Gitlab-Token secret, normalizes the event, and makes the resulting GitEvent available in the pipeline context.
Config:
- name: gitlab-hooks type: gitlab.webhook config: secret: "${GITLAB_WEBHOOK_SECRET}" path: /webhooks/gitlab # optional, default: /webhooks/gitlab events: [push, merge_request, tag_push, pipeline]
func NewGitLabWebhookModule ¶ added in v0.2.13
func NewGitLabWebhookModule(name string, cfg map[string]any) *GitLabWebhookModule
NewGitLabWebhookModule creates a new gitlab.webhook module.
func (*GitLabWebhookModule) Init ¶ added in v0.2.13
func (m *GitLabWebhookModule) Init(app modular.Application) error
Init configures the module and registers it as a service.
func (*GitLabWebhookModule) Name ¶ added in v0.2.13
func (m *GitLabWebhookModule) Name() string
Name returns the module name.
func (*GitLabWebhookModule) ParseEvent ¶ added in v0.2.13
func (m *GitLabWebhookModule) ParseEvent(eventType string, body []byte) (*GitEvent, error)
ParseEvent normalizes a GitLab webhook payload into a GitEvent. This is exported for testing.
func (*GitLabWebhookModule) ProvidesServices ¶ added in v0.2.13
func (m *GitLabWebhookModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service provided by this module.
func (*GitLabWebhookModule) RegisterRoutes ¶ added in v0.2.13
func (m *GitLabWebhookModule) RegisterRoutes(router HTTPRouter)
RegisterRoutes registers the webhook HTTP route with the router. This is called by the engine bridge after Init.
type GitLabWebhookParseStep ¶ added in v0.2.13
type GitLabWebhookParseStep struct {
// contains filtered or unexported fields
}
GitLabWebhookParseStep is a pipeline step that parses a GitLab webhook from the HTTP request in the pipeline context.
- name: parse-webhook type: step.gitlab_parse_webhook config: secret: "${GITLAB_WEBHOOK_SECRET}" # optional; skips validation if empty
func (*GitLabWebhookParseStep) Execute ¶ added in v0.2.13
func (s *GitLabWebhookParseStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute reads the HTTP request from pipeline context and parses the GitLab webhook.
func (*GitLabWebhookParseStep) Name ¶ added in v0.2.13
func (s *GitLabWebhookParseStep) Name() string
Name returns the step name.
type GitPushStep ¶ added in v0.2.9
type GitPushStep struct {
// contains filtered or unexported fields
}
GitPushStep pushes commits to a remote repository.
func (*GitPushStep) Execute ¶ added in v0.2.9
func (s *GitPushStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute pushes commits to the configured remote.
func (*GitPushStep) Name ¶ added in v0.2.9
func (s *GitPushStep) Name() string
Name returns the step name.
type GitTagStep ¶ added in v0.2.9
type GitTagStep struct {
// contains filtered or unexported fields
}
GitTagStep creates and optionally pushes a git tag.
func (*GitTagStep) Execute ¶ added in v0.2.9
func (s *GitTagStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute creates the tag and optionally pushes it.
func (*GitTagStep) Name ¶ added in v0.2.9
func (s *GitTagStep) Name() string
Name returns the step name.
type HTTPCallStep ¶
type HTTPCallStep struct {
// contains filtered or unexported fields
}
HTTPCallStep makes an HTTP request as a pipeline step.
func (*HTTPCallStep) Execute ¶
func (s *HTTPCallStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute performs the HTTP request and returns the response.
type HTTPHandler ¶
type HTTPHandler interface {
Handle(w http.ResponseWriter, r *http.Request)
}
HTTPHandler defines the interface for HTTP request handlers
type HTTPHandlerAdapter ¶
type HTTPHandlerAdapter struct {
// contains filtered or unexported fields
}
HTTPHandlerAdapter adapts an http.Handler to the HTTPHandler interface
func NewHTTPHandlerAdapter ¶
func NewHTTPHandlerAdapter(handler http.Handler) *HTTPHandlerAdapter
NewHTTPHandlerAdapter creates a new adapter for an http.Handler
func (*HTTPHandlerAdapter) Handle ¶
func (a *HTTPHandlerAdapter) Handle(w http.ResponseWriter, r *http.Request)
Handle implements the HTTPHandler interface
type HTTPIntegrationConnector ¶
type HTTPIntegrationConnector struct {
// contains filtered or unexported fields
}
HTTPIntegrationConnector implements a connector using HTTP requests
func NewHTTPIntegrationConnector ¶
func NewHTTPIntegrationConnector(name, baseURL string) *HTTPIntegrationConnector
NewHTTPIntegrationConnector creates a new HTTP-based integration connector
func (*HTTPIntegrationConnector) AllowPrivateIPs ¶ added in v0.1.6
func (c *HTTPIntegrationConnector) AllowPrivateIPs()
AllowPrivateIPs enables requests to private/internal IP addresses. This should only be used for testing or trusted internal services.
func (*HTTPIntegrationConnector) Connect ¶
func (c *HTTPIntegrationConnector) Connect(ctx context.Context) error
Connect establishes a connection to the external service
func (*HTTPIntegrationConnector) DisallowPrivateIPs ¶ added in v0.1.6
func (c *HTTPIntegrationConnector) DisallowPrivateIPs()
DisallowPrivateIPs disables requests to private/internal IP addresses, restoring SSRF protection (this is the default).
func (*HTTPIntegrationConnector) Disconnect ¶
func (c *HTTPIntegrationConnector) Disconnect(ctx context.Context) error
Disconnect closes the connection to the external service
func (*HTTPIntegrationConnector) Execute ¶
func (c *HTTPIntegrationConnector) Execute(ctx context.Context, action string, params map[string]any) (map[string]any, error)
Execute performs an action on the external service
func (*HTTPIntegrationConnector) GetName ¶
func (c *HTTPIntegrationConnector) GetName() string
GetName returns the connector name
func (*HTTPIntegrationConnector) IsConnected ¶
func (c *HTTPIntegrationConnector) IsConnected() bool
IsConnected checks if the connector is connected
func (*HTTPIntegrationConnector) SetBasicAuth ¶
func (c *HTTPIntegrationConnector) SetBasicAuth(username, password string)
SetBasicAuth sets basic authentication for the connector
func (*HTTPIntegrationConnector) SetBearerAuth ¶
func (c *HTTPIntegrationConnector) SetBearerAuth(token string)
SetBearerAuth sets bearer token authentication for the connector
func (*HTTPIntegrationConnector) SetDefaultHeader ¶
func (c *HTTPIntegrationConnector) SetDefaultHeader(key, value string)
SetDefaultHeader is an alias for SetHeader for backward compatibility
func (*HTTPIntegrationConnector) SetHeader ¶
func (c *HTTPIntegrationConnector) SetHeader(key, value string)
SetHeader sets a custom header for requests
func (*HTTPIntegrationConnector) SetRateLimit ¶
func (c *HTTPIntegrationConnector) SetRateLimit(requestsPerMinute int)
SetRateLimit sets a rate limit for requests
func (*HTTPIntegrationConnector) SetTimeout ¶
func (c *HTTPIntegrationConnector) SetTimeout(timeout time.Duration)
SetTimeout sets the request timeout
type HTTPMiddleware ¶
HTTPMiddleware defines a middleware that can process HTTP requests
type HTTPRouter ¶
type HTTPRouter interface {
AddRoute(method, path string, handler HTTPHandler)
}
HTTPRouter interface for routing HTTP requests
type HTTPServer ¶
type HTTPServer interface {
AddRouter(router HTTPRouter)
Start(ctx context.Context) error
Stop(ctx context.Context) error
}
HTTPServer interface for HTTP server modules
type HTTPTracePropagator ¶ added in v0.2.15
type HTTPTracePropagator struct {
// contains filtered or unexported fields
}
HTTPTracePropagator propagates trace context via W3C TraceContext HTTP headers.
func NewHTTPTracePropagator ¶ added in v0.2.15
func NewHTTPTracePropagator() *HTTPTracePropagator
NewHTTPTracePropagator creates an HTTP trace propagator using the global OTEL propagator.
func (*HTTPTracePropagator) Extract ¶ added in v0.2.15
func (p *HTTPTracePropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
func (*HTTPTracePropagator) ExtractHeaders ¶ added in v0.2.15
func (p *HTTPTracePropagator) ExtractHeaders(ctx context.Context, headers http.Header) context.Context
ExtractHeaders extracts trace context from an http.Header.
func (*HTTPTracePropagator) Inject ¶ added in v0.2.15
func (p *HTTPTracePropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) error
func (*HTTPTracePropagator) InjectHeaders ¶ added in v0.2.15
InjectHeaders injects trace context into an http.Header.
type HTTPTrigger ¶
type HTTPTrigger struct {
// contains filtered or unexported fields
}
HTTPTrigger implements a trigger that starts workflows from HTTP requests
func NewHTTPTriggerWithNamespace ¶
func NewHTTPTriggerWithNamespace(namespace ModuleNamespaceProvider) *HTTPTrigger
NewHTTPTriggerWithNamespace creates a new HTTP trigger with namespace support
func (*HTTPTrigger) Configure ¶
func (t *HTTPTrigger) Configure(app modular.Application, triggerConfig any) error
Configure sets up the trigger from configuration
func (*HTTPTrigger) Init ¶
func (t *HTTPTrigger) Init(app modular.Application) error
Init initializes the trigger
func (*HTTPTrigger) Name ¶
func (t *HTTPTrigger) Name() string
Name returns the name of this trigger
type HTTPTriggerConfig ¶
type HTTPTriggerConfig struct {
Routes []HTTPTriggerRoute `json:"routes" yaml:"routes"`
}
HTTPTriggerConfig represents the configuration for an HTTP trigger
type HTTPTriggerRoute ¶
type HTTPTriggerRoute struct {
Path string `json:"path" yaml:"path"`
Method string `json:"method" yaml:"method"`
Workflow string `json:"workflow" yaml:"workflow"`
Action string `json:"action" yaml:"action"`
Params map[string]any `json:"params,omitempty" yaml:"params,omitempty"`
}
HTTPTriggerRoute represents a single HTTP route configuration
type HealthCheck ¶
type HealthCheck func(ctx context.Context) HealthCheckResult
HealthCheck is a function that performs a health check.
type HealthCheckConfig ¶ added in v0.2.15
type HealthCheckConfig struct {
Interval int `json:"interval"` // seconds between checks
Timeout int `json:"timeout"` // seconds before timeout
Path string `json:"path"` // HTTP path for health check
Threshold int `json:"threshold"` // failures before marking degraded
}
HealthCheckConfig describes health check settings for a region.
type HealthCheckResult ¶
type HealthCheckResult struct {
Status string `json:"status"`
Message string `json:"message,omitempty"`
}
HealthCheckResult represents the result of a health check.
type HealthCheckSpec ¶ added in v0.2.14
type HealthCheckSpec struct {
Path string `json:"path"`
Port int `json:"port"`
Interval int `json:"interval"` // seconds
}
HealthCheckSpec defines the HTTP health check for a container.
type HealthCheckable ¶
type HealthCheckable interface {
HealthStatus() HealthCheckResult
}
HealthCheckable is implemented by modules that can report their own health. The health checker auto-discovers services implementing this interface.
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
HealthChecker provides /health, /ready, /live HTTP endpoints.
func NewHealthChecker ¶
func NewHealthChecker(name string) *HealthChecker
NewHealthChecker creates a new HealthChecker module.
func (*HealthChecker) AutoDiscover ¶
func (h *HealthChecker) AutoDiscover() bool
AutoDiscover returns whether auto-discovery of HealthCheckable services is enabled.
func (*HealthChecker) DiscoverHealthCheckables ¶
func (h *HealthChecker) DiscoverHealthCheckables()
DiscoverHealthCheckables scans the service registry for services implementing HealthCheckable and auto-registers them as health checks.
func (*HealthChecker) HealthHandler ¶
func (h *HealthChecker) HealthHandler() http.HandlerFunc
HealthHandler returns an HTTP handler that runs all health checks.
func (*HealthChecker) HealthPath ¶
func (h *HealthChecker) HealthPath() string
HealthPath returns the configured health endpoint path.
func (*HealthChecker) Init ¶
func (h *HealthChecker) Init(app modular.Application) error
Init registers the health checker as a service.
func (*HealthChecker) LiveHandler ¶
func (h *HealthChecker) LiveHandler() http.HandlerFunc
LiveHandler returns an HTTP handler for liveness checks. Always returns 200 with {"status":"alive"}.
func (*HealthChecker) LivePath ¶
func (h *HealthChecker) LivePath() string
LivePath returns the configured liveness endpoint path.
func (*HealthChecker) ProvidesServices ¶
func (h *HealthChecker) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*HealthChecker) ReadyHandler ¶
func (h *HealthChecker) ReadyHandler() http.HandlerFunc
ReadyHandler returns an HTTP handler that checks readiness. Returns 200 only if started AND all checks pass, else 503.
func (*HealthChecker) ReadyPath ¶
func (h *HealthChecker) ReadyPath() string
ReadyPath returns the configured readiness endpoint path.
func (*HealthChecker) RegisterCheck ¶
func (h *HealthChecker) RegisterCheck(name string, check HealthCheck)
RegisterCheck adds a named health check function.
func (*HealthChecker) RequiresServices ¶
func (h *HealthChecker) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module.
func (*HealthChecker) SetConfig ¶
func (h *HealthChecker) SetConfig(cfg HealthCheckerConfig)
SetConfig applies configuration to the health checker.
func (*HealthChecker) SetStarted ¶
func (h *HealthChecker) SetStarted(started bool)
SetStarted marks the health checker as started or stopped.
type HealthCheckerConfig ¶
type HealthCheckerConfig struct {
HealthPath string `yaml:"healthPath" json:"healthPath"`
ReadyPath string `yaml:"readyPath" json:"readyPath"`
LivePath string `yaml:"livePath" json:"livePath"`
CheckTimeout time.Duration `yaml:"checkTimeout" json:"checkTimeout"`
AutoDiscover bool `yaml:"autoDiscover" json:"autoDiscover"`
}
HealthCheckerConfig holds configuration for the HealthChecker module.
func DefaultHealthCheckerConfig ¶
func DefaultHealthCheckerConfig() HealthCheckerConfig
DefaultHealthCheckerConfig returns the default configuration.
type HealthHTTPHandler ¶
type HealthHTTPHandler struct {
Handler http.HandlerFunc
}
HealthHTTPHandler adapts an http.HandlerFunc to the HTTPHandler interface
func (*HealthHTTPHandler) Handle ¶
func (h *HealthHTTPHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle implements the HTTPHandler interface
type IaCApplyStep ¶ added in v0.2.13
type IaCApplyStep struct {
// contains filtered or unexported fields
}
IaCApplyStep calls Apply() on a PlatformProvider and updates state to "active".
func (*IaCApplyStep) Execute ¶ added in v0.2.13
func (s *IaCApplyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*IaCApplyStep) Name ¶ added in v0.2.13
func (s *IaCApplyStep) Name() string
type IaCDestroyStep ¶ added in v0.2.13
type IaCDestroyStep struct {
// contains filtered or unexported fields
}
IaCDestroyStep calls Destroy() and marks state as "destroyed".
func (*IaCDestroyStep) Execute ¶ added in v0.2.13
func (s *IaCDestroyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*IaCDestroyStep) Name ¶ added in v0.2.13
func (s *IaCDestroyStep) Name() string
type IaCDriftDetectStep ¶ added in v0.2.13
type IaCDriftDetectStep struct {
// contains filtered or unexported fields
}
IaCDriftDetectStep compares the stored config snapshot against the current platform provider config and reports whether drift has occurred.
func (*IaCDriftDetectStep) Execute ¶ added in v0.2.13
func (s *IaCDriftDetectStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*IaCDriftDetectStep) Name ¶ added in v0.2.13
func (s *IaCDriftDetectStep) Name() string
type IaCDriftDiff ¶ added in v0.2.13
type IaCDriftDiff struct {
Key string `json:"key"`
Stored any `json:"stored"`
Current any `json:"current"`
DiffType string `json:"diff_type"` // added, removed, changed
}
IaCDriftDiff describes a single configuration difference.
type IaCModule ¶ added in v0.2.13
type IaCModule struct {
// contains filtered or unexported fields
}
IaCModule registers an IaCStateStore in the service registry. Supported backends: "memory" (default) and "filesystem".
Config example:
modules:
- name: iac-state
type: iac.state
config:
backend: filesystem
directory: /var/lib/workflow/iac-state
func NewIaCModule ¶ added in v0.2.13
NewIaCModule creates a new IaC state module.
func (*IaCModule) Init ¶ added in v0.2.13
func (m *IaCModule) Init(app modular.Application) error
Init constructs the state store backend and registers it as a service.
func (*IaCModule) ProvidesServices ¶ added in v0.2.13
func (m *IaCModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the IaCStateStore service.
func (*IaCModule) RequiresServices ¶ added in v0.2.13
func (m *IaCModule) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — iac.state has no service dependencies.
type IaCPlanStep ¶ added in v0.2.13
type IaCPlanStep struct {
// contains filtered or unexported fields
}
IaCPlanStep resolves a PlatformProvider, calls Plan(), and saves a "planned" state.
func (*IaCPlanStep) Execute ¶ added in v0.2.13
func (s *IaCPlanStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*IaCPlanStep) Name ¶ added in v0.2.13
func (s *IaCPlanStep) Name() string
type IaCState ¶ added in v0.2.13
type IaCState struct {
ResourceID string `json:"resource_id"`
ResourceType string `json:"resource_type"` // e.g. "kubernetes", "ecs"
Provider string `json:"provider"` // e.g. "aws", "gcp", "local"
Status string `json:"status"` // planned, provisioning, active, destroying, destroyed, error
Outputs map[string]any `json:"outputs"` // provider-specific outputs
Config map[string]any `json:"config"` // the config used to provision
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Error string `json:"error,omitempty"`
}
IaCState tracks the state of an infrastructure resource.
type IaCStateStore ¶ added in v0.2.13
type IaCStateStore interface {
// GetState retrieves a state record by resource ID. Returns nil, nil when not found.
GetState(resourceID string) (*IaCState, error)
// SaveState inserts or replaces a state record.
SaveState(state *IaCState) error
// ListStates returns all state records matching the provided key=value filter.
// Pass an empty map to return all records.
ListStates(filter map[string]string) ([]*IaCState, error)
// DeleteState removes a state record by resource ID.
DeleteState(resourceID string) error
// Lock acquires an exclusive lock for the given resource ID.
// Returns an error if the resource is already locked.
Lock(resourceID string) error
// Unlock releases the lock for the given resource ID.
Unlock(resourceID string) error
}
IaCStateStore is the interface for IaC state persistence backends.
type IaCStatusStep ¶ added in v0.2.13
type IaCStatusStep struct {
// contains filtered or unexported fields
}
IaCStatusStep reads stored state and calls Status() on the PlatformProvider.
func (*IaCStatusStep) Execute ¶ added in v0.2.13
func (s *IaCStatusStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*IaCStatusStep) Name ¶ added in v0.2.13
func (s *IaCStatusStep) Name() string
type InMemoryMessageBroker ¶
type InMemoryMessageBroker struct {
// contains filtered or unexported fields
}
InMemoryMessageBroker provides a simple in-memory implementation of MessageBroker
func NewInMemoryMessageBroker ¶
func NewInMemoryMessageBroker(name string) *InMemoryMessageBroker
NewInMemoryMessageBroker creates a new in-memory message broker
func NewInMemoryMessageBrokerWithNamespace ¶
func NewInMemoryMessageBrokerWithNamespace(name string, namespace ModuleNamespaceProvider) *InMemoryMessageBroker
NewInMemoryMessageBrokerWithNamespace creates a new in-memory message broker with namespace support
func NewStandardInMemoryMessageBroker ¶
func NewStandardInMemoryMessageBroker(namespace ModuleNamespaceProvider) *InMemoryMessageBroker
NewStandardInMemoryMessageBroker creates an in-memory message broker with the standard name
func (*InMemoryMessageBroker) Consumer ¶
func (b *InMemoryMessageBroker) Consumer() MessageConsumer
Consumer returns the message consumer interface
func (*InMemoryMessageBroker) DeliveryTimeout ¶
func (b *InMemoryMessageBroker) DeliveryTimeout() time.Duration
DeliveryTimeout returns the configured delivery timeout.
func (*InMemoryMessageBroker) Init ¶
func (b *InMemoryMessageBroker) Init(app modular.Application) error
Init initializes the module with the application context
func (*InMemoryMessageBroker) MaxQueueSize ¶
func (b *InMemoryMessageBroker) MaxQueueSize() int
MaxQueueSize returns the configured maximum queue size per topic.
func (*InMemoryMessageBroker) Name ¶
func (b *InMemoryMessageBroker) Name() string
Name returns the unique identifier for this module
func (*InMemoryMessageBroker) Producer ¶
func (b *InMemoryMessageBroker) Producer() MessageProducer
Producer returns the message producer interface
func (*InMemoryMessageBroker) ProvidesServices ¶
func (b *InMemoryMessageBroker) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns a list of services provided by this module
func (*InMemoryMessageBroker) RequiresServices ¶
func (b *InMemoryMessageBroker) RequiresServices() []modular.ServiceDependency
RequiresServices returns a list of services required by this module
func (*InMemoryMessageBroker) SendMessage ¶
func (b *InMemoryMessageBroker) SendMessage(topic string, message []byte) error
SendMessage is a convenience method to send a message to a topic
func (*InMemoryMessageBroker) SetDeliveryTimeout ¶
func (b *InMemoryMessageBroker) SetDeliveryTimeout(d time.Duration)
SetDeliveryTimeout sets the message delivery timeout.
func (*InMemoryMessageBroker) SetMaxQueueSize ¶
func (b *InMemoryMessageBroker) SetMaxQueueSize(n int)
SetMaxQueueSize sets the maximum message queue size per topic.
func (*InMemoryMessageBroker) Start ¶
func (b *InMemoryMessageBroker) Start(ctx context.Context) error
Start starts the message broker
func (*InMemoryMessageBroker) Stop ¶
func (b *InMemoryMessageBroker) Stop(ctx context.Context) error
Stop stops the message broker
func (*InMemoryMessageBroker) Subscribe ¶
func (b *InMemoryMessageBroker) Subscribe(topic string, handler MessageHandler) error
Subscribe is a convenience method to subscribe a handler to a topic
type IntegrationConnector ¶
type IntegrationConnector interface {
// Connect establishes a connection to the external service
Connect(ctx context.Context) error
// Disconnect closes the connection to the external service
Disconnect(ctx context.Context) error
// Execute performs an action on the external service
Execute(ctx context.Context, action string, params map[string]any) (map[string]any, error)
// GetName returns the name of the connector
GetName() string
// IsConnected checks if the connector is connected
IsConnected() bool
}
IntegrationConnector represents a connector to a third-party service
type IntegrationRegistry ¶
type IntegrationRegistry interface {
// Name returns the name of the registry
Name() string
// Init initializes the registry
Init(app modular.Application) error
// Start starts the registry
Start() error
// Stop stops the registry
Stop() error
// RegisterConnector registers a new integration connector
RegisterConnector(connector IntegrationConnector)
// GetConnector retrieves a connector by name
GetConnector(name string) (IntegrationConnector, error)
// ListConnectors lists all registered connectors
ListConnectors() []string
}
type JQStep ¶
type JQStep struct {
// contains filtered or unexported fields
}
JQStep applies JQ expressions to pipeline data for complex transformations. It uses the gojq library (a pure-Go JQ implementation) to support the full JQ expression language including field access, pipes, map/select, object construction, arithmetic, conditionals, and more.
func (*JQStep) Execute ¶
func (s *JQStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute applies the compiled JQ expression to the pipeline context's current data and returns the result. If input_from is configured, the expression is applied to the value at that path instead of the full current map.
type JSONResponseStep ¶
type JSONResponseStep struct {
// contains filtered or unexported fields
}
JSONResponseStep writes an HTTP JSON response with a custom status code and stops the pipeline.
func (*JSONResponseStep) Execute ¶
func (s *JSONResponseStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
func (*JSONResponseStep) Name ¶
func (s *JSONResponseStep) Name() string
type JWTAuthModule ¶
type JWTAuthModule struct {
// contains filtered or unexported fields
}
JWTAuthModule handles JWT authentication with an in-memory user store. When an auth.user-store service is available, it delegates user CRUD to it; otherwise it uses its own internal map for backward compatibility.
func NewJWTAuthModule ¶
func NewJWTAuthModule(name, secret string, tokenExpiry time.Duration, issuer string) *JWTAuthModule
NewJWTAuthModule creates a new JWT auth module
func (*JWTAuthModule) Authenticate ¶
Authenticate implements AuthProvider
func (*JWTAuthModule) CreateOAuthUser ¶ added in v0.1.5
CreateOAuthUser creates (or returns an existing) user identified by the given oauthKey (e.g. "oauth:google:12345"). The oauthKey is used as the user's email so it can be looked up without any email-based account merging. If a user already exists for that key, the existing user is returned.
func (*JWTAuthModule) Handle ¶
func (j *JWTAuthModule) Handle(w http.ResponseWriter, r *http.Request)
Handle routes auth requests
func (*JWTAuthModule) Init ¶
func (j *JWTAuthModule) Init(app modular.Application) error
Init initializes the module
func (*JWTAuthModule) ProvidesServices ¶
func (j *JWTAuthModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module
func (*JWTAuthModule) RequiresServices ¶
func (j *JWTAuthModule) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module
func (*JWTAuthModule) SetAllowRegistration ¶ added in v0.2.11
func (j *JWTAuthModule) SetAllowRegistration(allow bool)
SetAllowRegistration enables or disables open self-registration. When true, any visitor may register; when false (default), registration is only permitted when no users exist (initial setup mode).
func (*JWTAuthModule) SetResponseFormat ¶
func (j *JWTAuthModule) SetResponseFormat(format string)
SetResponseFormat sets the response format for auth endpoints. "v1" returns {access_token, refresh_token, expires_in, user} and adds /auth/refresh, /auth/me, /auth/logout handlers. "standard" (default) returns {token, user}.
func (*JWTAuthModule) SetSeedFile ¶
func (j *JWTAuthModule) SetSeedFile(path string)
SetSeedFile sets the path to a JSON file of seed users to load on start.
type K8sApplyStep ¶ added in v0.2.13
type K8sApplyStep struct {
// contains filtered or unexported fields
}
K8sApplyStep calls Apply() on a named platform.kubernetes module.
func (*K8sApplyStep) Execute ¶ added in v0.2.13
func (s *K8sApplyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*K8sApplyStep) Name ¶ added in v0.2.13
func (s *K8sApplyStep) Name() string
type K8sContainerPort ¶ added in v0.2.14
type K8sContainerPort struct {
ContainerPort int `json:"containerPort"`
}
K8sContainerPort is a port exposed by a container.
type K8sContainerSpec ¶ added in v0.2.14
type K8sContainerSpec struct {
Name string `json:"name"`
Image string `json:"image"`
Ports []K8sContainerPort `json:"ports,omitempty"`
Env []K8sEnvVar `json:"env,omitempty"`
Resources K8sResourceReq `json:"resources"`
ReadinessProbe *K8sProbe `json:"readinessProbe,omitempty"`
}
K8sContainerSpec is the spec for a container within a pod.
type K8sDeploymentManifest ¶ added in v0.2.14
type K8sDeploymentManifest struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata K8sObjectMeta `json:"metadata"`
Spec K8sDeploymentSpec `json:"spec"`
}
K8sDeploymentManifest represents a Kubernetes Deployment resource.
type K8sDeploymentSpec ¶ added in v0.2.14
type K8sDeploymentSpec struct {
Replicas int `json:"replicas"`
Selector K8sSelector `json:"selector"`
Template K8sPodTemplate `json:"template"`
}
K8sDeploymentSpec is the spec for a Kubernetes Deployment.
type K8sDestroyStep ¶ added in v0.2.13
type K8sDestroyStep struct {
// contains filtered or unexported fields
}
K8sDestroyStep calls Destroy() on a named platform.kubernetes module.
func (*K8sDestroyStep) Execute ¶ added in v0.2.13
func (s *K8sDestroyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*K8sDestroyStep) Name ¶ added in v0.2.13
func (s *K8sDestroyStep) Name() string
type K8sHTTPGetAction ¶ added in v0.2.14
K8sHTTPGetAction defines an HTTP GET health check.
type K8sIngressBackend ¶ added in v0.2.14
type K8sIngressBackend struct {
Service K8sIngressSvcBackend `json:"service"`
}
K8sIngressBackend defines the backend for an ingress path.
type K8sIngressHTTP ¶ added in v0.2.14
type K8sIngressHTTP struct {
Paths []K8sIngressPath `json:"paths"`
}
K8sIngressHTTP defines the HTTP routes in an ingress rule.
type K8sIngressManifest ¶ added in v0.2.14
type K8sIngressManifest struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata K8sObjectMeta `json:"metadata"`
Spec K8sIngressSpec `json:"spec"`
}
K8sIngressManifest represents a Kubernetes Ingress resource.
type K8sIngressPath ¶ added in v0.2.14
type K8sIngressPath struct {
Path string `json:"path"`
PathType string `json:"pathType"`
Backend K8sIngressBackend `json:"backend"`
}
K8sIngressPath defines an HTTP path in an ingress rule.
type K8sIngressRule ¶ added in v0.2.14
type K8sIngressRule struct {
Host string `json:"host,omitempty"`
HTTP K8sIngressHTTP `json:"http"`
}
K8sIngressRule defines an ingress routing rule.
type K8sIngressSpec ¶ added in v0.2.14
type K8sIngressSpec struct {
Rules []K8sIngressRule `json:"rules"`
}
K8sIngressSpec defines a Kubernetes Ingress.
type K8sIngressSvcBackend ¶ added in v0.2.14
type K8sIngressSvcBackend struct {
Name string `json:"name"`
Port K8sServicePortRef `json:"port"`
}
K8sIngressSvcBackend defines the service backend for an ingress.
type K8sManifests ¶ added in v0.2.14
type K8sManifests struct {
Deployment *K8sDeploymentManifest `json:"deployment"`
Service *K8sServiceManifest `json:"service"`
Ingress *K8sIngressManifest `json:"ingress,omitempty"`
}
K8sManifests holds the generated Kubernetes manifests for an app container.
type K8sObjectMeta ¶ added in v0.2.14
type K8sObjectMeta struct {
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
K8sObjectMeta holds Kubernetes resource metadata.
type K8sPlanStep ¶ added in v0.2.13
type K8sPlanStep struct {
// contains filtered or unexported fields
}
K8sPlanStep calls Plan() on a named platform.kubernetes module.
func (*K8sPlanStep) Execute ¶ added in v0.2.13
func (s *K8sPlanStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*K8sPlanStep) Name ¶ added in v0.2.13
func (s *K8sPlanStep) Name() string
type K8sPodSpec ¶ added in v0.2.14
type K8sPodSpec struct {
Containers []K8sContainerSpec `json:"containers"`
}
K8sPodSpec is the spec for a pod.
type K8sPodTemplate ¶ added in v0.2.14
type K8sPodTemplate struct {
Metadata K8sObjectMeta `json:"metadata"`
Spec K8sPodSpec `json:"spec"`
}
K8sPodTemplate is the pod template in a Deployment spec.
type K8sProbe ¶ added in v0.2.14
type K8sProbe struct {
HTTPGet K8sHTTPGetAction `json:"httpGet"`
InitialDelaySeconds int `json:"initialDelaySeconds,omitempty"`
PeriodSeconds int `json:"periodSeconds,omitempty"`
}
K8sProbe defines a health check probe.
type K8sResourceReq ¶ added in v0.2.14
type K8sResourceReq struct {
Limits map[string]string `json:"limits,omitempty"`
Requests map[string]string `json:"requests,omitempty"`
}
K8sResourceReq holds resource requests and limits.
type K8sSelector ¶ added in v0.2.14
K8sSelector selects pods by label.
type K8sServiceManifest ¶ added in v0.2.14
type K8sServiceManifest struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata K8sObjectMeta `json:"metadata"`
Spec K8sServiceSpec `json:"spec"`
}
K8sServiceManifest represents a Kubernetes Service resource.
type K8sServicePort ¶ added in v0.2.14
type K8sServicePort struct {
Port int `json:"port"`
TargetPort int `json:"targetPort"`
Protocol string `json:"protocol,omitempty"`
}
K8sServicePort defines a port exposed by a Service.
type K8sServicePortRef ¶ added in v0.2.14
type K8sServicePortRef struct {
Number int `json:"number"`
}
K8sServicePortRef defines a port reference in an ingress service backend.
type K8sServiceSpec ¶ added in v0.2.14
type K8sServiceSpec struct {
Selector map[string]string `json:"selector"`
Ports []K8sServicePort `json:"ports"`
Type string `json:"type,omitempty"`
}
K8sServiceSpec defines a Kubernetes Service.
type K8sStatusStep ¶ added in v0.2.13
type K8sStatusStep struct {
// contains filtered or unexported fields
}
K8sStatusStep calls Status() on a named platform.kubernetes module.
func (*K8sStatusStep) Execute ¶ added in v0.2.13
func (s *K8sStatusStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*K8sStatusStep) Name ¶ added in v0.2.13
func (s *K8sStatusStep) Name() string
type KafkaBroker ¶
type KafkaBroker struct {
// contains filtered or unexported fields
}
KafkaBroker implements the MessageBroker interface using Apache Kafka via Sarama.
func NewKafkaBroker ¶
func NewKafkaBroker(name string) *KafkaBroker
NewKafkaBroker creates a new Kafka message broker.
func (*KafkaBroker) Consumer ¶
func (b *KafkaBroker) Consumer() MessageConsumer
Consumer returns the message consumer interface.
func (*KafkaBroker) HealthStatus ¶
func (b *KafkaBroker) HealthStatus() HealthCheckResult
HealthStatus implements the HealthCheckable interface.
func (*KafkaBroker) Init ¶
func (b *KafkaBroker) Init(app modular.Application) error
Init initializes the module with the application context.
func (*KafkaBroker) Producer ¶
func (b *KafkaBroker) Producer() MessageProducer
Producer returns the message producer interface.
func (*KafkaBroker) ProvidesServices ¶
func (b *KafkaBroker) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*KafkaBroker) RequiresServices ¶
func (b *KafkaBroker) RequiresServices() []modular.ServiceDependency
RequiresServices returns the services required by this module.
func (*KafkaBroker) SetBrokers ¶
func (b *KafkaBroker) SetBrokers(brokers []string)
SetBrokers sets the Kafka broker addresses.
func (*KafkaBroker) SetGroupID ¶
func (b *KafkaBroker) SetGroupID(groupID string)
SetGroupID sets the Kafka consumer group ID.
func (*KafkaBroker) Start ¶
func (b *KafkaBroker) Start(ctx context.Context) error
Start connects to Kafka and begins consuming.
func (*KafkaBroker) Stop ¶
func (b *KafkaBroker) Stop(_ context.Context) error
Stop disconnects from Kafka.
func (*KafkaBroker) Subscribe ¶
func (b *KafkaBroker) Subscribe(topic string, handler MessageHandler) error
Subscribe is a convenience method to subscribe a handler to a topic.
type KafkaTracePropagator ¶ added in v0.2.15
type KafkaTracePropagator struct {
// contains filtered or unexported fields
}
KafkaTracePropagator propagates trace context via Kafka message headers (map[string]string).
func NewKafkaTracePropagator ¶ added in v0.2.15
func NewKafkaTracePropagator() *KafkaTracePropagator
NewKafkaTracePropagator creates a Kafka trace propagator using the global OTEL propagator.
func (*KafkaTracePropagator) Extract ¶ added in v0.2.15
func (p *KafkaTracePropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
func (*KafkaTracePropagator) ExtractMap ¶ added in v0.2.15
func (p *KafkaTracePropagator) ExtractMap(ctx context.Context, headers map[string]string) context.Context
ExtractMap extracts trace context from a map[string]string (Kafka headers).
func (*KafkaTracePropagator) Inject ¶ added in v0.2.15
func (p *KafkaTracePropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) error
type KubernetesClusterState ¶ added in v0.2.13
type KubernetesClusterState struct {
Name string `json:"name"`
Provider string `json:"provider"` // eks, gke, aks, kind, k3s
Version string `json:"version"`
Status string `json:"status"` // pending, creating, running, deleting, deleted
Endpoint string `json:"endpoint"`
NodeGroups []NodeGroupState `json:"nodeGroups"`
CreatedAt time.Time `json:"createdAt"`
}
KubernetesClusterState holds the current state of a managed Kubernetes cluster.
type LicenseModule ¶ added in v0.1.5
type LicenseModule struct {
// contains filtered or unexported fields
}
LicenseModule wraps a licensing.HTTPValidator as a modular.Module. It starts a background refresh on Start and exposes a status API endpoint.
func NewLicenseModule ¶ added in v0.1.5
func NewLicenseModule(name string, cfg map[string]any) (*LicenseModule, error)
NewLicenseModule creates a new LicenseModule from a name and config map.
func (*LicenseModule) Init ¶ added in v0.1.5
func (m *LicenseModule) Init(_ modular.Application) error
Init implements modular.Module.
func (*LicenseModule) Name ¶ added in v0.1.5
func (m *LicenseModule) Name() string
Name implements modular.Module.
func (*LicenseModule) ProvidesServices ¶ added in v0.1.5
func (m *LicenseModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices implements modular.Module. The validator is registered under both the module name and the canonical "license-validator" name so other modules can look it up by either.
func (*LicenseModule) RequiresServices ¶ added in v0.1.5
func (m *LicenseModule) RequiresServices() []modular.ServiceDependency
RequiresServices implements modular.Module.
func (*LicenseModule) ServeHTTP ¶ added in v0.1.5
func (m *LicenseModule) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP serves the GET /api/v1/license/status endpoint. It returns the current license info as JSON.
func (*LicenseModule) Start ¶ added in v0.1.5
func (m *LicenseModule) Start(ctx context.Context) error
Start implements StartStopModule. It performs an initial license validation and starts the background refresh goroutine.
func (*LicenseModule) Stop ¶ added in v0.1.5
func (m *LicenseModule) Stop(ctx context.Context) error
Stop implements StartStopModule. It stops the background refresh goroutine.
func (*LicenseModule) Validator ¶ added in v0.1.5
func (m *LicenseModule) Validator() *licensing.HTTPValidator
Validator returns the underlying HTTPValidator for direct use.
type LicenseModuleConfig ¶ added in v0.1.5
type LicenseModuleConfig struct {
ServerURL string `yaml:"server_url"`
LicenseKey string `yaml:"license_key"`
CacheTTL string `yaml:"cache_ttl" default:"1h"`
GracePeriod string `yaml:"grace_period" default:"72h"`
RefreshInterval string `yaml:"refresh_interval" default:"1h"`
}
LicenseModuleConfig holds the configuration for the license validator module.
type ListenerAdapter ¶
type ListenerAdapter struct {
// contains filtered or unexported fields
}
ListenerAdapter adapts a TransitionListener function to a TransitionHandler
func NewListenerAdapter ¶
func NewListenerAdapter(listener TransitionListener) *ListenerAdapter
NewListenerAdapter creates a new adapter for a transition listener
func (*ListenerAdapter) HandleTransition ¶
func (a *ListenerAdapter) HandleTransition(ctx context.Context, event TransitionEvent) error
HandleTransition implements the TransitionHandler interface
type LocalStorageModule ¶
type LocalStorageModule struct {
// contains filtered or unexported fields
}
LocalStorageModule wraps a store.LocalStorage as a modular.Module.
func NewLocalStorageModule ¶
func NewLocalStorageModule(name, rootDir string) *LocalStorageModule
NewLocalStorageModule creates a new local filesystem storage module.
func (*LocalStorageModule) Delete ¶
func (m *LocalStorageModule) Delete(ctx context.Context, path string) error
func (*LocalStorageModule) Get ¶
func (m *LocalStorageModule) Get(ctx context.Context, path string) (io.ReadCloser, error)
func (*LocalStorageModule) Init ¶
func (m *LocalStorageModule) Init(app modular.Application) error
func (*LocalStorageModule) Name ¶
func (m *LocalStorageModule) Name() string
func (*LocalStorageModule) ProvidesServices ¶
func (m *LocalStorageModule) ProvidesServices() []modular.ServiceProvider
func (*LocalStorageModule) RequiresServices ¶
func (m *LocalStorageModule) RequiresServices() []modular.ServiceDependency
func (*LocalStorageModule) Storage ¶
func (m *LocalStorageModule) Storage() store.StorageProvider
Storage returns the underlying StorageProvider, or nil if not started.
type LogCollector ¶
type LogCollector struct {
// contains filtered or unexported fields
}
LogCollector collects log entries from modules implementing LogEmitter and exposes them via a /logs HTTP endpoint.
func NewLogCollector ¶
func NewLogCollector(name string, cfg LogCollectorConfig) *LogCollector
NewLogCollector creates a new LogCollector module.
func (*LogCollector) AddEntry ¶
func (lc *LogCollector) AddEntry(entry LogEntry)
AddEntry adds a single log entry to the collector.
func (*LogCollector) CollectFromEmitters ¶
func (lc *LogCollector) CollectFromEmitters()
CollectFromEmitters scans the service registry for LogEmitter services and drains their log entries.
func (*LogCollector) Entries ¶
func (lc *LogCollector) Entries() []LogEntry
Entries returns a copy of the current log entries.
func (*LogCollector) Init ¶
func (lc *LogCollector) Init(app modular.Application) error
Init registers the log collector as a service.
func (*LogCollector) LogHandler ¶
func (lc *LogCollector) LogHandler() http.HandlerFunc
LogHandler returns an HTTP handler that serves collected logs.
func (*LogCollector) ProvidesServices ¶
func (lc *LogCollector) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*LogCollector) RequiresServices ¶
func (lc *LogCollector) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module.
func (*LogCollector) StartCollectionLoop ¶
func (lc *LogCollector) StartCollectionLoop(ctx context.Context, interval time.Duration) context.CancelFunc
StartCollectionLoop runs a background goroutine that periodically collects logs from emitters. Call the returned cancel function to stop.
type LogCollectorConfig ¶
type LogCollectorConfig struct {
LogLevel string `yaml:"logLevel" json:"logLevel"`
OutputFormat string `yaml:"outputFormat" json:"outputFormat"`
RetentionDays int `yaml:"retentionDays" json:"retentionDays"`
}
LogCollectorConfig holds the configuration for the log collector module.
type LogEmitter ¶
type LogEmitter interface {
DrainLogs() []LogEntry
}
LogEmitter is implemented by modules that produce log entries. The log collector auto-discovers services implementing this interface.
type LogEntry ¶
type LogEntry struct {
Timestamp time.Time `json:"timestamp"`
Module string `json:"module"`
Level string `json:"level"`
Message string `json:"message"`
}
LogEntry represents a single log message collected from a module.
type LogHTTPHandler ¶
type LogHTTPHandler struct {
Handler http.HandlerFunc
}
LogHTTPHandler adapts an http.HandlerFunc to the HTTPHandler interface.
func (*LogHTTPHandler) Handle ¶
func (h *LogHTTPHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle implements the HTTPHandler interface.
type LogStep ¶
type LogStep struct {
// contains filtered or unexported fields
}
LogStep logs a template-resolved message at a specified level.
func (*LogStep) Execute ¶
func (s *LogStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute resolves the message template and logs it at the configured level.
type LoggingMiddleware ¶
type LoggingMiddleware struct {
// contains filtered or unexported fields
}
LoggingMiddleware provides request logging
func NewLoggingMiddleware ¶
func NewLoggingMiddleware(name string, logLevel string) *LoggingMiddleware
NewLoggingMiddleware creates a new logging middleware
func (*LoggingMiddleware) Init ¶
func (m *LoggingMiddleware) Init(app modular.Application) error
Init initializes the middleware
func (*LoggingMiddleware) Name ¶
func (m *LoggingMiddleware) Name() string
Name returns the module name
func (*LoggingMiddleware) Process ¶
func (m *LoggingMiddleware) Process(next http.Handler) http.Handler
Process implements middleware processing
func (*LoggingMiddleware) ProvidesServices ¶
func (m *LoggingMiddleware) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this middleware
func (*LoggingMiddleware) RequiresServices ¶
func (m *LoggingMiddleware) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this middleware
type MROptions ¶ added in v0.2.13
type MROptions struct {
SourceBranch string
TargetBranch string
Title string
Description string
Labels []string
}
MROptions holds options for creating a merge request.
type MapCarrier ¶ added in v0.2.15
type MapCarrier struct {
// contains filtered or unexported fields
}
MapCarrier wraps a map[string]string as a TextMapCarrier for use with OTEL propagators.
func NewMapCarrier ¶ added in v0.2.15
func NewMapCarrier(m map[string]string) MapCarrier
NewMapCarrier creates a MapCarrier backed by the given map. If m is nil, an empty map is allocated.
func (MapCarrier) Get ¶ added in v0.2.15
func (c MapCarrier) Get(key string) string
func (MapCarrier) GetMap ¶ added in v0.2.15
func (c MapCarrier) GetMap() map[string]string
GetMap returns the underlying map.
func (MapCarrier) Keys ¶ added in v0.2.15
func (c MapCarrier) Keys() []string
func (MapCarrier) Set ¶ added in v0.2.15
func (c MapCarrier) Set(key, value string)
type MarketplaceDetailStep ¶ added in v0.2.15
type MarketplaceDetailStep struct {
// contains filtered or unexported fields
}
MarketplaceDetailStep retrieves detailed info for a named plugin.
func (*MarketplaceDetailStep) Execute ¶ added in v0.2.15
func (s *MarketplaceDetailStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*MarketplaceDetailStep) Name ¶ added in v0.2.15
func (s *MarketplaceDetailStep) Name() string
type MarketplaceEntry ¶ added in v0.2.15
type MarketplaceEntry struct {
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Author string `json:"author"`
Category string `json:"category"`
Tags []string `json:"tags"`
Downloads int `json:"downloads"`
Rating float64 `json:"rating"`
Installed bool `json:"installed"`
InstalledAt string `json:"installedAt,omitempty"`
}
MarketplaceEntry is a plugin entry in the marketplace registry.
type MarketplaceInstallStep ¶ added in v0.2.15
type MarketplaceInstallStep struct {
// contains filtered or unexported fields
}
MarketplaceInstallStep triggers installation of a named plugin.
func (*MarketplaceInstallStep) Execute ¶ added in v0.2.15
func (s *MarketplaceInstallStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*MarketplaceInstallStep) Name ¶ added in v0.2.15
func (s *MarketplaceInstallStep) Name() string
type MarketplaceInstalledStep ¶ added in v0.2.15
type MarketplaceInstalledStep struct {
// contains filtered or unexported fields
}
MarketplaceInstalledStep lists all installed plugins.
func (*MarketplaceInstalledStep) Execute ¶ added in v0.2.15
func (s *MarketplaceInstalledStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*MarketplaceInstalledStep) Name ¶ added in v0.2.15
func (s *MarketplaceInstalledStep) Name() string
type MarketplaceRegistry ¶ added in v0.2.15
type MarketplaceRegistry interface {
Search(query, category string, tags []string) ([]MarketplaceEntry, error)
Detail(name string) (*MarketplaceEntry, error)
Install(name string) error
Uninstall(name string) error
Update(name string) (*MarketplaceEntry, error)
ListInstalled() ([]MarketplaceEntry, error)
}
MarketplaceRegistry is the backend used by marketplace pipeline steps.
type MarketplaceSearchStep ¶ added in v0.2.15
type MarketplaceSearchStep struct {
// contains filtered or unexported fields
}
MarketplaceSearchStep searches the plugin registry.
func (*MarketplaceSearchStep) Execute ¶ added in v0.2.15
func (s *MarketplaceSearchStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*MarketplaceSearchStep) Name ¶ added in v0.2.15
func (s *MarketplaceSearchStep) Name() string
type MarketplaceUninstallStep ¶ added in v0.2.15
type MarketplaceUninstallStep struct {
// contains filtered or unexported fields
}
MarketplaceUninstallStep removes an installed plugin.
func (*MarketplaceUninstallStep) Execute ¶ added in v0.2.15
func (s *MarketplaceUninstallStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*MarketplaceUninstallStep) Name ¶ added in v0.2.15
func (s *MarketplaceUninstallStep) Name() string
type MarketplaceUpdateStep ¶ added in v0.2.15
type MarketplaceUpdateStep struct {
// contains filtered or unexported fields
}
MarketplaceUpdateStep updates an installed plugin to its latest version.
func (*MarketplaceUpdateStep) Execute ¶ added in v0.2.15
func (s *MarketplaceUpdateStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*MarketplaceUpdateStep) Name ¶ added in v0.2.15
func (s *MarketplaceUpdateStep) Name() string
type MemoryIaCStateStore ¶ added in v0.2.13
type MemoryIaCStateStore struct {
// contains filtered or unexported fields
}
MemoryIaCStateStore is an in-memory implementation of IaCStateStore. Suitable for testing and development; state is lost on restart.
func NewMemoryIaCStateStore ¶ added in v0.2.13
func NewMemoryIaCStateStore() *MemoryIaCStateStore
NewMemoryIaCStateStore creates a new empty in-memory state store.
func (*MemoryIaCStateStore) DeleteState ¶ added in v0.2.13
func (s *MemoryIaCStateStore) DeleteState(resourceID string) error
DeleteState removes a state record by resource ID.
func (*MemoryIaCStateStore) GetState ¶ added in v0.2.13
func (s *MemoryIaCStateStore) GetState(resourceID string) (*IaCState, error)
GetState retrieves a state record by resource ID. Returns nil, nil when not found.
func (*MemoryIaCStateStore) ListStates ¶ added in v0.2.13
func (s *MemoryIaCStateStore) ListStates(filter map[string]string) ([]*IaCState, error)
ListStates returns all state records matching the provided key=value filter. Supported filter keys: "resource_type", "provider", "status".
func (*MemoryIaCStateStore) Lock ¶ added in v0.2.13
func (s *MemoryIaCStateStore) Lock(resourceID string) error
Lock acquires an exclusive advisory lock for the given resource ID.
func (*MemoryIaCStateStore) SaveState ¶ added in v0.2.13
func (s *MemoryIaCStateStore) SaveState(state *IaCState) error
SaveState inserts or replaces a state record.
func (*MemoryIaCStateStore) Unlock ¶ added in v0.2.13
func (s *MemoryIaCStateStore) Unlock(resourceID string) error
Unlock releases the advisory lock for the given resource ID.
type MemoryNoSQL ¶ added in v0.2.13
type MemoryNoSQL struct {
// contains filtered or unexported fields
}
MemoryNoSQL is a thread-safe in-memory NoSQL store. type: nosql.memory — useful for testing and local scenarios.
func NewMemoryNoSQL ¶ added in v0.2.13
func NewMemoryNoSQL(name string, cfg MemoryNoSQLConfig) *MemoryNoSQL
NewMemoryNoSQL creates a new MemoryNoSQL module.
func (*MemoryNoSQL) Delete ¶ added in v0.2.13
func (m *MemoryNoSQL) Delete(_ context.Context, key string) error
Delete removes an item by key. Does not error if key does not exist.
func (*MemoryNoSQL) Get ¶ added in v0.2.13
Get retrieves an item by key. Returns nil, nil when the key does not exist.
func (*MemoryNoSQL) Init ¶ added in v0.2.13
func (m *MemoryNoSQL) Init(_ modular.Application) error
func (*MemoryNoSQL) Name ¶ added in v0.2.13
func (m *MemoryNoSQL) Name() string
func (*MemoryNoSQL) ProvidesServices ¶ added in v0.2.13
func (m *MemoryNoSQL) ProvidesServices() []modular.ServiceProvider
func (*MemoryNoSQL) Query ¶ added in v0.2.13
Query returns items matching the params filter. Supported params: "prefix" (string key prefix filter).
func (*MemoryNoSQL) RequiresServices ¶ added in v0.2.13
func (m *MemoryNoSQL) RequiresServices() []modular.ServiceDependency
type MemoryNoSQLConfig ¶ added in v0.2.13
type MemoryNoSQLConfig struct {
Collection string `json:"collection" yaml:"collection"`
}
MemoryNoSQLConfig holds configuration for the nosql.memory module.
type MessageBroker ¶
type MessageBroker interface {
Producer() MessageProducer
Consumer() MessageConsumer
Subscribe(topic string, handler MessageHandler) error
Start(ctx context.Context) error
Stop(ctx context.Context) error
}
MessageBroker interface for message broker modules
type MessageConsumer ¶
type MessageConsumer interface {
Subscribe(topic string, handler MessageHandler) error
Unsubscribe(topic string) error
}
MessageConsumer interface for consuming messages
type MessageHandler ¶
MessageHandler interface for handling messages
type MessageHandlerAdapter ¶
type MessageHandlerAdapter struct {
// contains filtered or unexported fields
}
MessageHandlerAdapter adapts a function to the MessageHandler interface
func (*MessageHandlerAdapter) HandleMessage ¶
func (a *MessageHandlerAdapter) HandleMessage(msg []byte) error
HandleMessage implements the MessageHandler interface
type MessageHandlerJobAdapter ¶
type MessageHandlerJobAdapter struct {
// contains filtered or unexported fields
}
MessageHandlerJobAdapter adapts a MessageHandler to the Job interface
func NewMessageHandlerJobAdapter ¶
func NewMessageHandlerJobAdapter(handler MessageHandler) *MessageHandlerJobAdapter
NewMessageHandlerJobAdapter creates a new adapter from MessageHandler to Job
type MessageProducer ¶
MessageProducer interface for producing messages
type MetricsCollector ¶
type MetricsCollector struct {
WorkflowExecutions *prometheus.CounterVec
WorkflowDuration *prometheus.HistogramVec
HTTPRequestsTotal *prometheus.CounterVec
HTTPRequestDuration *prometheus.HistogramVec
ModuleOperations *prometheus.CounterVec
ActiveWorkflows *prometheus.GaugeVec
// contains filtered or unexported fields
}
MetricsCollector wraps Prometheus metrics for the workflow engine. It registers as service "metrics.collector" and provides pre-defined metric vectors.
func NewMetricsCollector ¶
func NewMetricsCollector(name string) *MetricsCollector
NewMetricsCollector creates a new MetricsCollector with its own Prometheus registry.
func NewMetricsCollectorWithConfig ¶
func NewMetricsCollectorWithConfig(name string, cfg MetricsCollectorConfig) *MetricsCollector
NewMetricsCollectorWithConfig creates a new MetricsCollector with the given config.
func (*MetricsCollector) Handler ¶
func (m *MetricsCollector) Handler() http.Handler
Handler returns an HTTP handler that serves Prometheus metrics.
func (*MetricsCollector) Init ¶
func (m *MetricsCollector) Init(app modular.Application) error
Init registers the metrics collector as a service.
func (*MetricsCollector) MetricsPath ¶
func (m *MetricsCollector) MetricsPath() string
MetricsPath returns the configured metrics endpoint path.
func (*MetricsCollector) Name ¶
func (m *MetricsCollector) Name() string
Name returns the module name.
func (*MetricsCollector) ProvidesServices ¶
func (m *MetricsCollector) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*MetricsCollector) RecordHTTPRequest ¶
func (m *MetricsCollector) RecordHTTPRequest(method, path string, statusCode int, duration time.Duration)
RecordHTTPRequest records an HTTP request metric.
func (*MetricsCollector) RecordModuleOperation ¶
func (m *MetricsCollector) RecordModuleOperation(module, operation, status string)
RecordModuleOperation records a module operation metric.
func (*MetricsCollector) RecordWorkflowDuration ¶
func (m *MetricsCollector) RecordWorkflowDuration(workflowType, action string, duration time.Duration)
RecordWorkflowDuration records the duration of a workflow execution.
func (*MetricsCollector) RecordWorkflowExecution ¶
func (m *MetricsCollector) RecordWorkflowExecution(workflowType, action, status string)
RecordWorkflowExecution increments the workflow execution counter.
func (*MetricsCollector) RequiresServices ¶
func (m *MetricsCollector) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module.
func (*MetricsCollector) SetActiveWorkflows ¶
func (m *MetricsCollector) SetActiveWorkflows(workflowType string, count float64)
SetActiveWorkflows sets the gauge for active workflows of a given type.
type MetricsCollectorConfig ¶
type MetricsCollectorConfig struct {
Namespace string `yaml:"namespace" json:"namespace"`
Subsystem string `yaml:"subsystem" json:"subsystem"`
MetricsPath string `yaml:"metricsPath" json:"metricsPath"`
EnabledMetrics []string `yaml:"enabledMetrics" json:"enabledMetrics"`
}
MetricsCollectorConfig holds configuration for the MetricsCollector module.
func DefaultMetricsCollectorConfig ¶
func DefaultMetricsCollectorConfig() MetricsCollectorConfig
DefaultMetricsCollectorConfig returns the default configuration.
type MetricsHTTPHandler ¶
MetricsHTTPHandler adapts an http.Handler to the HTTPHandler interface
func (*MetricsHTTPHandler) Handle ¶
func (h *MetricsHTTPHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle implements the HTTPHandler interface
type MockApplication ¶
type MockApplication struct {
Services map[string]any
Config map[string]any
ConfigSectionMap map[string]modular.ConfigProvider
MockLogger *MockLogger
Modules map[string]modular.Module
}
MockApplication is a mock implementation of modular.Application for testing
func NewMockApplication ¶
func NewMockApplication() *MockApplication
NewMockApplication creates a new instance of a MockApplication
func (*MockApplication) ConfigProvider ¶
func (a *MockApplication) ConfigProvider() modular.ConfigProvider
func (*MockApplication) ConfigSections ¶
func (a *MockApplication) ConfigSections() map[string]modular.ConfigProvider
func (*MockApplication) GetAllModules ¶
func (a *MockApplication) GetAllModules() map[string]modular.Module
GetAllModules returns a map of all registered modules
func (*MockApplication) GetConfig ¶
func (a *MockApplication) GetConfig() map[string]any
func (*MockApplication) GetConfigSection ¶
func (a *MockApplication) GetConfigSection(section string) (modular.ConfigProvider, error)
func (*MockApplication) GetModule ¶
func (a *MockApplication) GetModule(name string) modular.Module
GetModule returns the module with the given name
func (*MockApplication) GetService ¶
func (a *MockApplication) GetService(name string, out any) error
func (*MockApplication) GetServiceEntry ¶
func (a *MockApplication) GetServiceEntry(serviceName string) (*modular.ServiceRegistryEntry, bool)
GetServiceEntry retrieves detailed information about a registered service
func (*MockApplication) GetServicesByInterface ¶
func (a *MockApplication) GetServicesByInterface(interfaceType reflect.Type) []*modular.ServiceRegistryEntry
GetServicesByInterface returns all services that implement the given interface
func (*MockApplication) GetServicesByModule ¶
func (a *MockApplication) GetServicesByModule(moduleName string) []string
GetServicesByModule returns all services provided by a specific module
func (*MockApplication) Init ¶
func (a *MockApplication) Init() error
func (*MockApplication) IsVerboseConfig ¶
func (a *MockApplication) IsVerboseConfig() bool
IsVerboseConfig returns whether verbose config debugging is enabled
func (*MockApplication) Logger ¶
func (a *MockApplication) Logger() modular.Logger
func (*MockApplication) OnConfigLoaded ¶
func (a *MockApplication) OnConfigLoaded(hook func(modular.Application) error)
OnConfigLoaded registers a callback to run after config loading
func (*MockApplication) RegisterConfigSection ¶
func (a *MockApplication) RegisterConfigSection(name string, config modular.ConfigProvider)
func (*MockApplication) RegisterModule ¶
func (a *MockApplication) RegisterModule(module modular.Module)
RegisterModule registers a module with the application
func (*MockApplication) RegisterService ¶
func (a *MockApplication) RegisterService(name string, service any) error
func (*MockApplication) Run ¶
func (a *MockApplication) Run() error
Run satisfies the modular.Application interface
func (*MockApplication) SetLogger ¶
func (a *MockApplication) SetLogger(logger modular.Logger)
SetLogger sets the application's logger
func (*MockApplication) SetVerboseConfig ¶
func (a *MockApplication) SetVerboseConfig(enabled bool)
SetVerboseConfig sets verbose config debugging (no-op for tests)
func (*MockApplication) Start ¶
func (a *MockApplication) Start() error
func (*MockApplication) StartTime ¶
func (a *MockApplication) StartTime() time.Time
StartTime returns the time when the application was started
func (*MockApplication) Stop ¶
func (a *MockApplication) Stop() error
func (*MockApplication) SvcRegistry ¶
func (a *MockApplication) SvcRegistry() modular.ServiceRegistry
SvcRegistry satisfies the modular.Application interface
type MockConfigProvider ¶
type MockConfigProvider struct {
Config map[string]any // Changed from lowercase config to Config to match usage elsewhere
}
MockConfigProvider is a mock implementation of modular.ConfigProvider for testing
func (*MockConfigProvider) GetConfig ¶
func (p *MockConfigProvider) GetConfig() any
type MockLogger ¶
type MockLogger struct {
Messages []string
}
MockLogger implements modular.Logger for testing
func (*MockLogger) Debug ¶
func (l *MockLogger) Debug(format string, args ...any)
func (*MockLogger) Error ¶
func (l *MockLogger) Error(format string, args ...any)
func (*MockLogger) Fatal ¶
func (l *MockLogger) Fatal(format string, args ...any)
func (*MockLogger) Info ¶
func (l *MockLogger) Info(format string, args ...any)
func (*MockLogger) Warn ¶
func (l *MockLogger) Warn(format string, args ...any)
type MockScheduler ¶
type MockScheduler struct {
// contains filtered or unexported fields
}
MockScheduler is a mock implementation of the Scheduler interface
func NewMockScheduler ¶
func NewMockScheduler() *MockScheduler
func (*MockScheduler) Init ¶
func (s *MockScheduler) Init(registry modular.ServiceRegistry) error
func (*MockScheduler) Name ¶
func (s *MockScheduler) Name() string
func (*MockScheduler) Schedule ¶
func (s *MockScheduler) Schedule(job Job) error
func (*MockScheduler) SetCronExpression ¶
func (s *MockScheduler) SetCronExpression(index int, cronExpression string)
For our tests, we'll add this method to set the cron expression for a scheduled job
type MockWorkflowEngine ¶
type MockWorkflowEngine struct {
// contains filtered or unexported fields
}
MockWorkflowEngine is a mock implementation of the WorkflowEngine interface
func NewMockWorkflowEngine ¶
func NewMockWorkflowEngine() *MockWorkflowEngine
func (*MockWorkflowEngine) TriggerWorkflow ¶
type ModuleNamespace ¶
type ModuleNamespace struct {
// contains filtered or unexported fields
}
ModuleNamespace represents the legacy struct (for backward compatibility)
func NewModuleNamespace ¶
func NewModuleNamespace(prefix string, suffix string) *ModuleNamespace
NewModuleNamespace creates a new module namespace with optional prefix and suffix
func (*ModuleNamespace) FormatName ¶
func (ns *ModuleNamespace) FormatName(baseName string) string
FormatName formats a module name with the namespace prefix/suffix
func (*ModuleNamespace) ResolveDependency ¶
func (ns *ModuleNamespace) ResolveDependency(dependencyName string) string
ResolveDependency formats a dependency name with the namespace prefix/suffix
func (*ModuleNamespace) ResolveServiceName ¶
func (ns *ModuleNamespace) ResolveServiceName(serviceName string) string
ResolveServiceName formats a service name with the namespace prefix/suffix
type ModuleNamespaceProvider ¶
type ModuleNamespaceProvider interface {
// FormatName formats a module name with the namespace
FormatName(baseName string) string
// ResolveDependency formats a dependency name with the namespace
ResolveDependency(dependencyName string) string
// ResolveServiceName formats a service name with the namespace
ResolveServiceName(serviceName string) string
// ValidateModuleName checks if a module name conforms to namespace requirements
ValidateModuleName(moduleName string) error
}
ModuleNamespaceProvider defines the interface for module namespace functionality
type ModuleNamespaceProviderFunc ¶
type ModuleNamespaceProviderFunc struct {
FormatNameFunc func(baseName string) string
ResolveDependencyFunc func(dependencyName string) string
ResolveServiceNameFunc func(serviceName string) string
ValidateModuleNameFunc func(moduleName string) error
}
ModuleNamespaceProviderFunc provides a functional implementation of ModuleNamespaceProvider
func (ModuleNamespaceProviderFunc) FormatName ¶
func (m ModuleNamespaceProviderFunc) FormatName(baseName string) string
FormatName formats a base name with the namespace
func (ModuleNamespaceProviderFunc) ResolveDependency ¶
func (m ModuleNamespaceProviderFunc) ResolveDependency(dependencyName string) string
ResolveDependency resolves a dependency name with the namespace
func (ModuleNamespaceProviderFunc) ResolveServiceName ¶
func (m ModuleNamespaceProviderFunc) ResolveServiceName(serviceName string) string
ResolveServiceName resolves a service name with the namespace
func (ModuleNamespaceProviderFunc) ValidateModuleName ¶
func (m ModuleNamespaceProviderFunc) ValidateModuleName(moduleName string) error
ValidateModuleName validates a module name
type MongoDBNoSQL ¶ added in v0.2.13
type MongoDBNoSQL struct {
// contains filtered or unexported fields
}
MongoDBNoSQL is the nosql.mongodb module. In memory mode (uri: "memory://") it delegates to MemoryNoSQL. For real MongoDB, replace backend with a mongo.Collection and implement Get/Put/Delete/Query using FindOne, ReplaceOne, DeleteOne, Find.
func NewMongoDBNoSQL ¶ added in v0.2.13
func NewMongoDBNoSQL(name string, cfg MongoDBNoSQLConfig) *MongoDBNoSQL
NewMongoDBNoSQL creates a new MongoDBNoSQL module.
func (*MongoDBNoSQL) Delete ¶ added in v0.2.13
func (m *MongoDBNoSQL) Delete(ctx context.Context, key string) error
func (*MongoDBNoSQL) Init ¶ added in v0.2.13
func (m *MongoDBNoSQL) Init(_ modular.Application) error
func (*MongoDBNoSQL) Name ¶ added in v0.2.13
func (m *MongoDBNoSQL) Name() string
func (*MongoDBNoSQL) ProvidesServices ¶ added in v0.2.13
func (m *MongoDBNoSQL) ProvidesServices() []modular.ServiceProvider
func (*MongoDBNoSQL) RequiresServices ¶ added in v0.2.13
func (m *MongoDBNoSQL) RequiresServices() []modular.ServiceDependency
type MongoDBNoSQLConfig ¶ added in v0.2.13
type MongoDBNoSQLConfig struct {
URI string `json:"uri" yaml:"uri"` // "memory://" => in-memory fallback
Database string `json:"database" yaml:"database"`
Collection string `json:"collection" yaml:"collection"`
}
MongoDBNoSQLConfig holds configuration for the nosql.mongodb module.
Full MongoDB implementation would use:
- go.mongodb.org/mongo-driver/mongo
When uri == "memory://" the module falls back to the in-memory backend.
type MultiRegionModule ¶ added in v0.2.15
type MultiRegionModule struct {
// contains filtered or unexported fields
}
MultiRegionModule manages region-aware deployments with failover and traffic routing. Config:
provider: mock regions: list of region definitions (name, provider, endpoint, priority, health_check) primary: primary region name
func NewMultiRegionModule ¶ added in v0.2.15
func NewMultiRegionModule(name string, cfg map[string]any) *MultiRegionModule
NewMultiRegionModule creates a new MultiRegionModule.
func (*MultiRegionModule) CheckHealth ¶ added in v0.2.15
func (m *MultiRegionModule) CheckHealth() ([]RegionHealth, error)
CheckHealth checks health across all regions.
func (*MultiRegionModule) Deploy ¶ added in v0.2.15
func (m *MultiRegionModule) Deploy(region string) error
Deploy deploys to the specified region.
func (*MultiRegionModule) Failover ¶ added in v0.2.15
func (m *MultiRegionModule) Failover(from, to string) error
Failover triggers failover from one region to another.
func (*MultiRegionModule) Init ¶ added in v0.2.15
func (m *MultiRegionModule) Init(app modular.Application) error
Init initialises the backend and sets up initial state.
func (*MultiRegionModule) Name ¶ added in v0.2.15
func (m *MultiRegionModule) Name() string
Name returns the module name.
func (*MultiRegionModule) Promote ¶ added in v0.2.15
func (m *MultiRegionModule) Promote(region string) error
Promote promotes a region to primary.
func (*MultiRegionModule) ProvidesServices ¶ added in v0.2.15
func (m *MultiRegionModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*MultiRegionModule) RequiresServices ¶ added in v0.2.15
func (m *MultiRegionModule) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil.
func (*MultiRegionModule) SetWeight ¶ added in v0.2.15
func (m *MultiRegionModule) SetWeight(region string, weight int) error
SetWeight adjusts the traffic weight for a region.
func (*MultiRegionModule) Status ¶ added in v0.2.15
func (m *MultiRegionModule) Status() (*MultiRegionState, error)
Status returns the current multi-region state.
func (*MultiRegionModule) Sync ¶ added in v0.2.15
func (m *MultiRegionModule) Sync() error
Sync synchronises state/config across all regions.
func (*MultiRegionModule) Weights ¶ added in v0.2.15
func (m *MultiRegionModule) Weights() map[string]int
Weights returns current traffic routing weights.
type MultiRegionRoutingModule ¶ added in v0.2.15
type MultiRegionRoutingModule struct {
// contains filtered or unexported fields
}
MultiRegionRoutingModule manages region routing for a tenant deployment. It wraps a MultiRegionModule and provides routing logic (latency or geo). Config:
module: name of the platform.region module to route through mode: latency | geo (default: latency)
func NewMultiRegionRoutingModule ¶ added in v0.2.15
func NewMultiRegionRoutingModule(name string, cfg map[string]any) *MultiRegionRoutingModule
NewMultiRegionRoutingModule creates a new routing module.
func (*MultiRegionRoutingModule) Failover ¶ added in v0.2.15
func (r *MultiRegionRoutingModule) Failover(from, to string) error
Failover transitions a region through the failover state machine. Transitions: healthy/degraded → failed (from), recovering → healthy (to).
func (*MultiRegionRoutingModule) Init ¶ added in v0.2.18
func (r *MultiRegionRoutingModule) Init(app modular.Application) error
Init registers the module as a service and optionally loads region config from the platform.region module.
func (*MultiRegionRoutingModule) Name ¶ added in v0.2.15
func (r *MultiRegionRoutingModule) Name() string
Name returns the module name.
func (*MultiRegionRoutingModule) RouteRequest ¶ added in v0.2.15
func (r *MultiRegionRoutingModule) RouteRequest(ctx context.Context) (RegionDeployConfig, error)
RouteRequest selects the best region based on the configured routing mode.
func (*MultiRegionRoutingModule) SetRegions ¶ added in v0.2.15
func (r *MultiRegionRoutingModule) SetRegions(regions []RegionDeployConfig)
SetRegions configures the regions available for routing.
func (*MultiRegionRoutingModule) SetState ¶ added in v0.2.15
func (r *MultiRegionRoutingModule) SetState(region string, state RegionFailoverState) error
SetState directly sets the failover state for a region (for testing / external control).
func (*MultiRegionRoutingModule) State ¶ added in v0.2.15
func (r *MultiRegionRoutingModule) State(region string) (RegionFailoverState, bool)
State returns the failover state for a region.
func (*MultiRegionRoutingModule) Weights ¶ added in v0.2.15
func (r *MultiRegionRoutingModule) Weights() map[string]int
Weights returns the current traffic routing weights.
type MultiRegionState ¶ added in v0.2.15
type MultiRegionState struct {
Regions []RegionHealth `json:"regions"`
ActiveRegion string `json:"activeRegion"`
PrimaryRegion string `json:"primaryRegion"`
Weights map[string]int `json:"weights"`
Status string `json:"status"` // initializing, active, failing-over, degraded
}
MultiRegionState tracks current multi-region deployment state.
type NATSBroker ¶
type NATSBroker struct {
// contains filtered or unexported fields
}
NATSBroker implements the MessageBroker interface using NATS.
func NewNATSBroker ¶
func NewNATSBroker(name string) *NATSBroker
NewNATSBroker creates a new NATS message broker.
func (*NATSBroker) Consumer ¶
func (b *NATSBroker) Consumer() MessageConsumer
Consumer returns the message consumer interface.
func (*NATSBroker) Init ¶
func (b *NATSBroker) Init(app modular.Application) error
Init initializes the module with the application context.
func (*NATSBroker) Producer ¶
func (b *NATSBroker) Producer() MessageProducer
Producer returns the message producer interface.
func (*NATSBroker) ProvidesServices ¶
func (b *NATSBroker) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*NATSBroker) RequiresServices ¶
func (b *NATSBroker) RequiresServices() []modular.ServiceDependency
RequiresServices returns the services required by this module.
func (*NATSBroker) SetURL ¶
func (b *NATSBroker) SetURL(url string)
SetURL sets the NATS server URL.
func (*NATSBroker) Start ¶
func (b *NATSBroker) Start(ctx context.Context) error
Start connects to NATS and activates any pending subscriptions.
func (*NATSBroker) Stop ¶
func (b *NATSBroker) Stop(_ context.Context) error
Stop disconnects from NATS.
func (*NATSBroker) Subscribe ¶
func (b *NATSBroker) Subscribe(topic string, handler MessageHandler) error
Subscribe is a convenience method to subscribe a handler to a topic.
type NetworkApplyStep ¶ added in v0.2.14
type NetworkApplyStep struct {
// contains filtered or unexported fields
}
NetworkApplyStep calls Apply() on a named platform.networking module.
func (*NetworkApplyStep) Execute ¶ added in v0.2.14
func (s *NetworkApplyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*NetworkApplyStep) Name ¶ added in v0.2.14
func (s *NetworkApplyStep) Name() string
type NetworkPlan ¶ added in v0.2.14
type NetworkPlan struct {
VPC VPCConfig `json:"vpc"`
Subnets []SubnetConfig `json:"subnets"`
NATGateway bool `json:"natGateway"`
SecurityGroups []SecurityGroupConfig `json:"securityGroups"`
Changes []string `json:"changes"`
}
NetworkPlan describes the changes a networking module intends to make.
type NetworkPlanStep ¶ added in v0.2.14
type NetworkPlanStep struct {
// contains filtered or unexported fields
}
NetworkPlanStep calls Plan() on a named platform.networking module.
func (*NetworkPlanStep) Execute ¶ added in v0.2.14
func (s *NetworkPlanStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*NetworkPlanStep) Name ¶ added in v0.2.14
func (s *NetworkPlanStep) Name() string
type NetworkState ¶ added in v0.2.14
type NetworkState struct {
VPCID string `json:"vpcId"`
SubnetIDs map[string]string `json:"subnetIds"` // name → id
SecurityGroupIDs map[string]string `json:"securityGroupIds"` // name → id
NATGatewayID string `json:"natGatewayId"`
Status string `json:"status"` // planned, active, destroying, destroyed
}
NetworkState holds the current state of a managed VPC network.
type NetworkStatusStep ¶ added in v0.2.14
type NetworkStatusStep struct {
// contains filtered or unexported fields
}
NetworkStatusStep calls Status() on a named platform.networking module.
func (*NetworkStatusStep) Execute ¶ added in v0.2.14
func (s *NetworkStatusStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*NetworkStatusStep) Name ¶ added in v0.2.14
func (s *NetworkStatusStep) Name() string
type NoSQLDeleteStep ¶ added in v0.2.13
type NoSQLDeleteStep struct {
// contains filtered or unexported fields
}
NoSQLDeleteStep deletes an item by key from a named NoSQL store.
func (*NoSQLDeleteStep) Execute ¶ added in v0.2.13
func (s *NoSQLDeleteStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*NoSQLDeleteStep) Name ¶ added in v0.2.13
func (s *NoSQLDeleteStep) Name() string
type NoSQLGetStep ¶ added in v0.2.13
type NoSQLGetStep struct {
// contains filtered or unexported fields
}
NoSQLGetStep retrieves an item by key from a named NoSQL store.
func (*NoSQLGetStep) Execute ¶ added in v0.2.13
func (s *NoSQLGetStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*NoSQLGetStep) Name ¶ added in v0.2.13
func (s *NoSQLGetStep) Name() string
type NoSQLPutStep ¶ added in v0.2.13
type NoSQLPutStep struct {
// contains filtered or unexported fields
}
NoSQLPutStep inserts or replaces an item in a named NoSQL store.
func (*NoSQLPutStep) Execute ¶ added in v0.2.13
func (s *NoSQLPutStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*NoSQLPutStep) Name ¶ added in v0.2.13
func (s *NoSQLPutStep) Name() string
type NoSQLQueryStep ¶ added in v0.2.13
type NoSQLQueryStep struct {
// contains filtered or unexported fields
}
NoSQLQueryStep queries items from a named NoSQL store with optional filters.
func (*NoSQLQueryStep) Execute ¶ added in v0.2.13
func (s *NoSQLQueryStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*NoSQLQueryStep) Name ¶ added in v0.2.13
func (s *NoSQLQueryStep) Name() string
type NoSQLStore ¶ added in v0.2.13
type NoSQLStore interface {
// Get retrieves an item by key. Returns nil, nil when the key does not exist.
Get(ctx context.Context, key string) (map[string]any, error)
// Put inserts or replaces an item.
Put(ctx context.Context, key string, item map[string]any) error
// Delete removes an item by key. Does not error if the key does not exist.
Delete(ctx context.Context, key string) error
// Query returns all items that match the provided filter params.
// Supported params: "prefix" (string) — key prefix filter.
Query(ctx context.Context, params map[string]any) ([]map[string]any, error)
}
NoSQLStore is the common interface implemented by all NoSQL backend modules. Backends: nosql.memory, nosql.dynamodb, nosql.mongodb, nosql.redis.
type NodeGroupState ¶ added in v0.2.13
type NodeGroupState struct {
Name string `json:"name"`
InstanceType string `json:"instanceType"`
Min int `json:"min"`
Max int `json:"max"`
Current int `json:"current"`
}
NodeGroupState describes a node group within a cluster.
type OAuth2Module ¶ added in v0.1.5
type OAuth2Module struct {
// contains filtered or unexported fields
}
OAuth2Module implements the OAuth2 authorization code flow for multiple providers.
func NewOAuth2Module ¶ added in v0.1.5
func NewOAuth2Module(name string, providerCfgs []OAuth2ProviderConfig, jwtAuth *JWTAuthModule) *OAuth2Module
NewOAuth2Module creates a new OAuth2Module. The jwtAuth parameter is used to issue JWT tokens after successful OAuth2 login.
func (*OAuth2Module) Handle ¶ added in v0.1.5
func (m *OAuth2Module) Handle(w http.ResponseWriter, r *http.Request)
Handle routes OAuth2 requests. Routes handled:
GET /auth/oauth2/{provider}/login — redirect to provider
GET /auth/oauth2/{provider}/callback — exchange code, issue JWT
func (*OAuth2Module) Init ¶ added in v0.1.5
func (m *OAuth2Module) Init(_ modular.Application) error
Init is a no-op; dependencies are injected via NewOAuth2Module.
func (*OAuth2Module) Name ¶ added in v0.1.5
func (m *OAuth2Module) Name() string
Name returns the module name.
func (*OAuth2Module) ProvidesServices ¶ added in v0.1.5
func (m *OAuth2Module) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*OAuth2Module) RequiresServices ¶ added in v0.1.5
func (m *OAuth2Module) RequiresServices() []modular.ServiceDependency
RequiresServices returns an empty list (dependencies injected directly).
func (*OAuth2Module) SetJWTAuth ¶ added in v0.1.5
func (m *OAuth2Module) SetJWTAuth(j *JWTAuthModule)
SetJWTAuth sets the JWTAuthModule used to issue tokens after a successful OAuth2 login. This is called by the plugin's wiring hook.
type OAuth2ProviderConfig ¶ added in v0.1.5
type OAuth2ProviderConfig struct {
Name string `json:"name" yaml:"name"`
ClientID string `json:"clientId" yaml:"clientId"`
ClientSecret string `json:"clientSecret" yaml:"clientSecret"` //nolint:gosec // G117: config DTO field for OAuth2 client secret
AuthURL string `json:"authUrl" yaml:"authUrl"`
TokenURL string `json:"tokenUrl" yaml:"tokenUrl"`
UserInfoURL string `json:"userInfoUrl" yaml:"userInfoUrl"`
Scopes []string `json:"scopes" yaml:"scopes"`
RedirectURL string `json:"redirectUrl" yaml:"redirectUrl"`
}
OAuth2ProviderConfig holds configuration for a single OAuth2 provider.
type OTelMiddleware ¶ added in v0.2.3
type OTelMiddleware struct {
// contains filtered or unexported fields
}
OTelMiddleware instruments HTTP requests with OpenTelemetry tracing.
func NewOTelMiddleware ¶ added in v0.2.3
func NewOTelMiddleware(name, serverName string) *OTelMiddleware
NewOTelMiddleware creates a new OpenTelemetry HTTP tracing middleware.
func (*OTelMiddleware) Init ¶ added in v0.2.3
func (m *OTelMiddleware) Init(_ modular.Application) error
Init initializes the middleware.
func (*OTelMiddleware) Name ¶ added in v0.2.3
func (m *OTelMiddleware) Name() string
Name returns the module name.
func (*OTelMiddleware) Process ¶ added in v0.2.3
func (m *OTelMiddleware) Process(next http.Handler) http.Handler
Process wraps the handler with OpenTelemetry HTTP instrumentation.
func (*OTelMiddleware) ProvidesServices ¶ added in v0.2.3
func (m *OTelMiddleware) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this middleware.
func (*OTelMiddleware) RequiresServices ¶ added in v0.2.3
func (m *OTelMiddleware) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this middleware.
type OTelTracing ¶
type OTelTracing struct {
// contains filtered or unexported fields
}
OTelTracing provides OpenTelemetry distributed tracing. It implements the modular.Module interface.
func NewOTelTracing ¶
func NewOTelTracing(name string) *OTelTracing
NewOTelTracing creates a new OpenTelemetry tracing module.
func (*OTelTracing) Init ¶
func (o *OTelTracing) Init(app modular.Application) error
Init initializes the module with the application context.
func (*OTelTracing) ProvidesServices ¶
func (o *OTelTracing) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*OTelTracing) RequiresServices ¶
func (o *OTelTracing) RequiresServices() []modular.ServiceDependency
RequiresServices returns the services required by this module.
func (*OTelTracing) SetEndpoint ¶
func (o *OTelTracing) SetEndpoint(endpoint string)
SetEndpoint sets the OTLP endpoint.
func (*OTelTracing) SetServiceName ¶
func (o *OTelTracing) SetServiceName(serviceName string)
SetServiceName sets the service name used in traces.
type OpenAPIComponents ¶
type OpenAPIComponents struct {
Schemas map[string]*OpenAPISchema `json:"schemas,omitempty" yaml:"schemas,omitempty"`
}
OpenAPIComponents holds reusable schema components.
type OpenAPIConfig ¶ added in v0.1.6
type OpenAPIConfig struct {
SpecFile string `yaml:"spec_file" json:"spec_file"`
BasePath string `yaml:"base_path" json:"base_path"`
Validation OpenAPIValidationConfig `yaml:"validation" json:"validation"`
SwaggerUI OpenAPISwaggerUIConfig `yaml:"swagger_ui" json:"swagger_ui"`
RouterName string `yaml:"router" json:"router"` // optional: explicit router to attach to
MaxBodyBytes int64 `yaml:"max_body_bytes" json:"max_body_bytes"` // max request body size (bytes); 0 = use default
}
OpenAPIConfig holds the full configuration for an OpenAPI module.
type OpenAPIConsumer ¶
type OpenAPIConsumer struct {
// contains filtered or unexported fields
}
OpenAPIConsumer parses an external OpenAPI spec and generates typed HTTP client methods matching the spec operations. It provides an ExternalAPIClient service that other modules can use to call the external API.
func NewOpenAPIConsumer ¶
func NewOpenAPIConsumer(name string, config OpenAPIConsumerConfig) *OpenAPIConsumer
NewOpenAPIConsumer creates a new OpenAPI consumer module.
func (*OpenAPIConsumer) CallOperation ¶
func (c *OpenAPIConsumer) CallOperation(ctx context.Context, operationID string, data map[string]any) (map[string]any, error)
CallOperation invokes an external API operation by its operation ID. It resolves path parameters from the provided data map, applies field mappings, and returns the response.
func (*OpenAPIConsumer) GetFieldMapping ¶
func (c *OpenAPIConsumer) GetFieldMapping() *FieldMapping
GetFieldMapping returns the current field mapping.
func (*OpenAPIConsumer) GetSpec ¶
func (c *OpenAPIConsumer) GetSpec() *OpenAPISpec
GetSpec returns the loaded OpenAPI spec.
func (*OpenAPIConsumer) Init ¶
func (c *OpenAPIConsumer) Init(app modular.Application) error
Init registers the consumer as a service and loads the spec.
func (*OpenAPIConsumer) ListOperations ¶
func (c *OpenAPIConsumer) ListOperations() []ExternalOperation
ListOperations returns all operations defined in the loaded spec.
func (*OpenAPIConsumer) Name ¶
func (c *OpenAPIConsumer) Name() string
Name returns the module name.
func (*OpenAPIConsumer) ProvidesServices ¶
func (c *OpenAPIConsumer) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*OpenAPIConsumer) RequiresServices ¶
func (c *OpenAPIConsumer) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module.
func (*OpenAPIConsumer) ServeOperations ¶
func (c *OpenAPIConsumer) ServeOperations(w http.ResponseWriter, _ *http.Request)
ServeOperations serves the list of available operations as JSON.
func (*OpenAPIConsumer) ServeSpec ¶
func (c *OpenAPIConsumer) ServeSpec(w http.ResponseWriter, _ *http.Request)
ServeSpec serves the loaded spec directly.
func (*OpenAPIConsumer) SetClient ¶
func (c *OpenAPIConsumer) SetClient(client *http.Client)
SetClient sets a custom HTTP client (useful for testing).
func (*OpenAPIConsumer) SetFieldMapping ¶
func (c *OpenAPIConsumer) SetFieldMapping(fm *FieldMapping)
SetFieldMapping sets the field mapping for transforming data between local workflow data and external API schemas.
type OpenAPIConsumerConfig ¶
type OpenAPIConsumerConfig struct {
SpecURL string `json:"specUrl" yaml:"specUrl"`
SpecFile string `json:"specFile" yaml:"specFile"`
}
OpenAPIConsumerConfig holds configuration for the OpenAPI consumer module.
type OpenAPIGenerator ¶
type OpenAPIGenerator struct {
// contains filtered or unexported fields
}
OpenAPIGenerator is a module that scans workflow route definitions and generates an OpenAPI 3.0 specification, serving it at configurable endpoints.
func NewOpenAPIGenerator ¶
func NewOpenAPIGenerator(name string, config OpenAPIGeneratorConfig) *OpenAPIGenerator
NewOpenAPIGenerator creates a new OpenAPI generator module.
func (*OpenAPIGenerator) ApplySchemas ¶
func (g *OpenAPIGenerator) ApplySchemas()
ApplySchemas applies all registered component schemas and operation schema overrides to the current spec. Call this after BuildSpec.
func (*OpenAPIGenerator) BuildSpec ¶
func (g *OpenAPIGenerator) BuildSpec(workflows map[string]any)
BuildSpec scans the workflow config and builds the OpenAPI spec. This should be called after all modules and workflows are registered.
func (*OpenAPIGenerator) BuildSpecFromRoutes ¶
func (g *OpenAPIGenerator) BuildSpecFromRoutes(routes []RouteDefinition)
BuildSpecFromRoutes builds an OpenAPI spec from explicit route definitions.
func (*OpenAPIGenerator) GetSpec ¶
func (g *OpenAPIGenerator) GetSpec() *OpenAPISpec
GetSpec returns the current OpenAPI spec.
func (*OpenAPIGenerator) Handle ¶
func (g *OpenAPIGenerator) Handle(w http.ResponseWriter, r *http.Request)
Handle dispatches to JSON or YAML handler based on path suffix.
func (*OpenAPIGenerator) Init ¶
func (g *OpenAPIGenerator) Init(app modular.Application) error
Init registers the generator as a service and builds the initial spec.
func (*OpenAPIGenerator) Name ¶
func (g *OpenAPIGenerator) Name() string
Name returns the module name.
func (*OpenAPIGenerator) ProvidesServices ¶
func (g *OpenAPIGenerator) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*OpenAPIGenerator) RegisterAdminSchemas ¶ added in v0.1.6
func (g *OpenAPIGenerator) RegisterAdminSchemas()
RegisterAdminSchemas satisfies the interfaces.SchemaRegistrar interface. It delegates to the package-level RegisterAdminSchemas function, registering all admin API request/response schemas onto this generator.
func (*OpenAPIGenerator) RegisterComponentSchema ¶
func (g *OpenAPIGenerator) RegisterComponentSchema(name string, schema *OpenAPISchema)
RegisterComponentSchema adds a named schema to the components/schemas section. Call this before BuildSpec or after BuildSpec to add reusable schemas.
func (*OpenAPIGenerator) RequiresServices ¶
func (g *OpenAPIGenerator) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module.
func (*OpenAPIGenerator) ServeHTTP ¶
func (g *OpenAPIGenerator) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler.
func (*OpenAPIGenerator) ServeJSON ¶
func (g *OpenAPIGenerator) ServeJSON(w http.ResponseWriter, _ *http.Request)
ServeJSON serves the OpenAPI spec as JSON.
func (*OpenAPIGenerator) ServeYAML ¶
func (g *OpenAPIGenerator) ServeYAML(w http.ResponseWriter, _ *http.Request)
ServeYAML serves the OpenAPI spec as YAML.
func (*OpenAPIGenerator) SetOperationSchema ¶
func (g *OpenAPIGenerator) SetOperationSchema(method, path string, req, resp *OpenAPISchema)
SetOperationSchema sets request/response schemas for a specific operation. The method and path must match what appears in the workflow route definitions.
func (*OpenAPIGenerator) SortedPaths ¶
func (g *OpenAPIGenerator) SortedPaths() []string
SortedPaths returns the spec paths sorted alphabetically (useful for stable output).
type OpenAPIGeneratorConfig ¶
type OpenAPIGeneratorConfig struct {
Title string `json:"title" yaml:"title"`
Version string `json:"version" yaml:"version"`
Description string `json:"description" yaml:"description"`
Servers []string `json:"servers" yaml:"servers"`
}
OpenAPIGeneratorConfig holds configuration for the OpenAPI generator module.
type OpenAPIHTTPHandler ¶
type OpenAPIHTTPHandler struct {
Handler http.HandlerFunc
}
OpenAPIHTTPHandler adapts the OpenAPIGenerator to the HTTPHandler interface.
func (*OpenAPIHTTPHandler) Handle ¶
func (h *OpenAPIHTTPHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle implements the HTTPHandler interface.
type OpenAPIInfo ¶
type OpenAPIInfo struct {
Title string `json:"title" yaml:"title"`
Version string `json:"version" yaml:"version"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
}
OpenAPIInfo holds API metadata.
type OpenAPIMediaType ¶
type OpenAPIMediaType struct {
Schema *OpenAPISchema `json:"schema,omitempty" yaml:"schema,omitempty"`
}
OpenAPIMediaType describes a media type with schema.
type OpenAPIModule ¶ added in v0.1.6
type OpenAPIModule struct {
// contains filtered or unexported fields
}
OpenAPIModule parses an OpenAPI v3 spec and registers HTTP routes that validate incoming requests against the spec schemas.
func NewOpenAPIModule ¶ added in v0.1.6
func NewOpenAPIModule(name string, cfg OpenAPIConfig) *OpenAPIModule
NewOpenAPIModule creates a new OpenAPIModule with the given name and config.
func (*OpenAPIModule) Dependencies ¶ added in v0.1.6
func (m *OpenAPIModule) Dependencies() []string
Dependencies returns nil; routing is wired via ProvidesServices / Init wiring hooks.
func (*OpenAPIModule) Init ¶ added in v0.1.6
func (m *OpenAPIModule) Init(app modular.Application) error
Init loads and parses the spec file.
func (*OpenAPIModule) Name ¶ added in v0.1.6
func (m *OpenAPIModule) Name() string
Name returns the module name.
func (*OpenAPIModule) ProvidesServices ¶ added in v0.1.6
func (m *OpenAPIModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices exposes this module as an OpenAPIModule service so wiring hooks can find it and register its routes on an HTTP router.
func (*OpenAPIModule) RegisterRoutes ¶ added in v0.1.6
func (m *OpenAPIModule) RegisterRoutes(router HTTPRouter)
RegisterRoutes attaches all spec paths (and optional Swagger UI / spec endpoints) to the given HTTPRouter.
func (*OpenAPIModule) RequiresServices ¶ added in v0.1.6
func (m *OpenAPIModule) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil; router dependency is resolved via wiring hooks.
func (*OpenAPIModule) RouterName ¶ added in v0.1.6
func (m *OpenAPIModule) RouterName() string
RouterName returns the optional explicit router module name to attach routes to.
type OpenAPIOperation ¶
type OpenAPIOperation struct {
Summary string `json:"summary,omitempty" yaml:"summary,omitempty"`
OperationID string `json:"operationId,omitempty" yaml:"operationId,omitempty"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
Parameters []OpenAPIParameter `json:"parameters,omitempty" yaml:"parameters,omitempty"`
RequestBody *OpenAPIRequestBody `json:"requestBody,omitempty" yaml:"requestBody,omitempty"`
Responses map[string]*OpenAPIResponse `json:"responses" yaml:"responses"`
}
OpenAPIOperation describes an API operation.
type OpenAPIParameter ¶
type OpenAPIParameter struct {
Name string `json:"name" yaml:"name"`
In string `json:"in" yaml:"in"` // path, query, header
Required bool `json:"required,omitempty" yaml:"required,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Schema *OpenAPISchema `json:"schema,omitempty" yaml:"schema,omitempty"`
}
OpenAPIParameter describes a path/query/header parameter.
type OpenAPIPath ¶
type OpenAPIPath struct {
Get *OpenAPIOperation `json:"get,omitempty" yaml:"get,omitempty"`
Post *OpenAPIOperation `json:"post,omitempty" yaml:"post,omitempty"`
Put *OpenAPIOperation `json:"put,omitempty" yaml:"put,omitempty"`
Delete *OpenAPIOperation `json:"delete,omitempty" yaml:"delete,omitempty"`
Patch *OpenAPIOperation `json:"patch,omitempty" yaml:"patch,omitempty"`
Options *OpenAPIOperation `json:"options,omitempty" yaml:"options,omitempty"`
}
OpenAPIPath holds operations for a single path.
type OpenAPIRequestBody ¶
type OpenAPIRequestBody struct {
Required bool `json:"required,omitempty" yaml:"required,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Content map[string]*OpenAPIMediaType `json:"content,omitempty" yaml:"content,omitempty"`
}
OpenAPIRequestBody describes a request body.
type OpenAPIResponse ¶
type OpenAPIResponse struct {
Description string `json:"description" yaml:"description"`
Content map[string]*OpenAPIMediaType `json:"content,omitempty" yaml:"content,omitempty"`
}
OpenAPIResponse describes a response.
type OpenAPISchema ¶
type OpenAPISchema struct {
Ref string `json:"$ref,omitempty" yaml:"$ref,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty"`
Format string `json:"format,omitempty" yaml:"format,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Properties map[string]*OpenAPISchema `json:"properties,omitempty" yaml:"properties,omitempty"`
Items *OpenAPISchema `json:"items,omitempty" yaml:"items,omitempty"`
Required []string `json:"required,omitempty" yaml:"required,omitempty"`
Enum []string `json:"enum,omitempty" yaml:"enum,omitempty"`
AdditionalProperties *OpenAPISchema `json:"additionalProperties,omitempty" yaml:"additionalProperties,omitempty"`
Nullable bool `json:"nullable,omitempty" yaml:"nullable,omitempty"`
Example any `json:"example,omitempty" yaml:"example,omitempty"`
}
OpenAPISchema is a minimal JSON Schema subset for OpenAPI.
func SchemaArray ¶
func SchemaArray(items *OpenAPISchema) *OpenAPISchema
SchemaArray returns a schema for an array of the given item schema.
func SchemaRef ¶
func SchemaRef(name string) *OpenAPISchema
SchemaRef returns an OpenAPISchema that is a $ref to a component schema.
type OpenAPIServer ¶
type OpenAPIServer struct {
URL string `json:"url" yaml:"url"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
}
OpenAPIServer describes a server URL.
type OpenAPISpec ¶
type OpenAPISpec struct {
OpenAPI string `json:"openapi" yaml:"openapi"`
Info OpenAPIInfo `json:"info" yaml:"info"`
Servers []OpenAPIServer `json:"servers,omitempty" yaml:"servers,omitempty"`
Paths map[string]*OpenAPIPath `json:"paths" yaml:"paths"`
Components *OpenAPIComponents `json:"components,omitempty" yaml:"components,omitempty"`
}
OpenAPISpec represents a minimal OpenAPI 3.0 specification document.
type OpenAPISwaggerUIConfig ¶ added in v0.1.6
type OpenAPISwaggerUIConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Path string `yaml:"path" json:"path"`
}
OpenAPISwaggerUIConfig controls Swagger UI hosting.
type OpenAPIValidationConfig ¶ added in v0.1.6
type OpenAPIValidationConfig struct {
Request bool `yaml:"request" json:"request"`
Response bool `yaml:"response" json:"response"`
}
OpenAPIValidationConfig controls which request/response parts are validated.
type PatternMatch ¶
type PatternMatch struct {
PatternID string `json:"patternId"`
Events []EventData `json:"events"`
MatchedTime time.Time `json:"matchedTime"`
}
PatternMatch represents a successful pattern match
type PersistenceStore ¶
type PersistenceStore struct {
// contains filtered or unexported fields
}
PersistenceStore provides SQLite-backed persistence for workflow instances, resources, and users.
func NewPersistenceStore ¶
func NewPersistenceStore(name, dbServiceName string) *PersistenceStore
NewPersistenceStore creates a new PersistenceStore module.
func (*PersistenceStore) DeleteResource ¶
func (p *PersistenceStore) DeleteResource(resourceType, id string) error
DeleteResource deletes a resource by type and ID.
func (*PersistenceStore) Init ¶
func (p *PersistenceStore) Init(app modular.Application) error
Init looks up the WorkflowDatabase service and runs schema migrations.
func (*PersistenceStore) LoadResource ¶
func (p *PersistenceStore) LoadResource(resourceType, id string) (map[string]any, error)
LoadResource loads a single resource by type and ID. Returns nil, nil if the resource does not exist.
func (*PersistenceStore) LoadResources ¶
LoadResources loads all resources for a given type, keyed by ID. Encrypted PII fields are decrypted transparently on read.
func (*PersistenceStore) LoadUsers ¶
func (p *PersistenceStore) LoadUsers() ([]UserRecord, error)
LoadUsers loads all user records. Encrypted PII fields (name, email) are decrypted transparently on read.
func (*PersistenceStore) LoadWorkflowInstances ¶
func (p *PersistenceStore) LoadWorkflowInstances(workflowType string) ([]*WorkflowInstance, error)
LoadWorkflowInstances loads all instances for a given workflow type.
func (*PersistenceStore) Name ¶
func (p *PersistenceStore) Name() string
Name returns the module name.
func (*PersistenceStore) Ping ¶
func (p *PersistenceStore) Ping(ctx context.Context) error
Ping verifies the database connection is alive.
func (*PersistenceStore) ProvidesServices ¶
func (p *PersistenceStore) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns services provided by this module.
func (*PersistenceStore) RequiresServices ¶
func (p *PersistenceStore) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module.
func (*PersistenceStore) SaveResource ¶
func (p *PersistenceStore) SaveResource(resourceType, id string, data map[string]any) error
SaveResource upserts a resource. PII fields within the data map are encrypted before writing to SQLite when ENCRYPTION_KEY is set.
func (*PersistenceStore) SaveUser ¶
func (p *PersistenceStore) SaveUser(user UserRecord) error
SaveUser upserts a user record. PII fields (name, email) are encrypted before writing to SQLite when ENCRYPTION_KEY is set.
func (*PersistenceStore) SaveWorkflowInstance ¶
func (p *PersistenceStore) SaveWorkflowInstance(instance *WorkflowInstance) error
SaveWorkflowInstance upserts a workflow instance. PII fields within instance data are encrypted before writing to SQLite when ENCRYPTION_KEY is set.
func (*PersistenceStore) SetDB ¶
func (p *PersistenceStore) SetDB(db *sql.DB)
SetDB sets the underlying database connection directly (useful for testing).
func (*PersistenceStore) SetEncryptor ¶
func (p *PersistenceStore) SetEncryptor(enc *FieldEncryptor)
SetEncryptor sets a custom field encryptor (useful for testing).
type Pipeline ¶
type Pipeline struct {
Name string
Steps []PipelineStep
OnError ErrorStrategy
Timeout time.Duration
Compensation []PipelineStep
Logger *slog.Logger
// Metadata is pre-seeded metadata merged into the PipelineContext.
// Used to pass HTTP context (request/response) for delegate steps.
Metadata map[string]any
// RoutePattern is the original route path pattern (e.g., "/api/v1/admin/companies/{id}")
// used by step.request_parse for path parameter extraction.
RoutePattern string
// EventRecorder is an optional recorder for execution events.
// When nil (the default), no events are recorded. Events are best-effort:
// recording failures are logged but never fail the pipeline.
EventRecorder EventRecorder
// ExecutionID identifies this pipeline execution for event correlation.
// Set by the caller when event recording is desired.
ExecutionID string
// contains filtered or unexported fields
}
Pipeline is an ordered sequence of steps with error handling.
func (*Pipeline) Execute ¶
func (p *Pipeline) Execute(ctx context.Context, triggerData map[string]any) (*PipelineContext, error)
Execute runs the pipeline from trigger data.
func (*Pipeline) Run ¶ added in v0.1.6
Run executes the pipeline and returns the merged result data map. It implements interfaces.PipelineRunner by wrapping Execute and returning PipelineContext.Current so callers need not import PipelineContext.
func (*Pipeline) SetEventRecorder ¶ added in v0.1.6
func (p *Pipeline) SetEventRecorder(recorder interfaces.EventRecorder)
SetEventRecorder sets the event recorder for pipeline execution if one is not already set. This implements part of interfaces.PipelineRunner.
type PipelineContext ¶
type PipelineContext struct {
// TriggerData is the original data from the trigger (immutable after creation).
TriggerData map[string]any
// StepOutputs maps step-name -> output from each completed step.
StepOutputs map[string]map[string]any
// Current is the merged state: trigger data + all step outputs.
// Steps read from Current and their output is merged back into it.
Current map[string]any
// Metadata holds execution metadata (pipeline name, trace ID, etc.)
Metadata map[string]any
}
PipelineContext carries data through a pipeline execution.
func NewPipelineContext ¶
func NewPipelineContext(triggerData map[string]any, metadata map[string]any) *PipelineContext
NewPipelineContext creates a PipelineContext initialized with trigger data.
func (*PipelineContext) MergeStepOutput ¶
func (pc *PipelineContext) MergeStepOutput(stepName string, output map[string]any)
MergeStepOutput records a step's output and merges it into Current.
type PipelineLookupFn ¶ added in v0.1.6
PipelineLookupFn is a function that resolves a named pipeline by name. The engine provides this when building a WorkflowCallStep so the step can locate sibling pipelines at execution time without taking a direct dependency on the engine.
type PipelineStep ¶
type PipelineStep interface {
// Name returns the step's unique name within the pipeline.
Name() string
// Execute runs the step with the pipeline context.
// It receives accumulated data from previous steps and returns
// its own output to be merged into the context.
Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
}
PipelineStep is a single composable unit of work in a pipeline.
type PipelineTracePropagator ¶ added in v0.2.15
type PipelineTracePropagator interface {
// Inject injects the trace context from ctx into the carrier.
Inject(ctx context.Context, carrier propagation.TextMapCarrier) error
// Extract extracts trace context from the carrier and returns an updated context.
Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
}
PipelineTracePropagator defines the interface for propagating trace context across asynchronous messaging boundaries (Kafka, EventBridge, webhooks, HTTP).
type PipelineTracingMiddleware ¶ added in v0.2.15
type PipelineTracingMiddleware struct {
// contains filtered or unexported fields
}
PipelineTracingMiddleware wraps a PipelineStep with OTEL span creation. It creates a child span for each step execution, recording errors automatically.
func NewPipelineTracingMiddleware ¶ added in v0.2.15
func NewPipelineTracingMiddleware(step PipelineStep, tracer trace.Tracer) *PipelineTracingMiddleware
NewPipelineTracingMiddleware wraps the given step with span instrumentation. If tracer is nil, the global tracer provider is used.
func (*PipelineTracingMiddleware) Execute ¶ added in v0.2.15
func (m *PipelineTracingMiddleware) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*PipelineTracingMiddleware) Name ¶ added in v0.2.15
func (m *PipelineTracingMiddleware) Name() string
type PlatformAPIGateway ¶ added in v0.2.14
type PlatformAPIGateway struct {
// contains filtered or unexported fields
}
PlatformAPIGateway manages API gateway provisioning via pluggable backends. Config:
account: name of a cloud.account module (optional for mock) provider: mock | aws name: gateway name stage: deployment stage (dev, staging, prod) cors: CORS configuration routes: list of route definitions
func NewPlatformAPIGateway ¶ added in v0.2.14
func NewPlatformAPIGateway(name string, cfg map[string]any) *PlatformAPIGateway
NewPlatformAPIGateway creates a new PlatformAPIGateway module.
func (*PlatformAPIGateway) Apply ¶ added in v0.2.14
func (m *PlatformAPIGateway) Apply() (*PlatformGatewayState, error)
Apply provisions or updates the gateway.
func (*PlatformAPIGateway) Destroy ¶ added in v0.2.14
func (m *PlatformAPIGateway) Destroy() error
Destroy tears down the gateway.
func (*PlatformAPIGateway) Init ¶ added in v0.2.14
func (m *PlatformAPIGateway) Init(app modular.Application) error
Init resolves the cloud.account service and initialises the backend.
func (*PlatformAPIGateway) Name ¶ added in v0.2.14
func (m *PlatformAPIGateway) Name() string
Name returns the module name.
func (*PlatformAPIGateway) Plan ¶ added in v0.2.14
func (m *PlatformAPIGateway) Plan() (*PlatformGatewayPlan, error)
Plan returns the proposed changes.
func (*PlatformAPIGateway) ProvidesServices ¶ added in v0.2.14
func (m *PlatformAPIGateway) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*PlatformAPIGateway) RequiresServices ¶ added in v0.2.14
func (m *PlatformAPIGateway) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — cloud.account is resolved by name.
func (*PlatformAPIGateway) Status ¶ added in v0.2.14
func (m *PlatformAPIGateway) Status() (any, error)
Status returns the current gateway state.
type PlatformAction ¶ added in v0.2.13
type PlatformAction struct {
Type string `json:"type"` // create, update, delete, noop
Resource string `json:"resource"`
Detail string `json:"detail"`
}
PlatformAction describes a single change within a plan.
type PlatformApplyStep ¶
type PlatformApplyStep struct {
// contains filtered or unexported fields
}
PlatformApplyStep implements a pipeline step that applies a previously generated platform plan. It reads a Plan from the pipeline context, executes each action through the provider's resource drivers, and outputs the resulting resource states.
func (*PlatformApplyStep) Execute ¶
func (s *PlatformApplyStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute applies the plan by executing each action through the provider's resource drivers.
func (*PlatformApplyStep) Name ¶
func (s *PlatformApplyStep) Name() string
Name returns the step name.
type PlatformAutoscaling ¶ added in v0.2.14
type PlatformAutoscaling struct {
// contains filtered or unexported fields
}
PlatformAutoscaling manages autoscaling policies via pluggable backends. Config:
account: name of a cloud.account module (optional for mock) provider: mock | aws policies: list of scaling policy definitions
func NewPlatformAutoscaling ¶ added in v0.2.14
func NewPlatformAutoscaling(name string, cfg map[string]any) *PlatformAutoscaling
NewPlatformAutoscaling creates a new PlatformAutoscaling module.
func (*PlatformAutoscaling) Apply ¶ added in v0.2.14
func (m *PlatformAutoscaling) Apply() (*ScalingState, error)
Apply provisions or updates the autoscaling policies.
func (*PlatformAutoscaling) Destroy ¶ added in v0.2.14
func (m *PlatformAutoscaling) Destroy() error
Destroy removes all autoscaling policies.
func (*PlatformAutoscaling) Init ¶ added in v0.2.14
func (m *PlatformAutoscaling) Init(app modular.Application) error
Init resolves the cloud.account service and initialises the backend.
func (*PlatformAutoscaling) Name ¶ added in v0.2.14
func (m *PlatformAutoscaling) Name() string
Name returns the module name.
func (*PlatformAutoscaling) Plan ¶ added in v0.2.14
func (m *PlatformAutoscaling) Plan() (*ScalingPlan, error)
Plan returns the proposed autoscaling changes.
func (*PlatformAutoscaling) ProvidesServices ¶ added in v0.2.14
func (m *PlatformAutoscaling) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*PlatformAutoscaling) RequiresServices ¶ added in v0.2.14
func (m *PlatformAutoscaling) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — cloud.account is resolved by name.
func (*PlatformAutoscaling) Status ¶ added in v0.2.14
func (m *PlatformAutoscaling) Status() (any, error)
Status returns the current autoscaling state.
type PlatformDNS ¶ added in v0.2.14
type PlatformDNS struct {
// contains filtered or unexported fields
}
PlatformDNS manages DNS zones and records via pluggable backends. Config:
account: name of a cloud.account module (optional) provider: aws (Route53) | mock zone: zone config (name, comment, private, vpcId) records: list of DNS record definitions
func NewPlatformDNS ¶ added in v0.2.14
func NewPlatformDNS(name string, cfg map[string]any) *PlatformDNS
NewPlatformDNS creates a new PlatformDNS module.
func (*PlatformDNS) Apply ¶ added in v0.2.14
func (m *PlatformDNS) Apply() (*DNSState, error)
Apply creates/updates the DNS zone and records.
func (*PlatformDNS) Destroy ¶ added in v0.2.14
func (m *PlatformDNS) Destroy() error
Destroy deletes the DNS zone and all records.
func (*PlatformDNS) Init ¶ added in v0.2.14
func (m *PlatformDNS) Init(app modular.Application) error
Init resolves the cloud.account service and initialises the backend.
func (*PlatformDNS) Name ¶ added in v0.2.14
func (m *PlatformDNS) Name() string
Name returns the module name.
func (*PlatformDNS) Plan ¶ added in v0.2.14
func (m *PlatformDNS) Plan() (*DNSPlan, error)
Plan returns the DNS changes needed to reach desired state.
func (*PlatformDNS) ProvidesServices ¶ added in v0.2.14
func (m *PlatformDNS) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*PlatformDNS) RequiresServices ¶ added in v0.2.14
func (m *PlatformDNS) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — cloud.account is resolved by name.
func (*PlatformDNS) Status ¶ added in v0.2.14
func (m *PlatformDNS) Status() (*DNSState, error)
Status returns the current DNS zone state.
type PlatformDOApp ¶ added in v0.2.15
type PlatformDOApp struct {
// contains filtered or unexported fields
}
PlatformDOApp manages DigitalOcean App Platform applications. Config:
account: name of a cloud.account module (provider=digitalocean) provider: digitalocean | mock name: app name region: DO region slug (e.g. nyc) image: container image reference instances: number of instances (default: 1) http_port: container HTTP port (default: 8080) envs: environment variables map
func NewPlatformDOApp ¶ added in v0.2.15
func NewPlatformDOApp(name string, cfg map[string]any) *PlatformDOApp
NewPlatformDOApp creates a new PlatformDOApp module.
func (*PlatformDOApp) Deploy ¶ added in v0.2.15
func (m *PlatformDOApp) Deploy() (*DOAppState, error)
Deploy deploys the application to App Platform.
func (*PlatformDOApp) Destroy ¶ added in v0.2.15
func (m *PlatformDOApp) Destroy() error
Destroy tears down the application.
func (*PlatformDOApp) Init ¶ added in v0.2.15
func (m *PlatformDOApp) Init(app modular.Application) error
Init resolves the cloud.account service and initializes the backend.
func (*PlatformDOApp) Logs ¶ added in v0.2.15
func (m *PlatformDOApp) Logs() (string, error)
Logs retrieves recent application logs.
func (*PlatformDOApp) Name ¶ added in v0.2.15
func (m *PlatformDOApp) Name() string
Name returns the module name.
func (*PlatformDOApp) ProvidesServices ¶ added in v0.2.15
func (m *PlatformDOApp) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*PlatformDOApp) RequiresServices ¶ added in v0.2.15
func (m *PlatformDOApp) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil.
func (*PlatformDOApp) Scale ¶ added in v0.2.15
func (m *PlatformDOApp) Scale(instances int) (*DOAppState, error)
Scale sets the number of app instances.
func (*PlatformDOApp) Status ¶ added in v0.2.15
func (m *PlatformDOApp) Status() (*DOAppState, error)
Status returns the current app deployment state.
type PlatformDODNS ¶ added in v0.2.15
type PlatformDODNS struct {
// contains filtered or unexported fields
}
PlatformDODNS manages DigitalOcean domains and DNS records. Config:
account: name of a cloud.account module (provider=digitalocean) provider: digitalocean | mock domain: domain name (e.g. example.com) records: list of DNS record definitions (name, type, data, ttl)
func NewPlatformDODNS ¶ added in v0.2.15
func NewPlatformDODNS(name string, cfg map[string]any) *PlatformDODNS
NewPlatformDODNS creates a new PlatformDODNS module.
func (*PlatformDODNS) Apply ¶ added in v0.2.15
func (m *PlatformDODNS) Apply() (*DODNSState, error)
Apply creates or updates the domain and records.
func (*PlatformDODNS) Destroy ¶ added in v0.2.15
func (m *PlatformDODNS) Destroy() error
Destroy deletes the domain and all records.
func (*PlatformDODNS) Init ¶ added in v0.2.15
func (m *PlatformDODNS) Init(app modular.Application) error
Init resolves the cloud.account service and initializes the backend.
func (*PlatformDODNS) Name ¶ added in v0.2.15
func (m *PlatformDODNS) Name() string
Name returns the module name.
func (*PlatformDODNS) Plan ¶ added in v0.2.15
func (m *PlatformDODNS) Plan() (*DODNSPlan, error)
Plan returns the planned DNS changes.
func (*PlatformDODNS) ProvidesServices ¶ added in v0.2.15
func (m *PlatformDODNS) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*PlatformDODNS) RequiresServices ¶ added in v0.2.15
func (m *PlatformDODNS) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil.
func (*PlatformDODNS) Status ¶ added in v0.2.15
func (m *PlatformDODNS) Status() (*DODNSState, error)
Status returns the current DNS state.
type PlatformDOKS ¶ added in v0.2.15
type PlatformDOKS struct {
// contains filtered or unexported fields
}
PlatformDOKS manages DigitalOcean Kubernetes (DOKS) clusters. Config:
account: name of a cloud.account module (provider=digitalocean) cluster_name: DOKS cluster name region: DO region slug (e.g. nyc3) version: Kubernetes version slug (e.g. 1.29.1-do.0) node_pool: node pool config (size, count, auto_scale, min_nodes, max_nodes)
func NewPlatformDOKS ¶ added in v0.2.15
func NewPlatformDOKS(name string, cfg map[string]any) *PlatformDOKS
NewPlatformDOKS creates a new PlatformDOKS module.
func (*PlatformDOKS) Create ¶ added in v0.2.15
func (m *PlatformDOKS) Create() (*DOKSClusterState, error)
Create creates the DOKS cluster.
func (*PlatformDOKS) Delete ¶ added in v0.2.15
func (m *PlatformDOKS) Delete() error
Delete removes the DOKS cluster.
func (*PlatformDOKS) Get ¶ added in v0.2.15
func (m *PlatformDOKS) Get() (*DOKSClusterState, error)
Get returns the current cluster state.
func (*PlatformDOKS) Init ¶ added in v0.2.15
func (m *PlatformDOKS) Init(app modular.Application) error
Init resolves the cloud.account service and initializes the backend.
func (*PlatformDOKS) ListNodePools ¶ added in v0.2.15
func (m *PlatformDOKS) ListNodePools() ([]DOKSNodePoolState, error)
ListNodePools returns the node pools for the cluster.
func (*PlatformDOKS) Name ¶ added in v0.2.15
func (m *PlatformDOKS) Name() string
Name returns the module name.
func (*PlatformDOKS) ProvidesServices ¶ added in v0.2.15
func (m *PlatformDOKS) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*PlatformDOKS) RequiresServices ¶ added in v0.2.15
func (m *PlatformDOKS) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil.
type PlatformDONetworking ¶ added in v0.2.15
type PlatformDONetworking struct {
// contains filtered or unexported fields
}
PlatformDONetworking manages DigitalOcean VPCs, firewalls, and load balancers. Config:
account: name of a cloud.account module (provider=digitalocean) provider: digitalocean | mock vpc: vpc config (name, region, ip_range) firewalls: list of firewall configs
func NewPlatformDONetworking ¶ added in v0.2.15
func NewPlatformDONetworking(name string, cfg map[string]any) *PlatformDONetworking
NewPlatformDONetworking creates a new PlatformDONetworking module.
func (*PlatformDONetworking) Apply ¶ added in v0.2.15
func (m *PlatformDONetworking) Apply() (*DOVPCState, error)
Apply creates or updates the VPC and firewalls.
func (*PlatformDONetworking) Destroy ¶ added in v0.2.15
func (m *PlatformDONetworking) Destroy() error
Destroy deletes the VPC and associated resources.
func (*PlatformDONetworking) Init ¶ added in v0.2.15
func (m *PlatformDONetworking) Init(app modular.Application) error
Init resolves the cloud.account service and initializes the backend.
func (*PlatformDONetworking) Name ¶ added in v0.2.15
func (m *PlatformDONetworking) Name() string
Name returns the module name.
func (*PlatformDONetworking) Plan ¶ added in v0.2.15
func (m *PlatformDONetworking) Plan() (*DONetworkPlan, error)
Plan returns the planned networking changes.
func (*PlatformDONetworking) ProvidesServices ¶ added in v0.2.15
func (m *PlatformDONetworking) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*PlatformDONetworking) RequiresServices ¶ added in v0.2.15
func (m *PlatformDONetworking) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil.
func (*PlatformDONetworking) Status ¶ added in v0.2.15
func (m *PlatformDONetworking) Status() (*DOVPCState, error)
Status returns the current VPC state.
type PlatformDestroyStep ¶
type PlatformDestroyStep struct {
// contains filtered or unexported fields
}
PlatformDestroyStep implements a pipeline step that destroys previously provisioned resources. It reads resource outputs from the pipeline context and calls the provider's resource driver Delete method for each.
func (*PlatformDestroyStep) Execute ¶
func (s *PlatformDestroyStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute destroys each resource by calling Delete on the provider's resource driver.
func (*PlatformDestroyStep) Name ¶
func (s *PlatformDestroyStep) Name() string
Name returns the step name.
type PlatformECS ¶ added in v0.2.14
type PlatformECS struct {
// contains filtered or unexported fields
}
PlatformECS manages AWS ECS/Fargate services via pluggable backends. Config:
account: name of a cloud.account module (resolved from service registry) cluster: ECS cluster name region: AWS region (e.g. us-east-1) launch_type: FARGATE or EC2 (default: FARGATE) vpc_subnets: list of subnet IDs security_groups: list of security group IDs
func NewPlatformECS ¶ added in v0.2.14
func NewPlatformECS(name string, cfg map[string]any) *PlatformECS
NewPlatformECS creates a new PlatformECS module.
func (*PlatformECS) Apply ¶ added in v0.2.14
func (m *PlatformECS) Apply() (*PlatformResult, error)
Apply creates or updates the ECS task definition and service.
func (*PlatformECS) Destroy ¶ added in v0.2.14
func (m *PlatformECS) Destroy() error
Destroy deletes the ECS service and task definition.
func (*PlatformECS) Init ¶ added in v0.2.14
func (m *PlatformECS) Init(app modular.Application) error
Init resolves the cloud.account service and initialises the backend.
func (*PlatformECS) Name ¶ added in v0.2.14
func (m *PlatformECS) Name() string
Name returns the module name.
func (*PlatformECS) Plan ¶ added in v0.2.14
func (m *PlatformECS) Plan() (*PlatformPlan, error)
Plan returns the changes that would be made to bring the ECS service to desired state.
func (*PlatformECS) ProvidesServices ¶ added in v0.2.14
func (m *PlatformECS) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*PlatformECS) RequiresServices ¶ added in v0.2.14
func (m *PlatformECS) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — cloud.account is resolved by name, not declared.
func (*PlatformECS) Status ¶ added in v0.2.14
func (m *PlatformECS) Status() (any, error)
Status returns the current ECS service state.
type PlatformGatewayCORSConfig ¶ added in v0.2.14
type PlatformGatewayCORSConfig struct {
AllowOrigins []string `json:"allowOrigins"`
AllowMethods []string `json:"allowMethods"`
AllowHeaders []string `json:"allowHeaders"`
}
PlatformGatewayCORSConfig holds CORS settings for a provisioned API gateway.
type PlatformGatewayPlan ¶ added in v0.2.14
type PlatformGatewayPlan struct {
Name string `json:"name"`
Stage string `json:"stage"`
Routes []PlatformGatewayRoute `json:"routes"`
CORS *PlatformGatewayCORSConfig `json:"cors,omitempty"`
Changes []string `json:"changes"`
}
PlatformGatewayPlan describes the changes needed to reach desired gateway state.
type PlatformGatewayRoute ¶ added in v0.2.14
type PlatformGatewayRoute struct {
Path string `json:"path"`
Method string `json:"method"`
Target string `json:"target"`
RateLimit int `json:"rateLimit"`
AuthType string `json:"authType"` // none, api_key, jwt
}
PlatformGatewayRoute describes a single route managed by the API gateway provisioner.
type PlatformGatewayState ¶ added in v0.2.14
type PlatformGatewayState struct {
ID string `json:"id"`
Name string `json:"name"`
Endpoint string `json:"endpoint"`
Stage string `json:"stage"`
Routes []PlatformGatewayRoute `json:"routes"`
CORS *PlatformGatewayCORSConfig `json:"cors,omitempty"`
Status string `json:"status"` // pending, active, updating, deleted
}
PlatformGatewayState represents the current state of a provisioned API gateway.
type PlatformKubernetes ¶ added in v0.2.13
type PlatformKubernetes struct {
// contains filtered or unexported fields
}
PlatformKubernetes manages Kubernetes clusters via pluggable backends. Config:
account: name of a cloud.account module (resolved from service registry) type: backend type: eks | gke | aks | kind | k3s version: Kubernetes version (e.g. "1.29") nodeGroups: list of node group definitions
func NewPlatformKubernetes ¶ added in v0.2.13
func NewPlatformKubernetes(name string, cfg map[string]any) *PlatformKubernetes
NewPlatformKubernetes creates a new PlatformKubernetes module.
func (*PlatformKubernetes) Apply ¶ added in v0.2.13
func (m *PlatformKubernetes) Apply() (*PlatformResult, error)
Apply makes the cluster match the desired configuration.
func (*PlatformKubernetes) Destroy ¶ added in v0.2.13
func (m *PlatformKubernetes) Destroy() error
Destroy tears down the cluster.
func (*PlatformKubernetes) Init ¶ added in v0.2.13
func (m *PlatformKubernetes) Init(app modular.Application) error
Init resolves the cloud.account service and initialises the backend.
func (*PlatformKubernetes) Name ¶ added in v0.2.13
func (m *PlatformKubernetes) Name() string
Name returns the module name.
func (*PlatformKubernetes) Plan ¶ added in v0.2.13
func (m *PlatformKubernetes) Plan() (*PlatformPlan, error)
Plan returns the changes that would be made to bring the cluster to desired state.
func (*PlatformKubernetes) ProvidesServices ¶ added in v0.2.13
func (m *PlatformKubernetes) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*PlatformKubernetes) RequiresServices ¶ added in v0.2.13
func (m *PlatformKubernetes) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — cloud.account is resolved by name, not declared.
func (*PlatformKubernetes) Status ¶ added in v0.2.13
func (m *PlatformKubernetes) Status() (any, error)
Status returns the current cluster state.
type PlatformNetworking ¶ added in v0.2.14
type PlatformNetworking struct {
// contains filtered or unexported fields
}
PlatformNetworking manages VPC/subnet/security-group resources via pluggable backends. Config:
account: name of a cloud.account module (optional for mock) provider: mock | aws | gcp | azure vpc: VPC config (cidr, name) subnets: list of subnet definitions nat_gateway: bool — provision a NAT gateway security_groups: list of security group definitions
func NewPlatformNetworking ¶ added in v0.2.14
func NewPlatformNetworking(name string, cfg map[string]any) *PlatformNetworking
NewPlatformNetworking creates a new PlatformNetworking module.
func (*PlatformNetworking) Apply ¶ added in v0.2.14
func (m *PlatformNetworking) Apply() (*NetworkState, error)
Apply provisions the VPC/subnets/security groups.
func (*PlatformNetworking) Destroy ¶ added in v0.2.14
func (m *PlatformNetworking) Destroy() error
Destroy tears down the VPC and all associated resources.
func (*PlatformNetworking) Init ¶ added in v0.2.14
func (m *PlatformNetworking) Init(app modular.Application) error
Init resolves the cloud.account service and initialises the backend.
func (*PlatformNetworking) Name ¶ added in v0.2.14
func (m *PlatformNetworking) Name() string
Name returns the module name.
func (*PlatformNetworking) Plan ¶ added in v0.2.14
func (m *PlatformNetworking) Plan() (*NetworkPlan, error)
Plan returns the changes that would be made to bring the network to desired state.
func (*PlatformNetworking) ProvidesServices ¶ added in v0.2.14
func (m *PlatformNetworking) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*PlatformNetworking) RequiresServices ¶ added in v0.2.14
func (m *PlatformNetworking) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — cloud.account is resolved by name, not declared.
func (*PlatformNetworking) Status ¶ added in v0.2.14
func (m *PlatformNetworking) Status() (any, error)
Status returns the current network state.
type PlatformPlan ¶ added in v0.2.13
type PlatformPlan struct {
Provider string `json:"provider"`
Resource string `json:"resource"`
Actions []PlatformAction `json:"actions"`
}
PlatformPlan describes the changes a platform module intends to make.
type PlatformPlanStep ¶
type PlatformPlanStep struct {
// contains filtered or unexported fields
}
PlatformPlanStep implements a pipeline step that generates an execution plan by mapping capability declarations through a platform provider. It reads capability declarations from the pipeline context, calls the provider's MapCapability method, and produces a platform.Plan in the pipeline context.
func (*PlatformPlanStep) Execute ¶
func (s *PlatformPlanStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute generates a platform plan by mapping capability declarations through the provider.
func (*PlatformPlanStep) Name ¶
func (s *PlatformPlanStep) Name() string
Name returns the step name.
type PlatformProvider ¶ added in v0.2.13
type PlatformProvider interface {
Plan() (*PlatformPlan, error)
Apply() (*PlatformResult, error)
Status() (any, error)
Destroy() error
}
PlatformProvider is implemented by infrastructure modules that manage cloud resources. It provides a generic lifecycle interface for plan → apply → status → destroy.
type PlatformResult ¶ added in v0.2.13
type PlatformResult struct {
Success bool `json:"success"`
Message string `json:"message"`
State any `json:"state"`
}
PlatformResult is returned from Apply.
type PlatformTemplateStep ¶
type PlatformTemplateStep struct {
// contains filtered or unexported fields
}
PlatformTemplateStep is a pipeline step that resolves a platform template with parameters and outputs the resulting CapabilityDeclarations.
func (*PlatformTemplateStep) Execute ¶
func (s *PlatformTemplateStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute resolves the configured template with parameters and outputs the resolved CapabilityDeclarations under the "resolved_resources" key.
func (*PlatformTemplateStep) Name ¶
func (s *PlatformTemplateStep) Name() string
Name returns the step name.
type PluginSpec ¶ added in v0.2.6
PluginSpec describes a plugin binary to include in the built image.
type PolicyDecision ¶ added in v0.2.15
type PolicyDecision struct {
Allowed bool `json:"allowed"`
Reasons []string `json:"reasons,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
PolicyDecision is the result of a policy evaluation.
type PolicyEngine ¶ added in v0.2.15
type PolicyEngine interface {
Evaluate(ctx context.Context, input map[string]any) (*PolicyDecision, error)
LoadPolicy(name, content string) error
ListPolicies() []PolicyInfo
}
PolicyEngine is the interface implemented by all policy backends.
type PolicyEngineModule ¶ added in v0.2.15
type PolicyEngineModule struct {
// contains filtered or unexported fields
}
PolicyEngineModule is a workflow module wrapping a pluggable PolicyEngine backend. Supported backends: "mock", "opa", "cedar".
func NewPolicyEngineModule ¶ added in v0.2.15
func NewPolicyEngineModule(name string, cfg map[string]any) *PolicyEngineModule
NewPolicyEngineModule creates a new PolicyEngineModule.
func (*PolicyEngineModule) Backend ¶ added in v0.2.15
func (m *PolicyEngineModule) Backend() string
Backend returns the configured backend name.
func (*PolicyEngineModule) Engine ¶ added in v0.2.15
func (m *PolicyEngineModule) Engine() PolicyEngine
Engine returns the underlying PolicyEngine for direct use by pipeline steps.
func (*PolicyEngineModule) Init ¶ added in v0.2.15
func (m *PolicyEngineModule) Init(app modular.Application) error
Init initialises the backend and registers the module as a service.
func (*PolicyEngineModule) Name ¶ added in v0.2.15
func (m *PolicyEngineModule) Name() string
Name returns the module name.
func (*PolicyEngineModule) ProvidesServices ¶ added in v0.2.15
func (m *PolicyEngineModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides.
func (*PolicyEngineModule) RequiresServices ¶ added in v0.2.15
func (m *PolicyEngineModule) RequiresServices() []modular.ServiceDependency
RequiresServices returns nil — policy.engine has no required service dependencies.
type PolicyEvaluateStep ¶ added in v0.2.15
type PolicyEvaluateStep struct {
// contains filtered or unexported fields
}
PolicyEvaluateStep evaluates a policy decision from the pipeline context.
func (*PolicyEvaluateStep) Execute ¶ added in v0.2.15
func (s *PolicyEvaluateStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*PolicyEvaluateStep) Name ¶ added in v0.2.15
func (s *PolicyEvaluateStep) Name() string
type PolicyInfo ¶ added in v0.2.15
type PolicyInfo struct {
Name string `json:"name"`
Backend string `json:"backend"`
Content string `json:"content"`
}
PolicyInfo describes a loaded policy.
type PolicyListStep ¶ added in v0.2.15
type PolicyListStep struct {
// contains filtered or unexported fields
}
PolicyListStep lists all registered policies in the engine.
func (*PolicyListStep) Execute ¶ added in v0.2.15
func (s *PolicyListStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*PolicyListStep) Name ¶ added in v0.2.15
func (s *PolicyListStep) Name() string
type PolicyLoadStep ¶ added in v0.2.15
type PolicyLoadStep struct {
// contains filtered or unexported fields
}
PolicyLoadStep loads a policy document into the engine.
func (*PolicyLoadStep) Execute ¶ added in v0.2.15
func (s *PolicyLoadStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
func (*PolicyLoadStep) Name ¶ added in v0.2.15
func (s *PolicyLoadStep) Name() string
type PolicyTestStep ¶ added in v0.2.15
type PolicyTestStep struct {
// contains filtered or unexported fields
}
PolicyTestStep evaluates a policy against sample inputs (dry-run).
func (*PolicyTestStep) Execute ¶ added in v0.2.15
func (s *PolicyTestStep) Execute(ctx context.Context, _ *PipelineContext) (*StepResult, error)
func (*PolicyTestStep) Name ¶ added in v0.2.15
func (s *PolicyTestStep) Name() string
type PortAllocator ¶
type PortAllocator struct {
// contains filtered or unexported fields
}
PortAllocator manages automatic port allocation for deployed workflows.
func NewPortAllocator ¶
func NewPortAllocator(basePort int) *PortAllocator
NewPortAllocator creates a new port allocator starting from the given base port.
func (*PortAllocator) Allocate ¶
func (p *PortAllocator) Allocate(name string) (int, error)
Allocate assigns the next available port to the named workflow.
func (*PortAllocator) AllocatedPorts ¶
func (p *PortAllocator) AllocatedPorts() map[int]string
AllocatedPorts returns a copy of the current port-to-workflow mapping.
func (*PortAllocator) ExcludePort ¶
func (p *PortAllocator) ExcludePort(port int, name string)
ExcludePort marks a port as permanently taken (e.g., the admin server port).
func (*PortAllocator) Release ¶
func (p *PortAllocator) Release(name string)
Release frees all ports allocated to the named workflow. It also resets nextPort so freed ports can be reused on the next allocation.
type ProcessingStep ¶
type ProcessingStep struct {
// contains filtered or unexported fields
}
ProcessingStep bridges dynamic components to state machine transitions. It implements TransitionHandler, wrapping an Executor with retry and compensation logic.
func NewProcessingStep ¶
func NewProcessingStep(name string, config ProcessingStepConfig) *ProcessingStep
NewProcessingStep creates a new ProcessingStep module.
func (*ProcessingStep) HandleTransition ¶
func (ps *ProcessingStep) HandleTransition(ctx context.Context, event TransitionEvent) error
HandleTransition implements the TransitionHandler interface. It executes the wrapped dynamic component with retry and exponential backoff.
func (*ProcessingStep) Init ¶
func (ps *ProcessingStep) Init(app modular.Application) error
Init resolves dependencies from the service registry. Note: service registration is handled by ProvidesServices() — the framework calls it after Init completes, so we don't register here.
func (*ProcessingStep) ProvidesServices ¶
func (ps *ProcessingStep) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the service provided by this module.
func (*ProcessingStep) RequiresServices ¶
func (ps *ProcessingStep) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module.
type ProcessingStepConfig ¶
type ProcessingStepConfig struct {
ComponentID string // service name to look up in registry
SuccessTransition string // transition to fire on success
CompensateTransition string // transition to fire on permanent failure
MaxRetries int // default 2
RetryBackoffMs int // base backoff in ms, default 1000
TimeoutSeconds int // per-attempt timeout, default 30
}
ProcessingStepConfig holds configuration for a processing step module.
type PublishStep ¶
type PublishStep struct {
// contains filtered or unexported fields
}
PublishStep publishes data to an EventBus topic or a MessageBroker.
func (*PublishStep) Execute ¶
func (s *PublishStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute resolves the payload templates and publishes to the configured target.
type QueryHandler ¶
type QueryHandler struct {
// contains filtered or unexported fields
}
QueryHandler dispatches GET requests to named query functions. Each query is registered by name and dispatched by extracting the last path segment from the request URL. Route pipelines can be attached for composable per-route processing. A delegate service can be configured to handle requests that don't match any registered query name.
func NewQueryHandler ¶
func NewQueryHandler(name string) *QueryHandler
NewQueryHandler creates a new QueryHandler with the given name.
func (*QueryHandler) Handle ¶
func (h *QueryHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle dispatches an HTTP request to the appropriate query function.
func (*QueryHandler) Init ¶
func (h *QueryHandler) Init(app modular.Application) error
Init initializes the query handler and resolves the delegate service.
func (*QueryHandler) Name ¶
func (h *QueryHandler) Name() string
Name returns the unique identifier for this module.
func (*QueryHandler) ProvidesServices ¶
func (h *QueryHandler) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns a list of services provided by this module.
func (*QueryHandler) RegisterQuery ¶
func (h *QueryHandler) RegisterQuery(name string, fn QueryFunc)
RegisterQuery adds a named query function to the handler.
func (*QueryHandler) RequiresServices ¶
func (h *QueryHandler) RequiresServices() []modular.ServiceDependency
RequiresServices returns a list of services required by this module.
func (*QueryHandler) ResolveDelegatePostStart ¶
func (h *QueryHandler) ResolveDelegatePostStart()
ResolveDelegatePostStart is called after engine.Start to resolve delegates that may not have been available during Init (e.g., services registered by post-start hooks).
func (*QueryHandler) ServeHTTP ¶
func (h *QueryHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface. It looks up a route pipeline by the full "METHOD /path" pattern (set by Go 1.22+ ServeMux), falling back to the last path segment for backward compatibility with registered queries. Dispatch chain: RegisteredQueryFunc -> RoutePipeline -> DelegateHandler -> 404
func (*QueryHandler) SetDelegate ¶
func (h *QueryHandler) SetDelegate(name string)
SetDelegate sets the delegate service name. The service must implement http.Handler and will be resolved from the service registry during Init.
func (*QueryHandler) SetDelegateHandler ¶
func (h *QueryHandler) SetDelegateHandler(handler http.Handler)
SetDelegateHandler directly sets the HTTP handler used for delegation.
func (*QueryHandler) SetExecutionTracker ¶
func (h *QueryHandler) SetExecutionTracker(t ExecutionTrackerProvider)
SetExecutionTracker sets the execution tracker for recording pipeline executions.
func (*QueryHandler) SetRoutePipeline ¶
func (h *QueryHandler) SetRoutePipeline(routePath string, pipeline interfaces.PipelineRunner)
SetRoutePipeline attaches a pipeline to a specific route path.
type QueryResult ¶
type QueryResult struct {
Columns []string `json:"columns"`
Rows []map[string]any `json:"rows"`
Count int `json:"count"`
}
QueryResult represents the result of a query
type RESTAPIHandler ¶
type RESTAPIHandler struct {
WorkflowConfig
// contains filtered or unexported fields
}
RESTAPIHandler provides CRUD operations for a REST API
func NewRESTAPIHandler ¶
func NewRESTAPIHandler(name, resourceName string) *RESTAPIHandler
NewRESTAPIHandler creates a new REST API handler
func (*RESTAPIHandler) Constructor ¶
func (h *RESTAPIHandler) Constructor() modular.ModuleConstructor
Constructor returns a function to construct this module with dependencies
func (*RESTAPIHandler) Handle ¶
func (h *RESTAPIHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle implements the HTTPHandler interface
func (*RESTAPIHandler) Init ¶
func (h *RESTAPIHandler) Init(app modular.Application) error
Init initializes the module with the application context
func (*RESTAPIHandler) Name ¶
func (h *RESTAPIHandler) Name() string
Name returns the unique identifier for this module
func (*RESTAPIHandler) ProvidesServices ¶
func (h *RESTAPIHandler) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module
func (*RESTAPIHandler) RequiresServices ¶
func (h *RESTAPIHandler) RequiresServices() []modular.ServiceDependency
RequiresServices returns the services required by this module
func (*RESTAPIHandler) SetFieldMapping ¶
func (h *RESTAPIHandler) SetFieldMapping(fm *FieldMapping)
SetFieldMapping sets a custom field mapping, merged on top of defaults.
func (*RESTAPIHandler) SetInitialTransition ¶
func (h *RESTAPIHandler) SetInitialTransition(t string)
SetInitialTransition sets the first transition to trigger after creating a workflow instance.
func (*RESTAPIHandler) SetInstanceIDPrefix ¶
func (h *RESTAPIHandler) SetInstanceIDPrefix(prefix string)
SetInstanceIDPrefix sets the prefix used to build state machine instance IDs.
func (*RESTAPIHandler) SetSeedFile ¶
func (h *RESTAPIHandler) SetSeedFile(path string)
SetSeedFile sets the path to a JSON seed data file.
func (*RESTAPIHandler) SetSourceResourceName ¶
func (h *RESTAPIHandler) SetSourceResourceName(name string)
SetSourceResourceName sets a different resource name for read operations (e.g., queue reads from conversations).
func (*RESTAPIHandler) SetStateFilter ¶
func (h *RESTAPIHandler) SetStateFilter(state string)
SetStateFilter restricts GET responses to resources matching the given state.
func (*RESTAPIHandler) SetSummaryFields ¶
func (h *RESTAPIHandler) SetSummaryFields(fields []string)
SetSummaryFields sets the list of fields to include in summary responses.
func (*RESTAPIHandler) SetTransitionMap ¶
func (h *RESTAPIHandler) SetTransitionMap(tm map[string]string)
SetTransitionMap sets a custom sub-action to transition name mapping.
func (*RESTAPIHandler) SetWorkflowEngine ¶
func (h *RESTAPIHandler) SetWorkflowEngine(we string)
SetWorkflowEngine sets the name of the workflow engine service to use.
func (*RESTAPIHandler) SetWorkflowType ¶
func (h *RESTAPIHandler) SetWorkflowType(wt string)
SetWorkflowType sets the workflow type for state machine operations.
type RESTAPIHandlerConfig ¶
type RESTAPIHandlerConfig struct {
ResourceName string `json:"resourceName" yaml:"resourceName"`
WorkflowType string `json:"workflowType" yaml:"workflowType"` // The type of workflow to use for state machine operations
WorkflowEngine string `json:"workflowEngine" yaml:"workflowEngine"` // The name of the workflow engine to use
InitialTransition string `json:"initialTransition" yaml:"initialTransition"` // First transition to trigger after creating a workflow instance
InstanceIDPrefix string `json:"instanceIDPrefix" yaml:"instanceIDPrefix"` // Optional prefix for workflow instance IDs
InstanceIDField string `json:"instanceIDField" yaml:"instanceIDField"` // Field in resource data to use for instance ID (defaults to "id")
SeedFile string `json:"seedFile" yaml:"seedFile"` // Path to JSON seed data file
SourceResourceName string `json:"sourceResourceName" yaml:"sourceResourceName"` // Read from a different resource's persistence data
StateFilter string `json:"stateFilter" yaml:"stateFilter"` // Only include resources matching this state in GET responses
}
RESTAPIHandlerConfig contains configuration for a REST API handler
type RESTResource ¶
type RESTResource struct {
ID string `json:"id"`
Data map[string]any `json:"data"`
State string `json:"state,omitempty"`
LastUpdate string `json:"lastUpdate,omitempty"`
}
RESTResource represents a simple in-memory resource store for REST APIs
type RateLimitConfig ¶
type RateLimitConfig struct {
RequestsPerMinute int `json:"requestsPerMinute"`
BurstSize int `json:"burstSize"`
}
RateLimitConfig defines rate limiting parameters.
type RateLimitMiddleware ¶
type RateLimitMiddleware struct {
// contains filtered or unexported fields
}
RateLimitMiddleware implements a rate limiting middleware
func NewRateLimitMiddleware ¶
func NewRateLimitMiddleware(name string, requestsPerMinute, burstSize int) *RateLimitMiddleware
NewRateLimitMiddleware creates a new rate limiting middleware with IP-based strategy.
func NewRateLimitMiddlewareWithHourlyRate ¶ added in v0.1.6
func NewRateLimitMiddlewareWithHourlyRate(name string, requestsPerHour, burstSize int) *RateLimitMiddleware
NewRateLimitMiddlewareWithHourlyRate creates a rate limiting middleware using a per-hour rate. Useful for low-frequency endpoints like registration where fractional per-minute rates are needed.
func NewRateLimitMiddlewareWithStrategy ¶
func NewRateLimitMiddlewareWithStrategy(name string, requestsPerMinute, burstSize int, strategy RateLimitStrategy) *RateLimitMiddleware
NewRateLimitMiddlewareWithStrategy creates a rate limiting middleware with a specific client identification strategy.
func (*RateLimitMiddleware) Init ¶
func (m *RateLimitMiddleware) Init(app modular.Application) error
Init initializes the middleware
func (*RateLimitMiddleware) Name ¶
func (m *RateLimitMiddleware) Name() string
Name returns the module name
func (*RateLimitMiddleware) Process ¶
func (m *RateLimitMiddleware) Process(next http.Handler) http.Handler
Process implements middleware processing
func (*RateLimitMiddleware) ProvidesServices ¶
func (m *RateLimitMiddleware) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this middleware
func (*RateLimitMiddleware) RequiresServices ¶
func (m *RateLimitMiddleware) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this middleware
func (*RateLimitMiddleware) SetTokenHeader ¶
func (m *RateLimitMiddleware) SetTokenHeader(header string)
SetTokenHeader sets a custom header name for token-based rate limiting.
func (*RateLimitMiddleware) Start ¶
func (m *RateLimitMiddleware) Start(_ context.Context) error
Start begins the stale client cleanup goroutine.
func (*RateLimitMiddleware) Stop ¶
func (m *RateLimitMiddleware) Stop(_ context.Context) error
Stop terminates the cleanup goroutine.
func (*RateLimitMiddleware) Strategy ¶
func (m *RateLimitMiddleware) Strategy() RateLimitStrategy
Strategy returns the current rate limiting strategy.
type RateLimitStep ¶
type RateLimitStep struct {
// contains filtered or unexported fields
}
RateLimitStep is a pipeline step that enforces rate limiting using a token bucket algorithm. Requests that exceed the limit are rejected with an error.
func (*RateLimitStep) Execute ¶
func (s *RateLimitStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute checks rate limiting for the resolved key and either allows or rejects the request.
type RateLimitStrategy ¶
type RateLimitStrategy string
RateLimitStrategy controls how clients are identified for rate limiting.
const ( // RateLimitByIP identifies clients by their IP address (default). RateLimitByIP RateLimitStrategy = "ip" // RateLimitByToken identifies clients by the Authorization header token. RateLimitByToken RateLimitStrategy = "token" // RateLimitByIPAndToken uses both IP and token for identification. RateLimitByIPAndToken RateLimitStrategy = "ip_and_token" )
type ReconciliationTrigger ¶
type ReconciliationTrigger struct {
// contains filtered or unexported fields
}
ReconciliationTrigger implements the Trigger interface for periodic drift detection. It launches a platform.Reconciler in a background goroutine that compares stored state with live provider state.
func NewReconciliationTrigger ¶
func NewReconciliationTrigger() *ReconciliationTrigger
NewReconciliationTrigger creates a new reconciliation trigger.
func (*ReconciliationTrigger) Configure ¶
func (t *ReconciliationTrigger) Configure(app modular.Application, triggerConfig any) error
Configure sets up the trigger from its YAML configuration. Expected config keys:
- interval: duration string (e.g., "5m", "30s")
- context_path: the platform context path to reconcile
- provider_service: optional service name of the provider to use
func (*ReconciliationTrigger) Dependencies ¶
func (t *ReconciliationTrigger) Dependencies() []string
Dependencies returns nil; the trigger discovers services at configure time.
func (*ReconciliationTrigger) Init ¶
func (t *ReconciliationTrigger) Init(app modular.Application) error
Init registers the trigger as a service.
func (*ReconciliationTrigger) Name ¶
func (t *ReconciliationTrigger) Name() string
Name returns the trigger name.
type RedisCache ¶ added in v0.2.7
type RedisCache struct {
// contains filtered or unexported fields
}
RedisCache is a module that connects to a Redis instance and exposes Get/Set/Delete operations for use by pipeline steps.
func NewRedisCache ¶ added in v0.2.7
func NewRedisCache(name string, cfg RedisCacheConfig) *RedisCache
NewRedisCache creates a new RedisCache module with the given name and config.
func NewRedisCacheWithClient ¶ added in v0.2.7
func NewRedisCacheWithClient(name string, cfg RedisCacheConfig, client RedisClient) *RedisCache
NewRedisCacheWithClient creates a RedisCache backed by a pre-built client. This is intended for testing only.
func (*RedisCache) Delete ¶ added in v0.2.7
func (r *RedisCache) Delete(ctx context.Context, key string) error
Delete removes a key from Redis (with prefix applied).
func (*RedisCache) Get ¶ added in v0.2.7
Get retrieves a value from Redis by key (with prefix applied). Returns redis.Nil wrapped in an error when the key does not exist.
func (*RedisCache) Init ¶ added in v0.2.7
func (r *RedisCache) Init(app modular.Application) error
func (*RedisCache) Name ¶ added in v0.2.7
func (r *RedisCache) Name() string
func (*RedisCache) ProvidesServices ¶ added in v0.2.7
func (r *RedisCache) ProvidesServices() []modular.ServiceProvider
func (*RedisCache) RequiresServices ¶ added in v0.2.7
func (r *RedisCache) RequiresServices() []modular.ServiceDependency
func (*RedisCache) Set ¶ added in v0.2.7
Set stores a value in Redis with optional TTL. A zero duration uses the module-level default; if the default is also zero the key never expires.
type RedisCacheConfig ¶ added in v0.2.7
type RedisCacheConfig struct {
Address string
Password string //nolint:gosec // G117: config struct field, not a hardcoded secret
DB int
Prefix string
DefaultTTL time.Duration
}
RedisCacheConfig holds configuration for the cache.redis module.
type RedisClient ¶ added in v0.2.7
type RedisClient interface {
Ping(ctx context.Context) *redis.StatusCmd
Get(ctx context.Context, key string) *redis.StringCmd
Set(ctx context.Context, key string, value any, expiration time.Duration) *redis.StatusCmd
Del(ctx context.Context, keys ...string) *redis.IntCmd
Close() error
}
RedisClient is the subset of go-redis client methods used by RedisCache. Keeping it as an interface enables mocking in tests.
type RedisNoSQL ¶ added in v0.2.13
type RedisNoSQL struct {
// contains filtered or unexported fields
}
RedisNoSQL is the nosql.redis module. In memory mode (addr: "memory://") it delegates to MemoryNoSQL. For real Redis, replace backend with a redis.Client and implement Get/Put/Delete/Query using HGetAll, HSet, Del, Scan.
func NewRedisNoSQL ¶ added in v0.2.13
func NewRedisNoSQL(name string, cfg RedisNoSQLConfig) *RedisNoSQL
NewRedisNoSQL creates a new RedisNoSQL module.
func (*RedisNoSQL) Delete ¶ added in v0.2.13
func (r *RedisNoSQL) Delete(ctx context.Context, key string) error
func (*RedisNoSQL) Init ¶ added in v0.2.13
func (r *RedisNoSQL) Init(_ modular.Application) error
func (*RedisNoSQL) Name ¶ added in v0.2.13
func (r *RedisNoSQL) Name() string
func (*RedisNoSQL) ProvidesServices ¶ added in v0.2.13
func (r *RedisNoSQL) ProvidesServices() []modular.ServiceProvider
func (*RedisNoSQL) RequiresServices ¶ added in v0.2.13
func (r *RedisNoSQL) RequiresServices() []modular.ServiceDependency
type RedisNoSQLConfig ¶ added in v0.2.13
type RedisNoSQLConfig struct {
Addr string `json:"addr" yaml:"addr"` // "memory://" => in-memory fallback
Password string `json:"password" yaml:"password"` //nolint:gosec // G117: config struct field, not a hardcoded secret
DB int `json:"db" yaml:"db"`
}
RedisNoSQLConfig holds configuration for the nosql.redis module.
This is a general-purpose key-value data store backed by Redis (distinct from the cache.redis module which is for TTL-based caching).
When addr == "memory://" the module falls back to the in-memory backend.
type RegionDeployConfig ¶ added in v0.2.15
type RegionDeployConfig struct {
Name string `json:"name"`
Provider string `json:"provider"`
Endpoint string `json:"endpoint"`
Priority string `json:"priority"` // primary, secondary, dr
HealthCheck HealthCheckConfig `json:"healthCheck"`
}
RegionDeployConfig describes a deployment region within a MultiRegionModule.
type RegionDeployStep ¶ added in v0.2.15
type RegionDeployStep struct {
// contains filtered or unexported fields
}
RegionDeployStep deploys to a specific region via a platform.region module.
func (*RegionDeployStep) Execute ¶ added in v0.2.15
func (s *RegionDeployStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*RegionDeployStep) Name ¶ added in v0.2.15
func (s *RegionDeployStep) Name() string
type RegionFailoverState ¶ added in v0.2.15
type RegionFailoverState string
RegionFailoverState represents the failover state machine state.
const ( RegionStateHealthy RegionFailoverState = "healthy" RegionStateDegraded RegionFailoverState = "degraded" RegionStateFailed RegionFailoverState = "failed" RegionStateRecovering RegionFailoverState = "recovering" )
type RegionFailoverStep ¶ added in v0.2.15
type RegionFailoverStep struct {
// contains filtered or unexported fields
}
RegionFailoverStep triggers failover from one region to another.
func (*RegionFailoverStep) Execute ¶ added in v0.2.15
func (s *RegionFailoverStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*RegionFailoverStep) Name ¶ added in v0.2.15
func (s *RegionFailoverStep) Name() string
type RegionHealth ¶ added in v0.2.15
type RegionHealth struct {
Name string `json:"name"`
Status string `json:"status"` // healthy, degraded, failed, recovering
Latency int `json:"latency"` // mock latency in ms
}
RegionHealth tracks the current health state of a region.
type RegionPromoteStep ¶ added in v0.2.15
type RegionPromoteStep struct {
// contains filtered or unexported fields
}
RegionPromoteStep promotes a region from secondary to primary.
func (*RegionPromoteStep) Execute ¶ added in v0.2.15
func (s *RegionPromoteStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*RegionPromoteStep) Name ¶ added in v0.2.15
func (s *RegionPromoteStep) Name() string
type RegionRouterInterface ¶ added in v0.2.15
type RegionRouterInterface interface {
// RouteRequest selects the best region for the given context.
RouteRequest(ctx context.Context) (RegionDeployConfig, error)
// Failover triggers a failover from one region to another.
Failover(from, to string) error
// Weights returns the current traffic routing weights per region.
Weights() map[string]int
}
RegionRouterInterface defines the interface for routing requests across regions. Implementations can use latency-based, geographic, or weighted routing.
type RegionStatusStep ¶ added in v0.2.15
type RegionStatusStep struct {
// contains filtered or unexported fields
}
RegionStatusStep checks health across all regions.
func (*RegionStatusStep) Execute ¶ added in v0.2.15
func (s *RegionStatusStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*RegionStatusStep) Name ¶ added in v0.2.15
func (s *RegionStatusStep) Name() string
type RegionSyncStep ¶ added in v0.2.15
type RegionSyncStep struct {
// contains filtered or unexported fields
}
RegionSyncStep synchronises state/config across all regions.
func (*RegionSyncStep) Execute ¶ added in v0.2.15
func (s *RegionSyncStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*RegionSyncStep) Name ¶ added in v0.2.15
func (s *RegionSyncStep) Name() string
type RegionWeightStep ¶ added in v0.2.15
type RegionWeightStep struct {
// contains filtered or unexported fields
}
RegionWeightStep adjusts traffic routing weights for a region.
func (*RegionWeightStep) Execute ¶ added in v0.2.15
func (s *RegionWeightStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*RegionWeightStep) Name ¶ added in v0.2.15
func (s *RegionWeightStep) Name() string
type RequestIDMiddleware ¶
type RequestIDMiddleware struct {
// contains filtered or unexported fields
}
RequestIDMiddleware reads X-Request-ID header or generates a UUID, sets it on the context and response header.
func NewRequestIDMiddleware ¶
func NewRequestIDMiddleware(name string) *RequestIDMiddleware
NewRequestIDMiddleware creates a new RequestIDMiddleware.
func (*RequestIDMiddleware) Init ¶
func (m *RequestIDMiddleware) Init(app modular.Application) error
Init registers the middleware as a service.
func (*RequestIDMiddleware) Middleware ¶
func (m *RequestIDMiddleware) Middleware() func(http.Handler) http.Handler
Middleware returns the HTTP middleware function.
func (*RequestIDMiddleware) Name ¶
func (m *RequestIDMiddleware) Name() string
Name returns the module name.
func (*RequestIDMiddleware) Process ¶
func (m *RequestIDMiddleware) Process(next http.Handler) http.Handler
Process implements the HTTPMiddleware interface.
func (*RequestIDMiddleware) ProvidesServices ¶
func (m *RequestIDMiddleware) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*RequestIDMiddleware) RequiresServices ¶
func (m *RequestIDMiddleware) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module.
type RequestParseStep ¶
type RequestParseStep struct {
// contains filtered or unexported fields
}
RequestParseStep extracts path parameters, query parameters, request body, and optionally request headers from the HTTP request stored in pipeline metadata.
func (*RequestParseStep) Execute ¶
func (s *RequestParseStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute extracts path parameters, query parameters, and/or request body from the HTTP request stored in pipeline context metadata.
func (*RequestParseStep) Name ¶
func (s *RequestParseStep) Name() string
Name returns the step name.
type ResourceSpec ¶ added in v0.2.14
type ResourceSpec struct {
CPU string `json:"cpu"` // e.g. "500m"
Memory string `json:"memory"` // e.g. "512Mi"
}
ResourceSpec defines CPU and memory limits for a container.
type ResourceStateMapping ¶
type ResourceStateMapping struct {
ResourceType string // Type of resource (e.g., "orders", "users")
StateMachine string // Name of the state machine
InstanceIDKey string // Field in resource data that maps to state machine instance ID
}
ResourceStateMapping defines how a resource maps to a state machine
type Route ¶
type Route struct {
Method string
Path string
Handler HTTPHandler
Middlewares []HTTPMiddleware
}
Route represents an HTTP route
type RouteDefinition ¶
type RouteDefinition struct {
Method string
Path string
Handler string
Middlewares []string
Summary string
Tags []string
}
RouteDefinition is a simplified route for external spec building.
type RuntimeEngineBuilder ¶
type RuntimeEngineBuilder func(cfg *config.WorkflowConfig, logger *slog.Logger) (stopFunc func(context.Context) error, err error)
RuntimeEngineBuilder creates and starts an engine from a workflow config. It returns a stop function that should be called to shut down the engine.
type RuntimeHandler ¶
type RuntimeHandler struct {
// contains filtered or unexported fields
}
RuntimeHandler exposes HTTP endpoints for managing runtime workflow instances.
func NewRuntimeHandler ¶
func NewRuntimeHandler(manager *RuntimeManager) *RuntimeHandler
NewRuntimeHandler creates a new handler backed by a RuntimeManager.
func (*RuntimeHandler) RegisterRoutes ¶
func (h *RuntimeHandler) RegisterRoutes(mux *http.ServeMux)
RegisterRoutes registers runtime management routes on the given mux.
func (*RuntimeHandler) ServeHTTP ¶
func (h *RuntimeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler for delegate dispatch. The delegate step passes the full original path, so we match against it.
type RuntimeInstance ¶
type RuntimeInstance struct {
ID string `json:"id"`
Name string `json:"name"`
ConfigPath string `json:"config_path"`
WorkDir string `json:"work_dir"`
Status string `json:"status"` // "running", "stopped", "error"
StartedAt time.Time `json:"started_at"`
Error string `json:"error,omitempty"`
Ports map[string]int `json:"ports,omitempty"`
Config *config.WorkflowConfig
// contains filtered or unexported fields
}
RuntimeInstance represents a running workflow loaded from the filesystem.
type RuntimeManager ¶
type RuntimeManager struct {
// contains filtered or unexported fields
}
RuntimeManager manages workflow instances loaded from the filesystem. It is used with the --load-workflows CLI flag to run example workflows alongside the admin server.
func NewRuntimeManager ¶
func NewRuntimeManager(store *V1Store, builder RuntimeEngineBuilder, logger *slog.Logger) *RuntimeManager
NewRuntimeManager creates a new runtime manager.
func (*RuntimeManager) AnnounceServices ¶
func (rm *RuntimeManager) AnnounceServices(instance *RuntimeInstance)
AnnounceServices logs the ports assigned to a workflow instance.
func (*RuntimeManager) GetInstance ¶
func (rm *RuntimeManager) GetInstance(id string) (*RuntimeInstance, bool)
GetInstance returns a specific workflow instance by ID.
func (*RuntimeManager) LaunchFromPath ¶
func (rm *RuntimeManager) LaunchFromPath(ctx context.Context, path string) (*RuntimeInstance, error)
LaunchFromPath loads a workflow config from a server-local path and starts it. The path can be a YAML file or a directory containing workflow.yaml.
func (*RuntimeManager) LaunchFromWorkspace ¶
func (rm *RuntimeManager) LaunchFromWorkspace(ctx context.Context, id, name, yamlContent, workspaceDir string) error
LaunchFromWorkspace creates and starts a workflow engine from a YAML config string, optionally setting the workspace directory for relative path resolution.
func (*RuntimeManager) LaunchFromYAML ¶
func (rm *RuntimeManager) LaunchFromYAML(ctx context.Context, id, name, yamlContent string) error
LaunchFromYAML creates and starts a workflow engine from a YAML config string. The id parameter links this instance to its workflow record in the store.
func (*RuntimeManager) ListInstances ¶
func (rm *RuntimeManager) ListInstances() []RuntimeInstance
ListInstances returns all workflow instances.
func (*RuntimeManager) LoadFromPaths ¶
func (rm *RuntimeManager) LoadFromPaths(ctx context.Context, paths []string) error
LoadFromPaths loads workflows from comma-separated paths. Each path can be a YAML file or a directory containing workflow.yaml.
func (*RuntimeManager) SetPortAllocator ¶
func (rm *RuntimeManager) SetPortAllocator(pa *PortAllocator)
SetPortAllocator configures the port allocator for automatic port assignment.
func (*RuntimeManager) StopAll ¶
func (rm *RuntimeManager) StopAll(ctx context.Context) error
StopAll stops all running workflow instances.
func (*RuntimeManager) StopWorkflow ¶
func (rm *RuntimeManager) StopWorkflow(ctx context.Context, id string) error
StopWorkflow stops a specific running workflow.
type S3Storage ¶
type S3Storage struct {
// contains filtered or unexported fields
}
S3Storage provides object storage operations using AWS S3. It implements the modular.Module interface.
func NewS3Storage ¶
NewS3Storage creates a new S3 storage module.
func (*S3Storage) DeleteObject ¶
DeleteObject removes an object from S3.
func (*S3Storage) Init ¶
func (s *S3Storage) Init(app modular.Application) error
Init initializes the module with the application context.
func (*S3Storage) ProvidesServices ¶
func (s *S3Storage) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*S3Storage) RequiresServices ¶
func (s *S3Storage) RequiresServices() []modular.ServiceDependency
RequiresServices returns the services required by this module.
func (*S3Storage) SetEndpoint ¶
SetEndpoint sets a custom endpoint (for LocalStack/MinIO).
type SQLiteStorage ¶
type SQLiteStorage struct {
// contains filtered or unexported fields
}
SQLiteStorage is a module that provides a SQLite database connection as a service. Other modules can depend on it for local SQL storage.
func NewSQLiteStorage ¶
func NewSQLiteStorage(name, dbPath string) *SQLiteStorage
NewSQLiteStorage creates a new SQLite storage module.
func (*SQLiteStorage) DB ¶
func (s *SQLiteStorage) DB() *sql.DB
DB returns the underlying *sql.DB connection.
func (*SQLiteStorage) Init ¶
func (s *SQLiteStorage) Init(app modular.Application) error
func (*SQLiteStorage) Name ¶
func (s *SQLiteStorage) Name() string
func (*SQLiteStorage) ProvidesServices ¶
func (s *SQLiteStorage) ProvidesServices() []modular.ServiceProvider
func (*SQLiteStorage) RequiresServices ¶
func (s *SQLiteStorage) RequiresServices() []modular.ServiceDependency
func (*SQLiteStorage) SetMaxConnections ¶
func (s *SQLiteStorage) SetMaxConnections(n int)
SetMaxConnections sets the maximum number of database connections.
func (*SQLiteStorage) SetWALMode ¶
func (s *SQLiteStorage) SetWALMode(enabled bool)
SetWALMode enables or disables WAL journal mode.
type SSEEvent ¶
type SSEEvent struct {
ID string `json:"id"`
Event string `json:"event"` // "step.started", "step.completed", "step.failed", etc.
Data string `json:"data"` // JSON-encoded event data
}
SSEEvent represents a Server-Sent Event for execution tracing.
type SSETracer ¶
type SSETracer struct {
// contains filtered or unexported fields
}
SSETracer provides Server-Sent Events for live execution tracing. Clients subscribe to a specific execution ID (or "*" for all executions) and receive real-time events as the workflow progresses.
func NewSSETracer ¶
NewSSETracer creates a new SSETracer with the given logger.
func (*SSETracer) ActiveSubscribers ¶
ActiveSubscribers returns the count of currently active subscriber connections.
func (*SSETracer) Handler ¶
func (t *SSETracer) Handler() http.HandlerFunc
Handler returns an HTTP handler for SSE streaming at GET /api/v1/executions/{id}/stream.
The handler:
- Sets SSE-appropriate headers (Content-Type, Cache-Control, Connection)
- Extracts the execution ID from the URL path
- Subscribes to events for that execution ID
- Writes events in SSE format: "id: ...\nevent: ...\ndata: ...\n\n"
- Cleans up on client disconnect (context cancellation)
func (*SSETracer) Publish ¶
Publish sends an event to all subscribers matching the given execution ID. Events are delivered to:
- subscribers registered for the specific executionID
- subscribers registered with the wildcard "*"
If a subscriber's channel is full, the event is dropped for that subscriber (non-blocking send to prevent slow consumers from stalling the publisher).
type ScaffoldAnalyzeStep ¶ added in v0.2.13
type ScaffoldAnalyzeStep struct {
// contains filtered or unexported fields
}
ScaffoldAnalyzeStep reads an OpenAPI spec from the HTTP request body, analyzes it, and returns the parsed resource/operation structure as JSON.
func (*ScaffoldAnalyzeStep) Execute ¶ added in v0.2.13
func (s *ScaffoldAnalyzeStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute reads the OpenAPI spec from the request body, calls scaffold.AnalyzeOnly, and writes the result as a JSON response.
func (*ScaffoldAnalyzeStep) Name ¶ added in v0.2.13
func (s *ScaffoldAnalyzeStep) Name() string
Name returns the step name.
type ScaffoldStep ¶ added in v0.2.13
type ScaffoldStep struct {
// contains filtered or unexported fields
}
ScaffoldStep generates a Vite+React+TypeScript UI scaffold from an OpenAPI spec in the request body and returns it as a downloadable ZIP archive.
func (*ScaffoldStep) Execute ¶ added in v0.2.13
func (s *ScaffoldStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute reads the OpenAPI spec from the request body, generates scaffold files, and writes them as a ZIP response.
func (*ScaffoldStep) Name ¶ added in v0.2.13
func (s *ScaffoldStep) Name() string
Name returns the step name.
type ScalingApplyStep ¶ added in v0.2.14
type ScalingApplyStep struct {
// contains filtered or unexported fields
}
ScalingApplyStep calls Apply() on a named platform.autoscaling module.
func (*ScalingApplyStep) Execute ¶ added in v0.2.14
func (s *ScalingApplyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ScalingApplyStep) Name ¶ added in v0.2.14
func (s *ScalingApplyStep) Name() string
type ScalingDestroyStep ¶ added in v0.2.14
type ScalingDestroyStep struct {
// contains filtered or unexported fields
}
ScalingDestroyStep calls Destroy() on a named platform.autoscaling module.
func (*ScalingDestroyStep) Execute ¶ added in v0.2.14
func (s *ScalingDestroyStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ScalingDestroyStep) Name ¶ added in v0.2.14
func (s *ScalingDestroyStep) Name() string
type ScalingPlan ¶ added in v0.2.14
type ScalingPlan struct {
Policies []ScalingPolicy `json:"policies"`
Changes []string `json:"changes"`
}
ScalingPlan describes the changes needed to reach desired autoscaling state.
type ScalingPlanStep ¶ added in v0.2.14
type ScalingPlanStep struct {
// contains filtered or unexported fields
}
ScalingPlanStep calls Plan() on a named platform.autoscaling module.
func (*ScalingPlanStep) Execute ¶ added in v0.2.14
func (s *ScalingPlanStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ScalingPlanStep) Name ¶ added in v0.2.14
func (s *ScalingPlanStep) Name() string
type ScalingPolicy ¶ added in v0.2.14
type ScalingPolicy struct {
Name string `json:"name"`
Type string `json:"type"` // target_tracking, step, scheduled
TargetResource string `json:"targetResource"` // ECS service, K8s deployment, etc.
MinCapacity int `json:"minCapacity"`
MaxCapacity int `json:"maxCapacity"`
MetricName string `json:"metricName,omitempty"`
TargetValue float64 `json:"targetValue,omitempty"`
Schedule string `json:"schedule,omitempty"` // cron expression
DesiredCapacity int `json:"desiredCapacity,omitempty"`
}
ScalingPolicy describes a single autoscaling policy.
type ScalingState ¶ added in v0.2.14
type ScalingState struct {
ID string `json:"id"`
Policies []ScalingPolicy `json:"policies"`
CurrentCapacity int `json:"currentCapacity"`
Status string `json:"status"` // pending, active, updating, deleted
}
ScalingState represents the current state of the autoscaling configuration.
type ScalingStatusStep ¶ added in v0.2.14
type ScalingStatusStep struct {
// contains filtered or unexported fields
}
ScalingStatusStep calls Status() on a named platform.autoscaling module.
func (*ScalingStatusStep) Execute ¶ added in v0.2.14
func (s *ScalingStatusStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
func (*ScalingStatusStep) Name ¶ added in v0.2.14
func (s *ScalingStatusStep) Name() string
type ScanContainerStep ¶
type ScanContainerStep struct {
// contains filtered or unexported fields
}
ScanContainerStep runs a container vulnerability scanner (e.g., Trivy) against a target image and evaluates findings against a severity gate.
NOTE: This step is not yet implemented. Docker-based execution requires sandbox.DockerSandbox, which is not yet available. Calls to Execute will always return ErrNotImplemented.
func (*ScanContainerStep) Execute ¶
func (s *ScanContainerStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
Execute runs the container scanner and returns findings as a ScanResult.
NOTE: This step is not yet implemented. Execution via sandbox.DockerSandbox is required but the sandbox package is not yet available. This method always returns ErrNotImplemented to prevent silent no-ops in CI/CD pipelines.
func (*ScanContainerStep) Name ¶
func (s *ScanContainerStep) Name() string
Name returns the step name.
type ScanDepsStep ¶
type ScanDepsStep struct {
// contains filtered or unexported fields
}
ScanDepsStep runs a dependency vulnerability scanner (e.g., Grype) against a source path and evaluates findings against a severity gate.
NOTE: This step is not yet implemented. Docker-based execution requires sandbox.DockerSandbox, which is not yet available. Calls to Execute will always return ErrNotImplemented.
func (*ScanDepsStep) Execute ¶
func (s *ScanDepsStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
Execute runs the dependency scanner and returns findings as a ScanResult.
NOTE: This step is not yet implemented. Execution via sandbox.DockerSandbox is required but the sandbox package is not yet available. This method always returns ErrNotImplemented to prevent silent no-ops in CI/CD pipelines.
type ScanResult ¶
type ScanResult struct {
Scanner string `json:"scanner"`
Findings []Finding `json:"findings"`
Summary ScanSummary `json:"summary"`
PassedGate bool `json:"passed_gate"`
}
ScanResult holds the output of a security scanner.
func NewScanResult ¶
func NewScanResult(scanner string) *ScanResult
NewScanResult creates a ScanResult for the given scanner name.
func (*ScanResult) AddFinding ¶
func (sr *ScanResult) AddFinding(f Finding)
AddFinding appends a finding to the scan result.
func (*ScanResult) ComputeSummary ¶
func (sr *ScanResult) ComputeSummary()
ComputeSummary tallies findings by severity level.
func (*ScanResult) EvaluateGate ¶
func (sr *ScanResult) EvaluateGate(threshold string) bool
EvaluateGate checks whether the scan passes a severity gate. The gate passes if no findings are at or above the given threshold severity. For example, threshold "high" means the gate fails if any critical or high findings exist.
type ScanSASTStep ¶
type ScanSASTStep struct {
// contains filtered or unexported fields
}
ScanSASTStep runs a SAST (Static Application Security Testing) scanner inside a Docker container and evaluates findings against a severity gate.
NOTE: This step is not yet implemented. Docker-based execution requires sandbox.DockerSandbox, which is not yet available. Calls to Execute will always return ErrNotImplemented.
func (*ScanSASTStep) Execute ¶
func (s *ScanSASTStep) Execute(_ context.Context, _ *PipelineContext) (*StepResult, error)
Execute runs the SAST scanner and returns findings as a ScanResult.
NOTE: This step is not yet implemented. Execution via sandbox.DockerSandbox is required but the sandbox package is not yet available. This method always returns ErrNotImplemented to prevent silent no-ops in CI/CD pipelines.
type ScanSummary ¶
type ScanSummary struct {
Critical int `json:"critical"`
High int `json:"high"`
Medium int `json:"medium"`
Low int `json:"low"`
Info int `json:"info"`
}
ScanSummary counts findings by severity level.
type ScheduleTrigger ¶
type ScheduleTrigger struct {
// contains filtered or unexported fields
}
ScheduleTrigger implements a trigger that starts workflows based on a schedule
func NewScheduleTrigger ¶
func NewScheduleTrigger() *ScheduleTrigger
NewScheduleTrigger creates a new schedule trigger
func NewScheduleTriggerWithNamespace ¶
func NewScheduleTriggerWithNamespace(namespace ModuleNamespaceProvider) *ScheduleTrigger
NewScheduleTriggerWithNamespace creates a new schedule trigger with namespace support
func (*ScheduleTrigger) Configure ¶
func (t *ScheduleTrigger) Configure(app modular.Application, triggerConfig any) error
Configure sets up the trigger from configuration
func (*ScheduleTrigger) Init ¶
func (t *ScheduleTrigger) Init(app modular.Application) error
Init initializes the trigger
func (*ScheduleTrigger) Name ¶
func (t *ScheduleTrigger) Name() string
Name returns the name of this trigger
type ScheduleTriggerConfig ¶
type ScheduleTriggerConfig struct {
Jobs []ScheduleTriggerJob `json:"jobs" yaml:"jobs"`
}
ScheduleTriggerConfig represents the configuration for a schedule trigger
type ScheduleTriggerJob ¶
type ScheduleTriggerJob struct {
Cron string `json:"cron" yaml:"cron"`
Workflow string `json:"workflow" yaml:"workflow"`
Action string `json:"action" yaml:"action"`
Params map[string]any `json:"params,omitempty" yaml:"params,omitempty"`
}
ScheduleTriggerJob represents a single scheduled job configuration
type ScheduledJobInfo ¶
type ScheduledJobInfo struct {
// contains filtered or unexported fields
}
ScheduledJobInfo captures information about a scheduled job
type ScheduledWindow ¶
ScheduledWindow defines a time window during which a scheduled gate passes.
type Scheduler ¶
type Scheduler interface {
Schedule(job Job) error
Start(ctx context.Context) error
Stop(ctx context.Context) error
}
Scheduler represents a job scheduler
type SecretsAWSModule ¶
type SecretsAWSModule struct {
// contains filtered or unexported fields
}
SecretsAWSModule provides an AWS Secrets Manager secret provider as a modular service.
func NewSecretsAWSModule ¶
func NewSecretsAWSModule(name string) *SecretsAWSModule
NewSecretsAWSModule creates a new AWS Secrets Manager module.
func (*SecretsAWSModule) Init ¶
func (m *SecretsAWSModule) Init(app modular.Application) error
func (*SecretsAWSModule) Name ¶
func (m *SecretsAWSModule) Name() string
func (*SecretsAWSModule) Provider ¶
func (m *SecretsAWSModule) Provider() secrets.Provider
Provider returns the underlying secrets.Provider.
func (*SecretsAWSModule) ProvidesServices ¶
func (m *SecretsAWSModule) ProvidesServices() []modular.ServiceProvider
func (*SecretsAWSModule) RequiresServices ¶
func (m *SecretsAWSModule) RequiresServices() []modular.ServiceDependency
func (*SecretsAWSModule) SetAccessKeyID ¶
func (m *SecretsAWSModule) SetAccessKeyID(id string)
SetAccessKeyID sets the AWS access key ID.
func (*SecretsAWSModule) SetRegion ¶
func (m *SecretsAWSModule) SetRegion(region string)
SetRegion sets the AWS region.
func (*SecretsAWSModule) SetSecretAccessKey ¶
func (m *SecretsAWSModule) SetSecretAccessKey(key string)
SetSecretAccessKey sets the AWS secret access key.
type SecretsVaultModule ¶
type SecretsVaultModule struct {
// contains filtered or unexported fields
}
SecretsVaultModule provides a HashiCorp Vault secret provider as a modular service. It supports two modes:
- "remote" (default): connects to an external Vault server
- "dev": manages a local Vault dev server subprocess
func NewSecretsVaultModule ¶
func NewSecretsVaultModule(name string) *SecretsVaultModule
NewSecretsVaultModule creates a new Vault secrets module.
func (*SecretsVaultModule) Init ¶
func (m *SecretsVaultModule) Init(app modular.Application) error
func (*SecretsVaultModule) Name ¶
func (m *SecretsVaultModule) Name() string
func (*SecretsVaultModule) Provider ¶
func (m *SecretsVaultModule) Provider() secrets.Provider
Provider returns the underlying secrets.Provider.
func (*SecretsVaultModule) ProvidesServices ¶
func (m *SecretsVaultModule) ProvidesServices() []modular.ServiceProvider
func (*SecretsVaultModule) RequiresServices ¶
func (m *SecretsVaultModule) RequiresServices() []modular.ServiceDependency
func (*SecretsVaultModule) SetAddress ¶
func (m *SecretsVaultModule) SetAddress(addr string)
SetAddress sets the Vault server address.
func (*SecretsVaultModule) SetMode ¶
func (m *SecretsVaultModule) SetMode(mode string)
SetMode sets the provider mode: "remote" or "dev".
func (*SecretsVaultModule) SetMountPath ¶
func (m *SecretsVaultModule) SetMountPath(path string)
SetMountPath sets the KV v2 mount path.
func (*SecretsVaultModule) SetNamespace ¶
func (m *SecretsVaultModule) SetNamespace(ns string)
SetNamespace sets the Vault namespace.
func (*SecretsVaultModule) SetToken ¶
func (m *SecretsVaultModule) SetToken(token string)
SetToken sets the Vault authentication token.
type SecurityGroupConfig ¶ added in v0.2.14
type SecurityGroupConfig struct {
Name string `json:"name"`
Rules []SecurityGroupRule `json:"rules"`
}
SecurityGroupConfig describes a security group with its rules.
type SecurityGroupRule ¶ added in v0.2.14
type SecurityGroupRule struct {
Protocol string `json:"protocol"`
Port int `json:"port"`
Source string `json:"source"`
}
SecurityGroupRule describes a single inbound/outbound rule.
type SecurityHeadersConfig ¶
type SecurityHeadersConfig struct {
ContentSecurityPolicy string `` /* 149-byte string literal not displayed */
FrameOptions string `yaml:"frameOptions" default:"DENY"`
ContentTypeOptions string `yaml:"contentTypeOptions" default:"nosniff"`
HSTSMaxAge int `yaml:"hstsMaxAge" default:"31536000"`
ReferrerPolicy string `yaml:"referrerPolicy" default:"strict-origin-when-cross-origin"`
PermissionsPolicy string `yaml:"permissionsPolicy" default:"camera=(), microphone=(), geolocation=()"`
}
SecurityHeadersConfig holds configuration for the security headers middleware.
type SecurityHeadersMiddleware ¶
type SecurityHeadersMiddleware struct {
// contains filtered or unexported fields
}
SecurityHeadersMiddleware adds standard security headers to HTTP responses.
func NewSecurityHeadersMiddleware ¶
func NewSecurityHeadersMiddleware(name string, cfg SecurityHeadersConfig) *SecurityHeadersMiddleware
NewSecurityHeadersMiddleware creates a new SecurityHeadersMiddleware.
func (*SecurityHeadersMiddleware) Init ¶
func (m *SecurityHeadersMiddleware) Init(app modular.Application) error
Init registers the middleware as a service.
func (*SecurityHeadersMiddleware) Middleware ¶
func (m *SecurityHeadersMiddleware) Middleware() func(http.Handler) http.Handler
Middleware returns the HTTP middleware function.
func (*SecurityHeadersMiddleware) Name ¶
func (m *SecurityHeadersMiddleware) Name() string
Name returns the module name.
func (*SecurityHeadersMiddleware) Process ¶
func (m *SecurityHeadersMiddleware) Process(next http.Handler) http.Handler
Process implements the HTTPMiddleware interface.
func (*SecurityHeadersMiddleware) ProvidesServices ¶
func (m *SecurityHeadersMiddleware) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*SecurityHeadersMiddleware) RequiresServices ¶
func (m *SecurityHeadersMiddleware) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module.
type ServiceInfo ¶
type ServiceInfo struct {
Name string `json:"name"`
Type string `json:"type"`
Implements []string `json:"implements"`
}
ServiceInfo describes a registered service for API responses.
type ServiceModule ¶
type ServiceModule struct {
// contains filtered or unexported fields
}
ServiceModule wraps any Go object as a modular.Module, registering it in the service registry under the given name. This allows delegate-based dispatch: a QueryHandler or CommandHandler can name a delegate service, and that service (if it implements http.Handler) handles the actual HTTP dispatch.
func NewServiceModule ¶
func NewServiceModule(name string, svc any) *ServiceModule
NewServiceModule creates a ServiceModule that registers svc under name.
func (*ServiceModule) Init ¶
func (m *ServiceModule) Init(_ modular.Application) error
func (*ServiceModule) Name ¶
func (m *ServiceModule) Name() string
func (*ServiceModule) ProvidesServices ¶
func (m *ServiceModule) ProvidesServices() []modular.ServiceProvider
func (*ServiceModule) RequiresServices ¶
func (m *ServiceModule) RequiresServices() []modular.ServiceDependency
type ServiceRegistry ¶
type ServiceRegistry interface {
// GetService returns a service by name
GetService(name string, out any) error
// RegisterService registers a service with the application
RegisterService(name string, service any) error
}
ServiceRegistry defines the interface for registering and retrieving services
type SetStep ¶
type SetStep struct {
// contains filtered or unexported fields
}
SetStep sets template-resolved values in the pipeline context.
func (*SetStep) Execute ¶
func (s *SetStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute resolves template expressions in the configured values and returns them as the step output.
type ShellExecStep ¶
type ShellExecStep struct {
// contains filtered or unexported fields
}
ShellExecStep executes shell commands inside a Docker container, optionally collecting output artifacts.
func (*ShellExecStep) Execute ¶
func (s *ShellExecStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute runs each command in a Docker sandbox and collects artifacts.
type SimpleHTTPHandler ¶
type SimpleHTTPHandler struct {
// contains filtered or unexported fields
}
SimpleHTTPHandler provides a basic implementation of an HTTP handler
func NewSimpleHTTPHandler ¶
func NewSimpleHTTPHandler(name string, contentType string) *SimpleHTTPHandler
NewSimpleHTTPHandler creates a new HTTP handler with the given name
func (*SimpleHTTPHandler) Handle ¶
func (h *SimpleHTTPHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle implements the HTTPHandler interface
func (*SimpleHTTPHandler) Init ¶
func (h *SimpleHTTPHandler) Init(app modular.Application) error
Init initializes the HTTP handler
func (*SimpleHTTPHandler) Name ¶
func (h *SimpleHTTPHandler) Name() string
Name returns the unique identifier for this module
func (*SimpleHTTPHandler) ProvidesServices ¶
func (h *SimpleHTTPHandler) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns a list of services provided by this module
func (*SimpleHTTPHandler) RequiresServices ¶
func (h *SimpleHTTPHandler) RequiresServices() []modular.ServiceDependency
RequiresServices returns a list of services required by this module
func (*SimpleHTTPHandler) ServeHTTP ¶
func (h *SimpleHTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface
func (*SimpleHTTPHandler) SetHandleFunc ¶
func (h *SimpleHTTPHandler) SetHandleFunc(fn func(w http.ResponseWriter, r *http.Request))
SetHandleFunc sets a custom handler function
type SimpleMessageHandler ¶
type SimpleMessageHandler struct {
// contains filtered or unexported fields
}
SimpleMessageHandler provides a basic implementation of a message handler
func NewSimpleMessageHandler ¶
func NewSimpleMessageHandler(name string) *SimpleMessageHandler
NewSimpleMessageHandler creates a new message handler with the given name
func NewSimpleMessageHandlerWithNamespace ¶
func NewSimpleMessageHandlerWithNamespace(name string, namespace ModuleNamespaceProvider) *SimpleMessageHandler
NewSimpleMessageHandlerWithNamespace creates a new message handler with namespace support
func NewStandardSimpleMessageHandler ¶
func NewStandardSimpleMessageHandler(handlerType string, namespace ModuleNamespaceProvider) *SimpleMessageHandler
NewStandardSimpleMessageHandler creates a message handler with standard name
func (*SimpleMessageHandler) Constructor ¶
func (h *SimpleMessageHandler) Constructor() modular.ModuleConstructor
Constructor returns a function to construct this module with dependencies
func (*SimpleMessageHandler) Dependencies ¶
func (h *SimpleMessageHandler) Dependencies() []string
Dependencies returns the names of other modules this module depends on
func (*SimpleMessageHandler) HandleMessage ¶
func (h *SimpleMessageHandler) HandleMessage(message []byte) error
HandleMessage implements the MessageHandler interface
func (*SimpleMessageHandler) Init ¶
func (h *SimpleMessageHandler) Init(app modular.Application) error
Init initializes the module with the application context
func (*SimpleMessageHandler) Name ¶
func (h *SimpleMessageHandler) Name() string
Name returns the unique identifier for this module
func (*SimpleMessageHandler) ProvidesServices ¶
func (h *SimpleMessageHandler) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns a list of services provided by this module
func (*SimpleMessageHandler) RequiresServices ¶
func (h *SimpleMessageHandler) RequiresServices() []modular.ServiceDependency
RequiresServices returns a list of services required by this module
func (*SimpleMessageHandler) SetBrokerDependencies ¶
func (h *SimpleMessageHandler) SetBrokerDependencies(brokerNames []string)
SetBrokerDependencies sets which message broker modules this handler depends on
func (*SimpleMessageHandler) SetHandleFunc ¶
func (h *SimpleMessageHandler) SetHandleFunc(fn func(message []byte) error)
SetHandleFunc sets a custom handler function
func (*SimpleMessageHandler) SetProducer ¶
func (h *SimpleMessageHandler) SetProducer(producer MessageProducer)
SetProducer sets the message producer for forwarding
func (*SimpleMessageHandler) SetTargetTopics ¶
func (h *SimpleMessageHandler) SetTargetTopics(topics []string)
SetTargetTopics configures topics to forward messages to
type SimpleProxy ¶
type SimpleProxy struct {
// contains filtered or unexported fields
}
SimpleProxy is a lightweight reverse proxy module that forwards requests to backend services based on path prefix matching.
func NewSimpleProxy ¶
func NewSimpleProxy(name string) *SimpleProxy
NewSimpleProxy creates a new simple reverse proxy module.
func (*SimpleProxy) Handle ¶
func (p *SimpleProxy) Handle(w http.ResponseWriter, r *http.Request)
Handle proxies the request to the appropriate backend based on path prefix.
func (*SimpleProxy) Init ¶
func (p *SimpleProxy) Init(_ modular.Application) error
Init initializes the module.
func (*SimpleProxy) ProvidesServices ¶
func (p *SimpleProxy) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*SimpleProxy) RequiresServices ¶
func (p *SimpleProxy) RequiresServices() []modular.ServiceDependency
RequiresServices returns no dependencies.
func (*SimpleProxy) SetTargets ¶
func (p *SimpleProxy) SetTargets(targets map[string]string) error
SetTargets configures the proxy targets from a map of path prefix -> backend URL strings.
type SimpleTokenProvider ¶
type SimpleTokenProvider struct {
// contains filtered or unexported fields
}
SimpleTokenProvider implements a simple token-based auth provider
func (*SimpleTokenProvider) Authenticate ¶
Authenticate checks if the token is valid and returns associated claims
type SlackNotification ¶
type SlackNotification struct {
// contains filtered or unexported fields
}
SlackNotification sends messages to a Slack webhook URL. It implements both the MessageHandler and modular.Module interfaces.
func NewSlackNotification ¶
func NewSlackNotification(name string) *SlackNotification
NewSlackNotification creates a new Slack notification module.
func (*SlackNotification) HandleMessage ¶
func (s *SlackNotification) HandleMessage(message []byte) error
HandleMessage sends a message to the configured Slack webhook.
func (*SlackNotification) Init ¶
func (s *SlackNotification) Init(app modular.Application) error
Init initializes the module with the application context.
func (*SlackNotification) Name ¶
func (s *SlackNotification) Name() string
Name returns the module name.
func (*SlackNotification) ProvidesServices ¶
func (s *SlackNotification) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module.
func (*SlackNotification) RequiresServices ¶
func (s *SlackNotification) RequiresServices() []modular.ServiceDependency
RequiresServices returns the services required by this module.
func (*SlackNotification) SetChannel ¶
func (s *SlackNotification) SetChannel(channel string)
SetChannel sets the Slack channel.
func (*SlackNotification) SetClient ¶
func (s *SlackNotification) SetClient(client *http.Client)
SetClient sets a custom HTTP client (useful for testing).
func (*SlackNotification) SetUsername ¶
func (s *SlackNotification) SetUsername(username string)
SetUsername sets the Slack username.
func (*SlackNotification) SetWebhookURL ¶
func (s *SlackNotification) SetWebhookURL(url string)
SetWebhookURL sets the Slack webhook URL.
type StandardHTTPHandler ¶
type StandardHTTPHandler struct {
// contains filtered or unexported fields
}
StandardHTTPHandler adapts a function to the HTTPHandler interface
func (*StandardHTTPHandler) Handle ¶
func (h *StandardHTTPHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle implements the HTTPHandler interface
func (*StandardHTTPHandler) ServeHTTP ¶
func (h *StandardHTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request, params map[string]string)
ServeHTTP implements the http.Handler interface (for compatibility)
type StandardHTTPRouter ¶
type StandardHTTPRouter struct {
// contains filtered or unexported fields
}
StandardHTTPRouter implements both HTTPRouter and http.Handler interfaces
func NewStandardHTTPRouter ¶
func NewStandardHTTPRouter(name string) *StandardHTTPRouter
NewStandardHTTPRouter creates a new HTTP router
func (*StandardHTTPRouter) AddGlobalMiddleware ¶ added in v0.2.4
func (r *StandardHTTPRouter) AddGlobalMiddleware(mw HTTPMiddleware)
AddGlobalMiddleware appends a middleware that wraps every request served by this router, regardless of which route is matched. Global middlewares are applied in the order they are added, before any per-route middlewares. This is the correct place to attach cross-cutting concerns such as distributed tracing that must observe all traffic.
func (*StandardHTTPRouter) AddRoute ¶
func (r *StandardHTTPRouter) AddRoute(method, path string, handler HTTPHandler)
AddRoute adds a route to the router
func (*StandardHTTPRouter) AddRouteWithMiddleware ¶
func (r *StandardHTTPRouter) AddRouteWithMiddleware(method, path string, handler HTTPHandler, middlewares []HTTPMiddleware)
AddRouteWithMiddleware adds a route with middleware to the router. If the router has already been started, the internal mux is rebuilt so that dynamically added routes (e.g. from pipeline triggers) are served.
func (*StandardHTTPRouter) Constructor ¶
func (r *StandardHTTPRouter) Constructor() modular.ModuleConstructor
Constructor returns a function to construct this module with dependencies
func (*StandardHTTPRouter) Dependencies ¶
func (r *StandardHTTPRouter) Dependencies() []string
Dependencies returns names of other modules this module depends on
func (*StandardHTTPRouter) HasRoute ¶
func (r *StandardHTTPRouter) HasRoute(method, path string) bool
HasRoute checks if a route with the given method and path already exists
func (*StandardHTTPRouter) Init ¶
func (r *StandardHTTPRouter) Init(app modular.Application) error
Init initializes the module with the application context
func (*StandardHTTPRouter) Name ¶
func (r *StandardHTTPRouter) Name() string
Name returns the unique identifier for this module
func (*StandardHTTPRouter) ProvidesServices ¶
func (r *StandardHTTPRouter) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns a list of services provided by this module
func (*StandardHTTPRouter) RequiresServices ¶
func (r *StandardHTTPRouter) RequiresServices() []modular.ServiceDependency
RequiresServices returns a list of services required by this module
func (*StandardHTTPRouter) ServeHTTP ¶
func (r *StandardHTTPRouter) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP implements the http.Handler interface. Global middlewares (e.g. OTEL tracing) are applied around the entire mux so every request — including health-checks and pipeline-triggered routes — is instrumented, regardless of how the route was registered.
func (*StandardHTTPRouter) SetServerDependencies ¶
func (r *StandardHTTPRouter) SetServerDependencies(serverNames []string)
SetServerDependencies sets which HTTP server modules this router depends on
type StandardHTTPServer ¶
type StandardHTTPServer struct {
// contains filtered or unexported fields
}
StandardHTTPServer implements the HTTPServer interface and modular.Module interfaces
func NewStandardHTTPServer ¶
func NewStandardHTTPServer(name, address string) *StandardHTTPServer
NewStandardHTTPServer creates a new HTTP server with the given name and address
func (*StandardHTTPServer) AddRouter ¶
func (s *StandardHTTPServer) AddRouter(router HTTPRouter)
AddRouter adds a router to the HTTP server
func (*StandardHTTPServer) Init ¶
func (s *StandardHTTPServer) Init(app modular.Application) error
Init initializes the module with the application context
func (*StandardHTTPServer) Name ¶
func (s *StandardHTTPServer) Name() string
Name returns the unique identifier for this module
func (*StandardHTTPServer) ProvidesServices ¶
func (s *StandardHTTPServer) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns a list of services provided by this module
func (*StandardHTTPServer) RequiresServices ¶
func (s *StandardHTTPServer) RequiresServices() []modular.ServiceDependency
RequiresServices returns a list of services required by this module
func (*StandardHTTPServer) SetTimeouts ¶ added in v0.1.5
func (s *StandardHTTPServer) SetTimeouts(read, write, idle time.Duration)
SetTimeouts configures read, write, and idle timeouts for the HTTP server. Zero values will use defaults (30s read/write, 120s idle).
type StandardNamespace ¶
type StandardNamespace struct {
// contains filtered or unexported fields
}
StandardNamespace provides a standard implementation of ModuleNamespaceProvider
func NewStandardNamespace ¶
func NewStandardNamespace(prefix string, suffix string) *StandardNamespace
NewStandardNamespace creates a new standard namespace with optional prefix and suffix
func (*StandardNamespace) FormatName ¶
func (ns *StandardNamespace) FormatName(baseName string) string
FormatName formats a module name with the namespace prefix/suffix
func (*StandardNamespace) ResolveDependency ¶
func (ns *StandardNamespace) ResolveDependency(dependencyName string) string
ResolveDependency formats a dependency name with the namespace prefix/suffix
func (*StandardNamespace) ResolveServiceName ¶
func (ns *StandardNamespace) ResolveServiceName(serviceName string) string
ResolveServiceName formats a service name with the namespace prefix/suffix
func (*StandardNamespace) ValidateModuleName ¶
func (ns *StandardNamespace) ValidateModuleName(moduleName string) error
ValidateModuleName checks if a module name conforms to namespace requirements
type State ¶
type State struct {
Name string `json:"name" yaml:"name"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Data map[string]any `json:"data,omitempty" yaml:"data,omitempty"`
IsFinal bool `json:"isFinal" yaml:"isFinal"`
IsError bool `json:"isError" yaml:"isError"`
}
State represents a workflow state
type StateChangeListener ¶
type StateChangeListener func(previousState, newState string, resourceID string, data map[string]any)
StateChangeListener is a function that gets called when state changes
type StateInfo ¶
type StateInfo struct {
ID string `json:"id"`
ResourceType string `json:"resourceType"`
CurrentState string `json:"currentState"`
PreviousState string `json:"previousState,omitempty"`
LastUpdate time.Time `json:"lastUpdate"`
Data map[string]any `json:"data,omitempty"`
}
StateInfo represents state information for a resource
type StateMachineDefinition ¶
type StateMachineDefinition struct {
Name string `json:"name" yaml:"name"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
States map[string]*State `json:"states" yaml:"states"`
Transitions map[string]*Transition `json:"transitions" yaml:"transitions"`
InitialState string `json:"initialState" yaml:"initialState"`
Data map[string]any `json:"data,omitempty" yaml:"data,omitempty"`
}
StateMachineDefinition defines a state machine workflow
type StateMachineEngine ¶
type StateMachineEngine struct {
// contains filtered or unexported fields
}
StateMachineEngine implements a workflow state machine engine
func NewStandardStateMachineEngine ¶
func NewStandardStateMachineEngine(namespace ModuleNamespaceProvider) *StateMachineEngine
NewStandardStateMachineEngine creates a state machine engine with the standard name
func NewStateMachineEngine ¶
func NewStateMachineEngine(name string) *StateMachineEngine
NewStateMachineEngine creates a new state machine engine
func NewStateMachineEngineWithNamespace ¶
func NewStateMachineEngineWithNamespace(name string, namespace ModuleNamespaceProvider) *StateMachineEngine
NewStateMachineEngineWithNamespace creates a new state machine engine with namespace support
func (*StateMachineEngine) AddGlobalTransitionHandler ¶
func (e *StateMachineEngine) AddGlobalTransitionHandler(handler TransitionHandler)
AddGlobalTransitionHandler adds a handler for all transitions
func (*StateMachineEngine) AddTransitionListener ¶
func (e *StateMachineEngine) AddTransitionListener(listener TransitionListener)
AddTransitionListener registers a function to be called on every transition
func (*StateMachineEngine) CreateWorkflow ¶
func (e *StateMachineEngine) CreateWorkflow( workflowType string, id string, initialData map[string]any, ) (*WorkflowInstance, error)
CreateWorkflow creates a new workflow instance
func (*StateMachineEngine) GetAllInstances ¶
func (e *StateMachineEngine) GetAllInstances() ([]*WorkflowInstance, error)
GetAllInstances returns all workflow instances
func (*StateMachineEngine) GetInstance ¶
func (e *StateMachineEngine) GetInstance(id string) (*WorkflowInstance, error)
GetInstance retrieves a workflow instance by ID
func (*StateMachineEngine) GetInstancesByType ¶
func (e *StateMachineEngine) GetInstancesByType(workflowType string) ([]*WorkflowInstance, error)
GetInstancesByType retrieves workflow instances by type
func (*StateMachineEngine) GetOrphanedInstances ¶
func (e *StateMachineEngine) GetOrphanedInstances() []*WorkflowInstance
GetOrphanedInstances returns workflow instances whose current state does not exist in the corresponding state machine definition. This helps operators discover instances affected by configuration drift.
func (*StateMachineEngine) GetTransitionHandler ¶
func (e *StateMachineEngine) GetTransitionHandler() TransitionHandler
GetTransitionHandler returns the current transition handler
func (*StateMachineEngine) HasTransitionHandler ¶
func (e *StateMachineEngine) HasTransitionHandler() bool
HasTransitionHandler checks if a transition handler is set
func (*StateMachineEngine) Init ¶
func (e *StateMachineEngine) Init(app modular.Application) error
Init initializes the state machine engine
func (*StateMachineEngine) InstanceTTL ¶
func (e *StateMachineEngine) InstanceTTL() time.Duration
InstanceTTL returns the configured TTL for idle instances.
func (*StateMachineEngine) LoadAllPersistedInstances ¶
func (e *StateMachineEngine) LoadAllPersistedInstances() error
LoadAllPersistedInstances loads workflow instances from persistence for all registered definition types and populates the in-memory maps. Instances that already exist in memory are skipped.
func (*StateMachineEngine) MaxInstances ¶
func (e *StateMachineEngine) MaxInstances() int
MaxInstances returns the configured maximum number of concurrent instances.
func (*StateMachineEngine) Name ¶
func (e *StateMachineEngine) Name() string
Name returns the module name
func (*StateMachineEngine) ProvidesServices ¶
func (e *StateMachineEngine) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns services provided by this module
func (*StateMachineEngine) RecoverProcessingInstances ¶
func (e *StateMachineEngine) RecoverProcessingInstances(ctx context.Context, processingStates []string) int
RecoverProcessingInstances finds instances stuck in intermediate processing states and re-triggers their transitions so processing can resume after a restart. It resets each stuck instance back to PreviousState and re-fires the transition that originally moved it into the processing state.
func (*StateMachineEngine) RegisterDefinition ¶
func (e *StateMachineEngine) RegisterDefinition(def *StateMachineDefinition) error
RegisterDefinition registers a state machine definition
func (*StateMachineEngine) RegisterWorkflow ¶
func (e *StateMachineEngine) RegisterWorkflow(def ExternalStateMachineDefinition) error
RegisterWorkflow registers a workflow definition
func (*StateMachineEngine) RequiresServices ¶
func (e *StateMachineEngine) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module
func (*StateMachineEngine) SetInstanceTTL ¶
func (e *StateMachineEngine) SetInstanceTTL(d time.Duration)
SetInstanceTTL sets the TTL for idle workflow instances.
func (*StateMachineEngine) SetMaxInstances ¶
func (e *StateMachineEngine) SetMaxInstances(n int)
SetMaxInstances sets the maximum number of concurrent workflow instances.
func (*StateMachineEngine) SetPersistence ¶
func (e *StateMachineEngine) SetPersistence(ps *PersistenceStore)
SetPersistence sets the optional write-through persistence backend.
func (*StateMachineEngine) SetTransitionHandler ¶
func (e *StateMachineEngine) SetTransitionHandler(handler TransitionHandler)
SetTransitionHandler sets the handler for all state transitions
func (*StateMachineEngine) Start ¶
func (e *StateMachineEngine) Start(ctx context.Context) error
Start starts the state machine engine
func (*StateMachineEngine) Stop ¶
func (e *StateMachineEngine) Stop(ctx context.Context) error
Stop stops the state machine engine. It waits for in-flight goroutines to finish (or context to expire) and flushes all instances to persistence.
func (*StateMachineEngine) TrackGoroutine ¶
func (e *StateMachineEngine) TrackGoroutine(fn func())
TrackGoroutine spawns a goroutine tracked by the engine's WaitGroup so that Stop() can drain in-flight work before shutdown.
func (*StateMachineEngine) TriggerTransition ¶
func (e *StateMachineEngine) TriggerTransition( ctx context.Context, workflowID string, transitionName string, data map[string]any, ) error
TriggerTransition attempts to transition a workflow's state
type StateMachineGetStep ¶ added in v0.2.7
type StateMachineGetStep struct {
// contains filtered or unexported fields
}
StateMachineGetStep reads the current state of a workflow instance.
func (*StateMachineGetStep) Execute ¶ added in v0.2.7
func (s *StateMachineGetStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute resolves the entity_id template, looks up the StateMachineEngine, and returns the current state of the workflow instance.
func (*StateMachineGetStep) Name ¶ added in v0.2.7
func (s *StateMachineGetStep) Name() string
Name returns the step name.
type StateMachineStateConfig ¶
type StateMachineStateConfig struct {
ID string `json:"id" yaml:"id"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
IsFinal bool `json:"isFinal" yaml:"isFinal"`
IsError bool `json:"isError" yaml:"isError"`
Data map[string]any `json:"data,omitempty" yaml:"data,omitempty"`
}
StateMachineStateConfig represents configuration for a state machine state
type StateMachineStateConnector ¶
type StateMachineStateConnector struct {
// contains filtered or unexported fields
}
StateMachineStateConnector connects state machines to state tracking
func NewStateMachineStateConnector ¶
func NewStateMachineStateConnector(name string) *StateMachineStateConnector
NewStateMachineStateConnector creates a new connector
func (*StateMachineStateConnector) Configure ¶
func (c *StateMachineStateConnector) Configure(mappings []ResourceStateMapping) error
Configure sets up the connector with resource mappings
func (*StateMachineStateConnector) GetEngineForResourceType ¶
func (c *StateMachineStateConnector) GetEngineForResourceType(resourceType string) (string, bool)
GetEngineForResourceType finds the state machine engine for a resource type
func (*StateMachineStateConnector) GetResourceState ¶
func (c *StateMachineStateConnector) GetResourceState(resourceType, resourceID string) (string, map[string]any, error)
GetResourceState gets the current state for a resource
func (*StateMachineStateConnector) Init ¶
func (c *StateMachineStateConnector) Init(app modular.Application) error
Init initializes the connector
func (*StateMachineStateConnector) Name ¶
func (c *StateMachineStateConnector) Name() string
Name returns the service name
func (*StateMachineStateConnector) ProvidesServices ¶
func (c *StateMachineStateConnector) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module
func (*StateMachineStateConnector) RegisterMapping ¶
func (c *StateMachineStateConnector) RegisterMapping(resourceType, stateMachine, instanceIDKey string)
RegisterMapping adds a resource mapping
func (*StateMachineStateConnector) RequiresServices ¶
func (c *StateMachineStateConnector) RequiresServices() []modular.ServiceDependency
RequiresServices returns the services required by this module
func (*StateMachineStateConnector) Start ¶
func (c *StateMachineStateConnector) Start(ctx context.Context) error
Start connects to state machines and sets up listeners
func (*StateMachineStateConnector) Stop ¶
func (c *StateMachineStateConnector) Stop(ctx context.Context) error
Stop stops the connector
func (*StateMachineStateConnector) UpdateResourceState ¶
func (c *StateMachineStateConnector) UpdateResourceState(resourceType, resourceID string) error
UpdateResourceState gets the current state from the state machine and updates the tracker
type StateMachineTransitionConfig ¶
type StateMachineTransitionConfig struct {
ID string `json:"id" yaml:"id"`
FromState string `json:"fromState" yaml:"fromState"`
ToState string `json:"toState" yaml:"toState"`
Condition string `json:"condition,omitempty" yaml:"condition,omitempty"`
AutoTransform bool `json:"autoTransform" yaml:"autoTransform"`
Data map[string]any `json:"data,omitempty" yaml:"data,omitempty"`
}
StateMachineTransitionConfig represents configuration for a state transition
type StateMachineTransitionStep ¶ added in v0.2.7
type StateMachineTransitionStep struct {
// contains filtered or unexported fields
}
StateMachineTransitionStep triggers a state machine transition from within a pipeline.
func (*StateMachineTransitionStep) Execute ¶ added in v0.2.7
func (s *StateMachineTransitionStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute resolves templates, looks up the StateMachineEngine by service name, and triggers the requested transition. On success it sets transition_ok=true and new_state to the resulting state. On failure it sets transition_ok=false and error to the error message; if fail_on_error is true the pipeline is stopped.
func (*StateMachineTransitionStep) Name ¶ added in v0.2.7
func (s *StateMachineTransitionStep) Name() string
Name returns the step name.
type StateTracker ¶
type StateTracker struct {
// contains filtered or unexported fields
}
StateTracker provides a generic service for tracking state
func NewStateTracker ¶
func NewStateTracker(name string) *StateTracker
NewStateTracker creates a new state tracker service
func (*StateTracker) AddStateChangeListener ¶
func (s *StateTracker) AddStateChangeListener(resourceType string, listener StateChangeListener)
AddStateChangeListener adds a listener for state changes of a specific resource type
func (*StateTracker) GetState ¶
func (s *StateTracker) GetState(resourceType, resourceID string) (StateInfo, bool)
GetState retrieves state information for a resource
func (*StateTracker) Init ¶
func (s *StateTracker) Init(app modular.Application) error
Init initializes the service
func (*StateTracker) ProvidesServices ¶
func (s *StateTracker) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module
func (*StateTracker) RequiresServices ¶
func (s *StateTracker) RequiresServices() []modular.ServiceDependency
RequiresServices returns the services required by this module
func (*StateTracker) RetentionDays ¶
func (s *StateTracker) RetentionDays() int
RetentionDays returns the configured retention period in days.
func (*StateTracker) SetRetentionDays ¶
func (s *StateTracker) SetRetentionDays(days int)
SetRetentionDays sets the state history retention in days.
func (*StateTracker) SetState ¶
func (s *StateTracker) SetState(resourceType, resourceID, state string, data map[string]any)
SetState updates the state for a resource
type StaticFileServer ¶
type StaticFileServer struct {
// contains filtered or unexported fields
}
StaticFileServer serves static files from a directory with optional SPA fallback
func NewStaticFileServer ¶
func NewStaticFileServer(name, root, prefix string, opts ...StaticFileServerOption) *StaticFileServer
NewStaticFileServer creates a new static file server module. Use WithSPAFallback() and WithCacheMaxAge() to customise behaviour.
func (*StaticFileServer) Handle ¶
func (s *StaticFileServer) Handle(w http.ResponseWriter, r *http.Request)
Handle serves static files
func (*StaticFileServer) Init ¶
func (s *StaticFileServer) Init(app modular.Application) error
Init initializes the module
func (*StaticFileServer) Name ¶
func (s *StaticFileServer) Name() string
Name returns the module name
func (*StaticFileServer) Prefix ¶
func (s *StaticFileServer) Prefix() string
Prefix returns the URL prefix for this file server
func (*StaticFileServer) ProvidesServices ¶
func (s *StaticFileServer) ProvidesServices() []modular.ServiceProvider
ProvidesServices returns the services provided by this module
func (*StaticFileServer) RequiresServices ¶
func (s *StaticFileServer) RequiresServices() []modular.ServiceDependency
RequiresServices returns services required by this module
func (*StaticFileServer) RouterName ¶
func (s *StaticFileServer) RouterName() string
RouterName returns the optional router name this file server should attach to. An empty string means attach to the first available router.
func (*StaticFileServer) SPAFallbackEnabled ¶ added in v0.2.16
func (s *StaticFileServer) SPAFallbackEnabled() bool
SPAFallbackEnabled returns whether SPA fallback is active.
func (*StaticFileServer) SetRouterName ¶
func (s *StaticFileServer) SetRouterName(name string)
SetRouterName sets the router name this file server should attach to.
type StaticFileServerOption ¶ added in v0.1.6
type StaticFileServerOption func(*StaticFileServer)
StaticFileServerOption is a functional option for configuring a StaticFileServer.
func WithCacheMaxAge ¶ added in v0.1.6
func WithCacheMaxAge(seconds int) StaticFileServerOption
WithCacheMaxAge sets the Cache-Control max-age value (in seconds). Defaults to 3600 when not specified or when seconds <= 0.
func WithSPAFallback ¶ added in v0.1.6
func WithSPAFallback() StaticFileServerOption
WithSPAFallback enables Single Page Application fallback: requests for unknown paths are served with index.html instead of a 404.
type StdIntegrationRegistry ¶
type StdIntegrationRegistry struct {
// contains filtered or unexported fields
}
StdIntegrationRegistry manages available integration connectors
func NewIntegrationRegistry ¶
func NewIntegrationRegistry(name string) *StdIntegrationRegistry
NewIntegrationRegistry creates a new integration registry
func (*StdIntegrationRegistry) GetConnector ¶
func (r *StdIntegrationRegistry) GetConnector(name string) (IntegrationConnector, error)
GetConnector retrieves a connector by name
func (*StdIntegrationRegistry) Init ¶
func (r *StdIntegrationRegistry) Init(app modular.Application) error
Init initializes the registry with service dependencies
func (*StdIntegrationRegistry) ListConnectors ¶
func (r *StdIntegrationRegistry) ListConnectors() []string
ListConnectors returns all registered connectors
func (*StdIntegrationRegistry) Name ¶
func (r *StdIntegrationRegistry) Name() string
Name returns the module name
func (*StdIntegrationRegistry) RegisterConnector ¶
func (r *StdIntegrationRegistry) RegisterConnector(connector IntegrationConnector)
RegisterConnector adds a connector to the registry
func (*StdIntegrationRegistry) Start ¶
func (r *StdIntegrationRegistry) Start() error
Start starts all registered connectors
func (*StdIntegrationRegistry) Stop ¶
func (r *StdIntegrationRegistry) Stop() error
Stop stops all registered connectors
type StepFactory ¶
type StepFactory func(name string, config map[string]any, app modular.Application) (PipelineStep, error)
StepFactory creates a PipelineStep from its name and config.
func NewAIClassifyStepFactory ¶
func NewAIClassifyStepFactory(registry *ai.AIModelRegistry) StepFactory
NewAIClassifyStepFactory returns a StepFactory that creates AIClassifyStep instances.
func NewAICompleteStepFactory ¶
func NewAICompleteStepFactory(registry *ai.AIModelRegistry) StepFactory
NewAICompleteStepFactory returns a StepFactory that creates AICompleteStep instances.
func NewAIExtractStepFactory ¶
func NewAIExtractStepFactory(registry *ai.AIModelRegistry) StepFactory
NewAIExtractStepFactory returns a StepFactory that creates AIExtractStep instances.
func NewApigwApplyStepFactory ¶ added in v0.2.14
func NewApigwApplyStepFactory() StepFactory
NewApigwApplyStepFactory returns a StepFactory for step.apigw_apply.
func NewApigwDestroyStepFactory ¶ added in v0.2.14
func NewApigwDestroyStepFactory() StepFactory
NewApigwDestroyStepFactory returns a StepFactory for step.apigw_destroy.
func NewApigwPlanStepFactory ¶ added in v0.2.14
func NewApigwPlanStepFactory() StepFactory
NewApigwPlanStepFactory returns a StepFactory for step.apigw_plan.
func NewApigwStatusStepFactory ¶ added in v0.2.14
func NewApigwStatusStepFactory() StepFactory
NewApigwStatusStepFactory returns a StepFactory for step.apigw_status.
func NewAppDeployStepFactory ¶ added in v0.2.14
func NewAppDeployStepFactory() StepFactory
NewAppDeployStepFactory returns a StepFactory for step.app_deploy.
func NewAppRollbackStepFactory ¶ added in v0.2.14
func NewAppRollbackStepFactory() StepFactory
NewAppRollbackStepFactory returns a StepFactory for step.app_rollback.
func NewAppStatusStepFactory ¶ added in v0.2.14
func NewAppStatusStepFactory() StepFactory
NewAppStatusStepFactory returns a StepFactory for step.app_status.
func NewArgoDeleteStepFactory ¶ added in v0.2.15
func NewArgoDeleteStepFactory() StepFactory
NewArgoDeleteStepFactory returns a StepFactory for step.argo_delete.
func NewArgoListStepFactory ¶ added in v0.2.15
func NewArgoListStepFactory() StepFactory
NewArgoListStepFactory returns a StepFactory for step.argo_list.
func NewArgoLogsStepFactory ¶ added in v0.2.15
func NewArgoLogsStepFactory() StepFactory
NewArgoLogsStepFactory returns a StepFactory for step.argo_logs.
func NewArgoStatusStepFactory ¶ added in v0.2.15
func NewArgoStatusStepFactory() StepFactory
NewArgoStatusStepFactory returns a StepFactory for step.argo_status.
func NewArgoSubmitStepFactory ¶ added in v0.2.15
func NewArgoSubmitStepFactory() StepFactory
NewArgoSubmitStepFactory returns a StepFactory for step.argo_submit.
func NewArtifactDeleteStepFactory ¶ added in v0.2.13
func NewArtifactDeleteStepFactory() StepFactory
NewArtifactDeleteStepFactory returns a StepFactory for step.artifact_delete.
func NewArtifactDownloadStepFactory ¶ added in v0.2.13
func NewArtifactDownloadStepFactory() StepFactory
NewArtifactDownloadStepFactory returns a StepFactory for step.artifact_download.
func NewArtifactListStepFactory ¶ added in v0.2.13
func NewArtifactListStepFactory() StepFactory
NewArtifactListStepFactory returns a StepFactory for step.artifact_list.
func NewArtifactPullStepFactory ¶
func NewArtifactPullStepFactory() StepFactory
NewArtifactPullStepFactory returns a StepFactory that creates ArtifactPullStep instances.
func NewArtifactPushStepFactory ¶
func NewArtifactPushStepFactory() StepFactory
NewArtifactPushStepFactory returns a StepFactory that creates ArtifactPushStep instances.
func NewArtifactUploadStepFactory ¶ added in v0.2.13
func NewArtifactUploadStepFactory() StepFactory
NewArtifactUploadStepFactory returns a StepFactory for step.artifact_upload.
func NewBuildBinaryStepFactory ¶ added in v0.2.13
func NewBuildBinaryStepFactory() StepFactory
NewBuildBinaryStepFactory returns a StepFactory that creates BuildBinaryStep instances.
func NewBuildFromConfigStepFactory ¶ added in v0.2.6
func NewBuildFromConfigStepFactory() StepFactory
NewBuildFromConfigStepFactory returns a StepFactory that creates BuildFromConfigStep instances.
func NewBuildUIStepFactory ¶
func NewBuildUIStepFactory() StepFactory
NewBuildUIStepFactory returns a StepFactory that creates BuildUIStep instances.
func NewCacheDeleteStepFactory ¶ added in v0.2.7
func NewCacheDeleteStepFactory() StepFactory
NewCacheDeleteStepFactory returns a StepFactory that creates CacheDeleteStep instances.
func NewCacheGetStepFactory ¶ added in v0.2.7
func NewCacheGetStepFactory() StepFactory
NewCacheGetStepFactory returns a StepFactory that creates CacheGetStep instances.
func NewCacheSetStepFactory ¶ added in v0.2.7
func NewCacheSetStepFactory() StepFactory
NewCacheSetStepFactory returns a StepFactory that creates CacheSetStep instances.
func NewCircuitBreakerStepFactory ¶
func NewCircuitBreakerStepFactory() StepFactory
NewCircuitBreakerStepFactory returns a StepFactory that creates CircuitBreakerStep instances.
func NewCloudValidateStepFactory ¶ added in v0.2.13
func NewCloudValidateStepFactory() StepFactory
NewCloudValidateStepFactory returns a StepFactory for step.cloud_validate.
func NewCodeBuildCreateProjectStepFactory ¶ added in v0.2.15
func NewCodeBuildCreateProjectStepFactory() StepFactory
NewCodeBuildCreateProjectStepFactory returns a StepFactory for step.codebuild_create_project.
func NewCodeBuildDeleteProjectStepFactory ¶ added in v0.2.15
func NewCodeBuildDeleteProjectStepFactory() StepFactory
NewCodeBuildDeleteProjectStepFactory returns a StepFactory for step.codebuild_delete_project.
func NewCodeBuildListBuildsStepFactory ¶ added in v0.2.15
func NewCodeBuildListBuildsStepFactory() StepFactory
NewCodeBuildListBuildsStepFactory returns a StepFactory for step.codebuild_list_builds.
func NewCodeBuildLogsStepFactory ¶ added in v0.2.15
func NewCodeBuildLogsStepFactory() StepFactory
NewCodeBuildLogsStepFactory returns a StepFactory for step.codebuild_logs.
func NewCodeBuildStartStepFactory ¶ added in v0.2.15
func NewCodeBuildStartStepFactory() StepFactory
NewCodeBuildStartStepFactory returns a StepFactory for step.codebuild_start.
func NewCodeBuildStatusStepFactory ¶ added in v0.2.15
func NewCodeBuildStatusStepFactory() StepFactory
NewCodeBuildStatusStepFactory returns a StepFactory for step.codebuild_status.
func NewConditionalStepFactory ¶
func NewConditionalStepFactory() StepFactory
NewConditionalStepFactory returns a StepFactory that creates ConditionalStep instances.
func NewConstraintCheckStepFactory ¶
func NewConstraintCheckStepFactory() StepFactory
NewConstraintCheckStepFactory returns a StepFactory that creates ConstraintCheckStep instances.
func NewDBExecStepFactory ¶
func NewDBExecStepFactory() StepFactory
NewDBExecStepFactory returns a StepFactory that creates DBExecStep instances.
func NewDBQueryStepFactory ¶
func NewDBQueryStepFactory() StepFactory
NewDBQueryStepFactory returns a StepFactory that creates DBQueryStep instances.
func NewDNSApplyStepFactory ¶ added in v0.2.14
func NewDNSApplyStepFactory() StepFactory
NewDNSApplyStepFactory returns a StepFactory for step.dns_apply.
func NewDNSPlanStepFactory ¶ added in v0.2.14
func NewDNSPlanStepFactory() StepFactory
NewDNSPlanStepFactory returns a StepFactory for step.dns_plan.
func NewDNSStatusStepFactory ¶ added in v0.2.14
func NewDNSStatusStepFactory() StepFactory
NewDNSStatusStepFactory returns a StepFactory for step.dns_status.
func NewDODeployStepFactory ¶ added in v0.2.15
func NewDODeployStepFactory() StepFactory
NewDODeployStepFactory returns a StepFactory for step.do_deploy.
func NewDODestroyStepFactory ¶ added in v0.2.15
func NewDODestroyStepFactory() StepFactory
NewDODestroyStepFactory returns a StepFactory for step.do_destroy.
func NewDOLogsStepFactory ¶ added in v0.2.15
func NewDOLogsStepFactory() StepFactory
NewDOLogsStepFactory returns a StepFactory for step.do_logs.
func NewDOScaleStepFactory ¶ added in v0.2.15
func NewDOScaleStepFactory() StepFactory
NewDOScaleStepFactory returns a StepFactory for step.do_scale.
func NewDOStatusStepFactory ¶ added in v0.2.15
func NewDOStatusStepFactory() StepFactory
NewDOStatusStepFactory returns a StepFactory for step.do_status.
func NewDelegateStepFactory ¶
func NewDelegateStepFactory() StepFactory
NewDelegateStepFactory returns a StepFactory that creates DelegateStep instances.
func NewDeployStepFactory ¶
func NewDeployStepFactory() StepFactory
NewDeployStepFactory returns a StepFactory that creates DeployStep instances.
func NewDockerBuildStepFactory ¶
func NewDockerBuildStepFactory() StepFactory
NewDockerBuildStepFactory returns a StepFactory that creates DockerBuildStep instances.
func NewDockerPushStepFactory ¶
func NewDockerPushStepFactory() StepFactory
NewDockerPushStepFactory returns a StepFactory that creates DockerPushStep instances.
func NewDockerRunStepFactory ¶
func NewDockerRunStepFactory() StepFactory
NewDockerRunStepFactory returns a StepFactory that creates DockerRunStep instances.
func NewDriftCheckStepFactory ¶
func NewDriftCheckStepFactory() StepFactory
NewDriftCheckStepFactory returns a StepFactory that creates DriftCheckStep instances.
func NewECSApplyStepFactory ¶ added in v0.2.14
func NewECSApplyStepFactory() StepFactory
NewECSApplyStepFactory returns a StepFactory for step.ecs_apply.
func NewECSDestroyStepFactory ¶ added in v0.2.14
func NewECSDestroyStepFactory() StepFactory
NewECSDestroyStepFactory returns a StepFactory for step.ecs_destroy.
func NewECSPlanStepFactory ¶ added in v0.2.14
func NewECSPlanStepFactory() StepFactory
NewECSPlanStepFactory returns a StepFactory for step.ecs_plan.
func NewECSStatusStepFactory ¶ added in v0.2.14
func NewECSStatusStepFactory() StepFactory
NewECSStatusStepFactory returns a StepFactory for step.ecs_status.
func NewFFGateStepFactory ¶
func NewFFGateStepFactory(service *featureflag.Service) StepFactory
NewFFGateStepFactory returns a StepFactory that creates FFGateStep instances.
func NewFeatureFlagStepFactory ¶
func NewFeatureFlagStepFactory(service *featureflag.Service) StepFactory
NewFeatureFlagStepFactory returns a StepFactory that creates FeatureFlagStep instances. The factory captures the FF service via closure so steps can evaluate flags at runtime.
func NewForEachStepFactory ¶ added in v0.2.3
func NewForEachStepFactory(registryFn func() *StepRegistry, app modular.Application) StepFactory
NewForEachStepFactory returns a StepFactory that creates ForEachStep instances. registryFn is called at step-creation time to obtain the step registry used to build sub-steps. Passing a function (rather than the registry directly) allows the factory to be registered before the registry is fully populated, enabling sub-steps to themselves be any registered step type.
func NewGateStepFactory ¶
func NewGateStepFactory() StepFactory
NewGateStepFactory returns a StepFactory that creates GateStep instances.
func NewGitCheckoutStepFactory ¶ added in v0.2.9
func NewGitCheckoutStepFactory() StepFactory
NewGitCheckoutStepFactory returns a StepFactory that creates GitCheckoutStep instances.
func NewGitCloneStepFactory ¶ added in v0.2.9
func NewGitCloneStepFactory() StepFactory
NewGitCloneStepFactory returns a StepFactory that creates GitCloneStep instances.
func NewGitCommitStepFactory ¶ added in v0.2.9
func NewGitCommitStepFactory() StepFactory
NewGitCommitStepFactory returns a StepFactory that creates GitCommitStep instances.
func NewGitLabCreateMRStepFactory ¶ added in v0.2.13
func NewGitLabCreateMRStepFactory() StepFactory
NewGitLabCreateMRStepFactory returns a StepFactory for step.gitlab_create_mr.
- type: step.gitlab_create_mr config: client: gitlab-client project: "group/project" source_branch: feature-x target_branch: main title: "Feature X" description: "Optional description"
func NewGitLabMRCommentStepFactory ¶ added in v0.2.13
func NewGitLabMRCommentStepFactory() StepFactory
NewGitLabMRCommentStepFactory returns a StepFactory for step.gitlab_mr_comment.
- type: step.gitlab_mr_comment config: client: gitlab-client project: "group/project" mr_iid: 42 body: "Pipeline passed!"
func NewGitLabPipelineStatusStepFactory ¶ added in v0.2.13
func NewGitLabPipelineStatusStepFactory() StepFactory
NewGitLabPipelineStatusStepFactory returns a StepFactory for step.gitlab_pipeline_status.
- type: step.gitlab_pipeline_status config: client: gitlab-client project: "group/project" pipeline_id: "42" # string or int
func NewGitLabTriggerPipelineStepFactory ¶ added in v0.2.13
func NewGitLabTriggerPipelineStepFactory() StepFactory
NewGitLabTriggerPipelineStepFactory returns a StepFactory for step.gitlab_trigger_pipeline.
- type: step.gitlab_trigger_pipeline config: client: gitlab-client # name of the gitlab.client module project: "group/project" # project path or numeric ID ref: main variables: KEY: value
func NewGitLabWebhookParseStepFactory ¶ added in v0.2.13
func NewGitLabWebhookParseStepFactory() StepFactory
NewGitLabWebhookParseStepFactory returns a StepFactory for step.gitlab_parse_webhook.
func NewGitPushStepFactory ¶ added in v0.2.9
func NewGitPushStepFactory() StepFactory
NewGitPushStepFactory returns a StepFactory that creates GitPushStep instances.
func NewGitTagStepFactory ¶ added in v0.2.9
func NewGitTagStepFactory() StepFactory
NewGitTagStepFactory returns a StepFactory that creates GitTagStep instances.
func NewHTTPCallStepFactory ¶
func NewHTTPCallStepFactory() StepFactory
NewHTTPCallStepFactory returns a StepFactory that creates HTTPCallStep instances.
func NewIaCApplyStepFactory ¶ added in v0.2.13
func NewIaCApplyStepFactory() StepFactory
NewIaCApplyStepFactory returns a StepFactory for step.iac_apply.
func NewIaCDestroyStepFactory ¶ added in v0.2.13
func NewIaCDestroyStepFactory() StepFactory
NewIaCDestroyStepFactory returns a StepFactory for step.iac_destroy.
func NewIaCDriftDetectStepFactory ¶ added in v0.2.13
func NewIaCDriftDetectStepFactory() StepFactory
NewIaCDriftDetectStepFactory returns a StepFactory for step.iac_drift_detect.
func NewIaCPlanStepFactory ¶ added in v0.2.13
func NewIaCPlanStepFactory() StepFactory
NewIaCPlanStepFactory returns a StepFactory for step.iac_plan.
func NewIaCStatusStepFactory ¶ added in v0.2.13
func NewIaCStatusStepFactory() StepFactory
NewIaCStatusStepFactory returns a StepFactory for step.iac_status.
func NewJQStepFactory ¶
func NewJQStepFactory() StepFactory
NewJQStepFactory returns a StepFactory that creates JQStep instances.
func NewJSONResponseStepFactory ¶
func NewJSONResponseStepFactory() StepFactory
NewJSONResponseStepFactory returns a StepFactory that creates JSONResponseStep instances.
func NewK8sApplyStepFactory ¶ added in v0.2.13
func NewK8sApplyStepFactory() StepFactory
NewK8sApplyStepFactory returns a StepFactory for step.k8s_apply.
func NewK8sDestroyStepFactory ¶ added in v0.2.13
func NewK8sDestroyStepFactory() StepFactory
NewK8sDestroyStepFactory returns a StepFactory for step.k8s_destroy.
func NewK8sPlanStepFactory ¶ added in v0.2.13
func NewK8sPlanStepFactory() StepFactory
NewK8sPlanStepFactory returns a StepFactory for step.k8s_plan.
func NewK8sStatusStepFactory ¶ added in v0.2.13
func NewK8sStatusStepFactory() StepFactory
NewK8sStatusStepFactory returns a StepFactory for step.k8s_status.
func NewLogStepFactory ¶
func NewLogStepFactory() StepFactory
NewLogStepFactory returns a StepFactory that creates LogStep instances.
func NewMarketplaceDetailStepFactory ¶ added in v0.2.15
func NewMarketplaceDetailStepFactory(registry MarketplaceRegistry) StepFactory
NewMarketplaceDetailStepFactory returns a StepFactory for step.marketplace_detail.
func NewMarketplaceInstallStepFactory ¶ added in v0.2.15
func NewMarketplaceInstallStepFactory(registry MarketplaceRegistry) StepFactory
NewMarketplaceInstallStepFactory returns a StepFactory for step.marketplace_install.
func NewMarketplaceInstalledStepFactory ¶ added in v0.2.15
func NewMarketplaceInstalledStepFactory(registry MarketplaceRegistry) StepFactory
NewMarketplaceInstalledStepFactory returns a StepFactory for step.marketplace_installed.
func NewMarketplaceSearchStepFactory ¶ added in v0.2.15
func NewMarketplaceSearchStepFactory(registry MarketplaceRegistry) StepFactory
NewMarketplaceSearchStepFactory returns a StepFactory for step.marketplace_search.
func NewMarketplaceUninstallStepFactory ¶ added in v0.2.15
func NewMarketplaceUninstallStepFactory(registry MarketplaceRegistry) StepFactory
NewMarketplaceUninstallStepFactory returns a StepFactory for step.marketplace_uninstall.
func NewMarketplaceUpdateStepFactory ¶ added in v0.2.15
func NewMarketplaceUpdateStepFactory(registry MarketplaceRegistry) StepFactory
NewMarketplaceUpdateStepFactory returns a StepFactory for step.marketplace_update.
func NewNetworkApplyStepFactory ¶ added in v0.2.14
func NewNetworkApplyStepFactory() StepFactory
NewNetworkApplyStepFactory returns a StepFactory for step.network_apply.
func NewNetworkPlanStepFactory ¶ added in v0.2.14
func NewNetworkPlanStepFactory() StepFactory
NewNetworkPlanStepFactory returns a StepFactory for step.network_plan.
func NewNetworkStatusStepFactory ¶ added in v0.2.14
func NewNetworkStatusStepFactory() StepFactory
NewNetworkStatusStepFactory returns a StepFactory for step.network_status.
func NewNoSQLDeleteStepFactory ¶ added in v0.2.13
func NewNoSQLDeleteStepFactory() StepFactory
NewNoSQLDeleteStepFactory returns a StepFactory for step.nosql_delete.
func NewNoSQLGetStepFactory ¶ added in v0.2.13
func NewNoSQLGetStepFactory() StepFactory
NewNoSQLGetStepFactory returns a StepFactory for step.nosql_get.
func NewNoSQLPutStepFactory ¶ added in v0.2.13
func NewNoSQLPutStepFactory() StepFactory
NewNoSQLPutStepFactory returns a StepFactory for step.nosql_put.
func NewNoSQLQueryStepFactory ¶ added in v0.2.13
func NewNoSQLQueryStepFactory() StepFactory
NewNoSQLQueryStepFactory returns a StepFactory for step.nosql_query.
func NewPlatformApplyStepFactory ¶
func NewPlatformApplyStepFactory() StepFactory
NewPlatformApplyStepFactory returns a StepFactory that creates PlatformApplyStep instances.
func NewPlatformDestroyStepFactory ¶
func NewPlatformDestroyStepFactory() StepFactory
NewPlatformDestroyStepFactory returns a StepFactory that creates PlatformDestroyStep instances.
func NewPlatformPlanStepFactory ¶
func NewPlatformPlanStepFactory() StepFactory
NewPlatformPlanStepFactory returns a StepFactory that creates PlatformPlanStep instances.
func NewPlatformTemplateStepFactory ¶
func NewPlatformTemplateStepFactory() StepFactory
NewPlatformTemplateStepFactory returns a StepFactory that creates PlatformTemplateStep instances. The step looks up the TemplateRegistry from the modular Application's service registry.
func NewPolicyEvaluateStepFactory ¶ added in v0.2.15
func NewPolicyEvaluateStepFactory() StepFactory
NewPolicyEvaluateStepFactory returns a StepFactory for step.policy_evaluate.
func NewPolicyListStepFactory ¶ added in v0.2.15
func NewPolicyListStepFactory() StepFactory
NewPolicyListStepFactory returns a StepFactory for step.policy_list.
func NewPolicyLoadStepFactory ¶ added in v0.2.15
func NewPolicyLoadStepFactory() StepFactory
NewPolicyLoadStepFactory returns a StepFactory for step.policy_load.
func NewPolicyTestStepFactory ¶ added in v0.2.15
func NewPolicyTestStepFactory() StepFactory
NewPolicyTestStepFactory returns a StepFactory for step.policy_test.
func NewPublishStepFactory ¶
func NewPublishStepFactory() StepFactory
NewPublishStepFactory returns a StepFactory that creates PublishStep instances.
func NewRateLimitStepFactory ¶
func NewRateLimitStepFactory() StepFactory
NewRateLimitStepFactory returns a StepFactory that creates RateLimitStep instances.
func NewRegionDeployStepFactory ¶ added in v0.2.15
func NewRegionDeployStepFactory() StepFactory
NewRegionDeployStepFactory returns a StepFactory for step.region_deploy.
func NewRegionFailoverStepFactory ¶ added in v0.2.15
func NewRegionFailoverStepFactory() StepFactory
NewRegionFailoverStepFactory returns a StepFactory for step.region_failover.
func NewRegionPromoteStepFactory ¶ added in v0.2.15
func NewRegionPromoteStepFactory() StepFactory
NewRegionPromoteStepFactory returns a StepFactory for step.region_promote.
func NewRegionStatusStepFactory ¶ added in v0.2.15
func NewRegionStatusStepFactory() StepFactory
NewRegionStatusStepFactory returns a StepFactory for step.region_status.
func NewRegionSyncStepFactory ¶ added in v0.2.15
func NewRegionSyncStepFactory() StepFactory
NewRegionSyncStepFactory returns a StepFactory for step.region_sync.
func NewRegionWeightStepFactory ¶ added in v0.2.15
func NewRegionWeightStepFactory() StepFactory
NewRegionWeightStepFactory returns a StepFactory for step.region_weight.
func NewRequestParseStepFactory ¶
func NewRequestParseStepFactory() StepFactory
NewRequestParseStepFactory returns a StepFactory that creates RequestParseStep instances.
func NewScaffoldAnalyzeStepFactory ¶ added in v0.2.13
func NewScaffoldAnalyzeStepFactory() StepFactory
NewScaffoldAnalyzeStepFactory returns a StepFactory that creates ScaffoldAnalyzeStep instances.
func NewScaffoldStepFactory ¶ added in v0.2.13
func NewScaffoldStepFactory() StepFactory
NewScaffoldStepFactory returns a StepFactory that creates ScaffoldStep instances.
func NewScalingApplyStepFactory ¶ added in v0.2.14
func NewScalingApplyStepFactory() StepFactory
NewScalingApplyStepFactory returns a StepFactory for step.scaling_apply.
func NewScalingDestroyStepFactory ¶ added in v0.2.14
func NewScalingDestroyStepFactory() StepFactory
NewScalingDestroyStepFactory returns a StepFactory for step.scaling_destroy.
func NewScalingPlanStepFactory ¶ added in v0.2.14
func NewScalingPlanStepFactory() StepFactory
NewScalingPlanStepFactory returns a StepFactory for step.scaling_plan.
func NewScalingStatusStepFactory ¶ added in v0.2.14
func NewScalingStatusStepFactory() StepFactory
NewScalingStatusStepFactory returns a StepFactory for step.scaling_status.
func NewScanContainerStepFactory ¶
func NewScanContainerStepFactory() StepFactory
NewScanContainerStepFactory returns a StepFactory that creates ScanContainerStep instances.
func NewScanDepsStepFactory ¶
func NewScanDepsStepFactory() StepFactory
NewScanDepsStepFactory returns a StepFactory that creates ScanDepsStep instances.
func NewScanSASTStepFactory ¶
func NewScanSASTStepFactory() StepFactory
NewScanSASTStepFactory returns a StepFactory that creates ScanSASTStep instances.
func NewSetStepFactory ¶
func NewSetStepFactory() StepFactory
NewSetStepFactory returns a StepFactory that creates SetStep instances.
func NewShellExecStepFactory ¶
func NewShellExecStepFactory() StepFactory
NewShellExecStepFactory returns a StepFactory that creates ShellExecStep instances.
func NewStateMachineGetStepFactory ¶ added in v0.2.7
func NewStateMachineGetStepFactory() StepFactory
NewStateMachineGetStepFactory returns a StepFactory for step.statemachine_get.
Config:
type: step.statemachine_get
config:
statemachine: "order-sm" # service name of the StateMachineEngine
entity_id: "{{.order_id}}" # which instance to look up (template)
Outputs: current_state (string), entity_id (string). Returns an error (stopping the pipeline) when the instance is not found.
func NewStateMachineTransitionStepFactory ¶ added in v0.2.7
func NewStateMachineTransitionStepFactory() StepFactory
NewStateMachineTransitionStepFactory returns a StepFactory for step.statemachine_transition.
Config:
type: step.statemachine_transition
config:
statemachine: "order-sm" # service name of the StateMachineEngine
entity_id: "{{.order_id}}" # which instance to transition (template)
event: "approve" # transition name
data: # optional data map (values may use templates)
approved_by: "{{.user_id}}"
fail_on_error: false # stop pipeline on invalid transition (default: false)
Outputs: transition_ok (bool), new_state (string), error (string, only on failure).
func NewSubWorkflowStepFactory ¶
func NewSubWorkflowStepFactory(registry *plugin.PluginWorkflowRegistry, stepBuilder SubWorkflowStepBuilder) StepFactory
NewSubWorkflowStepFactory returns a StepFactory that creates SubWorkflowStep instances. The registry and stepBuilder are captured by closure so that the factory has access to them at step creation time.
func NewTraceAnnotateStepFactory ¶ added in v0.2.15
func NewTraceAnnotateStepFactory() StepFactory
NewTraceAnnotateStepFactory returns a StepFactory for step.trace_annotate.
func NewTraceExtractStepFactory ¶ added in v0.2.15
func NewTraceExtractStepFactory() StepFactory
NewTraceExtractStepFactory returns a StepFactory for step.trace_extract.
func NewTraceInjectStepFactory ¶ added in v0.2.15
func NewTraceInjectStepFactory() StepFactory
NewTraceInjectStepFactory returns a StepFactory for step.trace_inject.
func NewTraceLinkStepFactory ¶ added in v0.2.15
func NewTraceLinkStepFactory() StepFactory
NewTraceLinkStepFactory returns a StepFactory for step.trace_link.
func NewTraceStartStepFactory ¶ added in v0.2.15
func NewTraceStartStepFactory() StepFactory
NewTraceStartStepFactory returns a StepFactory for step.trace_start.
func NewTransformStepFactory ¶
func NewTransformStepFactory() StepFactory
NewTransformStepFactory returns a StepFactory that creates TransformStep instances.
func NewValidatePaginationStepFactory ¶ added in v0.1.6
func NewValidatePaginationStepFactory() StepFactory
NewValidatePaginationStepFactory returns a StepFactory that creates ValidatePaginationStep instances.
func NewValidatePathParamStepFactory ¶ added in v0.1.6
func NewValidatePathParamStepFactory() StepFactory
NewValidatePathParamStepFactory returns a StepFactory that creates ValidatePathParamStep instances.
func NewValidateRequestBodyStepFactory ¶ added in v0.1.6
func NewValidateRequestBodyStepFactory() StepFactory
NewValidateRequestBodyStepFactory returns a StepFactory that creates ValidateRequestBodyStep instances.
func NewValidateStepFactory ¶
func NewValidateStepFactory() StepFactory
NewValidateStepFactory returns a StepFactory that creates ValidateStep instances.
func NewWebhookVerifyStepFactory ¶ added in v0.2.3
func NewWebhookVerifyStepFactory() StepFactory
NewWebhookVerifyStepFactory returns a StepFactory that creates WebhookVerifyStep instances.
func NewWorkflowCallStepFactory ¶ added in v0.1.6
func NewWorkflowCallStepFactory(lookup PipelineLookupFn) StepFactory
NewWorkflowCallStepFactory returns a StepFactory for step.workflow_call. The lookup function is captured by closure so the step can resolve target pipelines at execution time (supporting pipelines registered after factory creation).
type StepLifecycleEvent ¶
type StepLifecycleEvent struct {
WorkflowType string `json:"workflowType"`
StepName string `json:"stepName"`
Connector string `json:"connector"`
Action string `json:"action"`
Status string `json:"status"`
Timestamp time.Time `json:"timestamp"`
Duration time.Duration `json:"duration,omitempty"`
Data map[string]any `json:"data,omitempty"`
Error string `json:"error,omitempty"`
Results map[string]any `json:"results,omitempty"`
}
StepLifecycleEvent is the payload published for step-level lifecycle events.
type StepRegistry ¶
type StepRegistry struct {
// contains filtered or unexported fields
}
StepRegistry maps step type strings to factory functions.
func NewStepRegistry ¶
func NewStepRegistry() *StepRegistry
NewStepRegistry creates an empty StepRegistry.
func (*StepRegistry) Create ¶
func (r *StepRegistry) Create(stepType, name string, config map[string]any, app modular.Application) (PipelineStep, error)
Create instantiates a PipelineStep of the given type.
func (*StepRegistry) Register ¶
func (r *StepRegistry) Register(stepType string, factory StepFactory)
Register adds a step factory for the given type string.
func (*StepRegistry) Types ¶
func (r *StepRegistry) Types() []string
Types returns all registered step type names.
type StepResult ¶
type StepResult struct {
// Output is the data produced by this step.
Output map[string]any
// NextStep overrides the default next step (for conditional routing).
// Empty string means continue to the next step in sequence.
NextStep string
// Stop indicates the pipeline should stop after this step (success).
Stop bool
}
StepResult is the output of a single pipeline step execution.
type SubWorkflowStep ¶
type SubWorkflowStep struct {
// contains filtered or unexported fields
}
SubWorkflowStep invokes a registered plugin workflow as a sub-workflow.
func (*SubWorkflowStep) Execute ¶
func (s *SubWorkflowStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute runs the sub-workflow: looks up the embedded workflow, builds a child pipeline, maps inputs, executes, and maps outputs back.
type SubWorkflowStepBuilder ¶
type SubWorkflowStepBuilder func(pipelineName string, cfg *config.WorkflowConfig, app modular.Application) (*Pipeline, error)
SubWorkflowStepBuilder builds pipeline steps from a workflow config's pipeline definitions. This is injected by the engine so the sub_workflow step can construct child pipelines without a circular dependency on engine.
type SubnetConfig ¶ added in v0.2.14
type SubnetConfig struct {
Name string `json:"name"`
CIDR string `json:"cidr"`
AZ string `json:"az"`
Public bool `json:"public"`
}
SubnetConfig describes a single subnet.
type TemplateEngine ¶
type TemplateEngine struct{}
TemplateEngine resolves {{ .field }} expressions against a PipelineContext.
func NewTemplateEngine ¶
func NewTemplateEngine() *TemplateEngine
NewTemplateEngine creates a new TemplateEngine.
func (*TemplateEngine) Resolve ¶
func (te *TemplateEngine) Resolve(tmplStr string, pc *PipelineContext) (string, error)
Resolve evaluates a template string against a PipelineContext. If the string does not contain {{ }}, it is returned as-is.
func (*TemplateEngine) ResolveMap ¶
func (te *TemplateEngine) ResolveMap(data map[string]any, pc *PipelineContext) (map[string]any, error)
ResolveMap evaluates all string values in a map that contain {{ }} expressions. Non-string values and nested maps/slices are processed recursively.
type TestHelper ¶
type TestHelper struct {
// contains filtered or unexported fields
}
TestHelper provides utilities for module tests
func NewTestHelper ¶
func NewTestHelper(app modular.Application) *TestHelper
NewTestHelper creates a new test helper
type TestLogger ¶
type TestLogger struct {
Entries []string
}
TestLogger is a simple logger for testing
func NewTestApplication ¶
func NewTestApplication() (modular.Application, *TestLogger)
NewTestApplication creates an isolated test application
func (*TestLogger) Debug ¶
func (l *TestLogger) Debug(msg string, args ...any)
func (*TestLogger) Error ¶
func (l *TestLogger) Error(msg string, args ...any)
func (*TestLogger) Fatal ¶
func (l *TestLogger) Fatal(msg string, args ...any)
func (*TestLogger) Info ¶
func (l *TestLogger) Info(msg string, args ...any)
func (*TestLogger) Warn ¶
func (l *TestLogger) Warn(msg string, args ...any)
type TimelineServiceModule ¶ added in v0.1.6
type TimelineServiceModule struct {
// contains filtered or unexported fields
}
TimelineServiceModule wraps evstore.TimelineHandler and evstore.ReplayHandler as a modular.Module. It provides HTTP muxes for timeline and replay features via the service registry.
func NewTimelineServiceModule ¶ added in v0.1.6
func NewTimelineServiceModule(name string, eventStore evstore.EventStore) *TimelineServiceModule
NewTimelineServiceModule creates a new timeline service module. It requires a non-nil EventStore to function. Panics if eventStore is nil.
func (*TimelineServiceModule) BackfillMux ¶ added in v0.1.6
func (m *TimelineServiceModule) BackfillMux() http.Handler
BackfillMux returns the HTTP mux for backfill/mock/diff endpoints.
func (*TimelineServiceModule) Init ¶ added in v0.1.6
func (m *TimelineServiceModule) Init(_ modular.Application) error
Init implements modular.Module.
func (*TimelineServiceModule) Name ¶ added in v0.1.6
func (m *TimelineServiceModule) Name() string
Name implements modular.Module.
func (*TimelineServiceModule) ProvidesServices ¶ added in v0.1.6
func (m *TimelineServiceModule) ProvidesServices() []modular.ServiceProvider
ProvidesServices implements modular.Module. Registers the timeline, replay, and backfill muxes as services so the server can delegate routes to them.
func (*TimelineServiceModule) ReplayMux ¶ added in v0.1.6
func (m *TimelineServiceModule) ReplayMux() http.Handler
ReplayMux returns the HTTP mux for replay endpoints.
func (*TimelineServiceModule) RequiresServices ¶ added in v0.1.6
func (m *TimelineServiceModule) RequiresServices() []modular.ServiceDependency
RequiresServices implements modular.Module.
func (*TimelineServiceModule) TimelineMux ¶ added in v0.1.6
func (m *TimelineServiceModule) TimelineMux() http.Handler
TimelineMux returns the HTTP mux for timeline endpoints.
type TraceAnnotateStep ¶ added in v0.2.15
type TraceAnnotateStep struct {
// contains filtered or unexported fields
}
TraceAnnotateStep adds events and attributes to the current span from context.
func (*TraceAnnotateStep) Execute ¶ added in v0.2.15
func (s *TraceAnnotateStep) Execute(ctx context.Context, _ *PipelineContext) (*StepResult, error)
func (*TraceAnnotateStep) Name ¶ added in v0.2.15
func (s *TraceAnnotateStep) Name() string
type TraceExtractStep ¶ added in v0.2.15
type TraceExtractStep struct {
// contains filtered or unexported fields
}
TraceExtractStep extracts trace context from an inbound carrier stored in the pipeline context under carrier_field, and records the extracted IDs.
func (*TraceExtractStep) Execute ¶ added in v0.2.15
func (s *TraceExtractStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*TraceExtractStep) Name ¶ added in v0.2.15
func (s *TraceExtractStep) Name() string
type TraceInjectStep ¶ added in v0.2.15
type TraceInjectStep struct {
// contains filtered or unexported fields
}
TraceInjectStep injects the current trace context into an outbound carrier stored in the pipeline context under carrier_field.
func (*TraceInjectStep) Execute ¶ added in v0.2.15
func (s *TraceInjectStep) Execute(ctx context.Context, _ *PipelineContext) (*StepResult, error)
func (*TraceInjectStep) Name ¶ added in v0.2.15
func (s *TraceInjectStep) Name() string
type TraceLinkStep ¶ added in v0.2.15
type TraceLinkStep struct {
// contains filtered or unexported fields
}
TraceLinkStep links the current trace to a parent trace across service boundaries. The parent trace context is read from pipeline context under parent_field as a map[string]string of W3C traceparent/tracestate headers.
func (*TraceLinkStep) Execute ¶ added in v0.2.15
func (s *TraceLinkStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
func (*TraceLinkStep) Name ¶ added in v0.2.15
func (s *TraceLinkStep) Name() string
type TracePropagationModule ¶ added in v0.2.15
type TracePropagationModule struct {
// contains filtered or unexported fields
}
TracePropagationModule provides trace propagation configuration as a workflow module.
func NewTracePropagationModule ¶ added in v0.2.15
func NewTracePropagationModule(name string, cfg map[string]any) *TracePropagationModule
NewTracePropagationModule creates a new trace propagation module.
func (*TracePropagationModule) EventBridgePropagator ¶ added in v0.2.15
func (m *TracePropagationModule) EventBridgePropagator() *EventBridgeTracePropagator
EventBridgePropagator returns a new EventBridgeTracePropagator configured for this module.
func (*TracePropagationModule) Format ¶ added in v0.2.15
func (m *TracePropagationModule) Format() string
Format returns the configured propagation format.
func (*TracePropagationModule) HTTPPropagator ¶ added in v0.2.15
func (m *TracePropagationModule) HTTPPropagator() *HTTPTracePropagator
HTTPPropagator returns a new HTTPTracePropagator configured for this module.
func (*TracePropagationModule) Init ¶ added in v0.2.15
func (m *TracePropagationModule) Init(_ modular.Application) error
func (*TracePropagationModule) KafkaPropagator ¶ added in v0.2.15
func (m *TracePropagationModule) KafkaPropagator() *KafkaTracePropagator
KafkaPropagator returns a new KafkaTracePropagator configured for this module.
func (*TracePropagationModule) Name ¶ added in v0.2.15
func (m *TracePropagationModule) Name() string
func (*TracePropagationModule) ProvidesServices ¶ added in v0.2.15
func (m *TracePropagationModule) ProvidesServices() []modular.ServiceProvider
func (*TracePropagationModule) RequiresServices ¶ added in v0.2.15
func (m *TracePropagationModule) RequiresServices() []modular.ServiceDependency
func (*TracePropagationModule) Start ¶ added in v0.2.15
func (m *TracePropagationModule) Start(_ context.Context) error
func (*TracePropagationModule) Stop ¶ added in v0.2.15
func (m *TracePropagationModule) Stop(_ context.Context) error
func (*TracePropagationModule) WebhookPropagator ¶ added in v0.2.15
func (m *TracePropagationModule) WebhookPropagator() *WebhookTracePropagator
WebhookPropagator returns a new WebhookTracePropagator configured for this module.
type TraceStartStep ¶ added in v0.2.15
type TraceStartStep struct {
// contains filtered or unexported fields
}
TraceStartStep starts a new trace span and records its IDs in the pipeline context.
func (*TraceStartStep) Execute ¶ added in v0.2.15
func (s *TraceStartStep) Execute(ctx context.Context, _ *PipelineContext) (*StepResult, error)
func (*TraceStartStep) Name ¶ added in v0.2.15
func (s *TraceStartStep) Name() string
type TransformOperation ¶
type TransformOperation struct {
Type string `json:"type" yaml:"type"` // "extract", "map", "convert", "filter"
Config map[string]any `json:"config" yaml:"config"`
}
TransformOperation defines a single transformation step
type TransformPipeline ¶
type TransformPipeline struct {
Name string `json:"name" yaml:"name"`
Operations []TransformOperation `json:"operations" yaml:"operations"`
}
TransformPipeline is a named sequence of operations
type TransformStep ¶
type TransformStep struct {
// contains filtered or unexported fields
}
TransformStep applies a DataTransformer to the pipeline context's current data.
func (*TransformStep) Execute ¶
func (s *TransformStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute runs the transformation and returns the result under the "data" key.
type Transition ¶
type Transition struct {
Name string `json:"name" yaml:"name"`
FromState string `json:"fromState" yaml:"fromState"`
ToState string `json:"toState" yaml:"toState"`
Condition string `json:"condition,omitempty" yaml:"condition,omitempty"`
AutoTransform bool `json:"autoTransform" yaml:"autoTransform"`
Data map[string]any `json:"data,omitempty" yaml:"data,omitempty"`
}
Transition defines a possible state transition
type TransitionEvent ¶
type TransitionEvent struct {
WorkflowID string `json:"workflowId"`
TransitionID string `json:"transitionId"`
FromState string `json:"fromState"`
ToState string `json:"toState"`
Timestamp time.Time `json:"timestamp"`
Data map[string]any `json:"data,omitempty"`
}
TransitionEvent represents a state transition event
func (TransitionEvent) InstanceID ¶
func (e TransitionEvent) InstanceID() string
InstanceID returns the workflow instance ID This method is provided for backward compatibility with code that expects an InstanceID field
type TransitionHandler ¶
type TransitionHandler interface {
HandleTransition(ctx context.Context, event TransitionEvent) error
}
TransitionHandler handles workflow state transitions
type TransitionListener ¶
type TransitionListener func(event TransitionEvent)
TransitionListener is a function that gets called when a transition occurs
type TransitionTrigger ¶
type Trigger ¶
type Trigger = interfaces.Trigger
Trigger is a type alias for interfaces.Trigger. The canonical definition lives in the interfaces package so that the engine and other packages can reference it without importing this module package. All existing code using module.Trigger is unaffected by this alias.
type TriggerRegistry ¶
type TriggerRegistry struct {
// contains filtered or unexported fields
}
TriggerRegistry manages registered triggers and allows finding them by name. It satisfies interfaces.TriggerRegistrar.
func NewTriggerRegistry ¶
func NewTriggerRegistry() *TriggerRegistry
NewTriggerRegistry creates a new trigger registry
func (*TriggerRegistry) GetAllTriggers ¶
func (r *TriggerRegistry) GetAllTriggers() map[string]Trigger
GetAllTriggers returns all registered triggers
func (*TriggerRegistry) GetTrigger ¶
func (r *TriggerRegistry) GetTrigger(name string) (Trigger, bool)
GetTrigger returns a trigger by name
func (*TriggerRegistry) RegisterTrigger ¶
func (r *TriggerRegistry) RegisterTrigger(trigger Trigger)
RegisterTrigger adds a trigger to the registry
type TriggerWorkflower ¶
type TriggerWorkflower interface {
TriggerWorkflow(ctx context.Context, workflowType string, action string, data map[string]any) error
}
TriggerWorkflower is the subset of the engine interface needed for routing.
type User ¶
type User struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
PasswordHash string `json:"-"`
Metadata map[string]any `json:"metadata,omitempty"`
CreatedAt time.Time `json:"createdAt"`
}
User represents a user in the in-memory store
type UserRecord ¶
type UserRecord struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
PasswordHash string `json:"-"`
Metadata map[string]any `json:"metadata,omitempty"`
CreatedAt time.Time `json:"createdAt"`
}
UserRecord represents a user for persistence
type UserStore ¶
type UserStore struct {
// contains filtered or unexported fields
}
UserStore provides user CRUD operations backed by an in-memory store with optional persistence write-through. It can be consumed by auth modules (e.g. auth.jwt) and management APIs.
func NewUserStore ¶
NewUserStore creates a new user store module.
func (*UserStore) CreateUser ¶
func (u *UserStore) CreateUser(email, name, password string, metadata map[string]any) (*User, error)
CreateUser creates a new user with the given email, name, and password.
func (*UserStore) DeleteUser ¶
DeleteUser removes a user by ID.
func (*UserStore) GetUserByID ¶
GetUserByID returns a user by ID.
func (*UserStore) LoadSeedFile ¶
LoadSeedFile loads users from a JSON file.
func (*UserStore) ProvidesServices ¶
func (u *UserStore) ProvidesServices() []modular.ServiceProvider
func (*UserStore) RequiresServices ¶
func (u *UserStore) RequiresServices() []modular.ServiceDependency
func (*UserStore) UpdateUserMetadata ¶
UpdateUserMetadata updates the metadata for a user identified by ID.
type V1APIHandler ¶
type V1APIHandler struct {
// contains filtered or unexported fields
}
V1APIHandler handles the /api/v1/admin/ CRUD endpoints for companies, projects, and workflows. It is wired as a fallback on the admin-queries and admin-commands CQRS handler modules.
func NewV1APIHandler ¶
func NewV1APIHandler(store *V1Store, jwtSecret string) *V1APIHandler
NewV1APIHandler creates a new handler backed by the given store.
func (*V1APIHandler) HandleV1 ¶
func (h *V1APIHandler) HandleV1(w http.ResponseWriter, r *http.Request)
HandleV1 dispatches v1 API requests by parsing path segments and delegating to resource-specific handlers. Each handler is self-contained and manages its own HTTP method routing.
func (*V1APIHandler) ServeHTTP ¶
func (h *V1APIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler for config-driven delegate dispatch.
func (*V1APIHandler) SetDataDir ¶
func (h *V1APIHandler) SetDataDir(dir string)
SetDataDir sets the base data directory used for workspace extraction during import.
func (*V1APIHandler) SetFeatureFlagService ¶
func (h *V1APIHandler) SetFeatureFlagService(svc FeatureFlagAdmin)
SetFeatureFlagService sets the optional feature flag service for admin API.
func (*V1APIHandler) SetReloadFunc ¶
func (h *V1APIHandler) SetReloadFunc(fn func(configYAML string) error)
SetReloadFunc sets the callback invoked when deploying the system workflow.
func (*V1APIHandler) SetRuntimeManager ¶
func (h *V1APIHandler) SetRuntimeManager(rm *RuntimeManager)
SetRuntimeManager sets the runtime manager used for deploy/stop operations.
func (*V1APIHandler) SetWorkspaceHandler ¶
func (h *V1APIHandler) SetWorkspaceHandler(wh *WorkspaceHandler)
SetWorkspaceHandler sets the optional workspace file management handler.
type V1Company ¶
type V1Company struct {
ID string `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
OwnerID string `json:"owner_id"`
ParentID string `json:"parent_id,omitempty"`
IsSystem bool `json:"is_system,omitempty"`
Metadata string `json:"metadata,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
V1Company represents a company or organization.
type V1Project ¶
type V1Project struct {
ID string `json:"id"`
CompanyID string `json:"company_id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description string `json:"description,omitempty"`
IsSystem bool `json:"is_system,omitempty"`
Metadata string `json:"metadata,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
V1Project represents a project.
type V1Store ¶
type V1Store struct {
// contains filtered or unexported fields
}
V1Store is a SQLite-backed data store for the v1 API.
func OpenV1Store ¶
OpenV1Store opens (or creates) a SQLite database at dbPath and initializes the schema.
func (*V1Store) CompleteExecution ¶
func (s *V1Store) CompleteExecution(id, status string, completedAt time.Time, durationMs int64, errorMsg string) error
CompleteExecution updates an execution record to completed or failed.
func (*V1Store) CompleteExecutionStep ¶
func (s *V1Store) CompleteExecutionStep(id, status string, completedAt time.Time, durationMs int64, errorMsg string) error
CompleteExecutionStep updates a step record to completed or failed.
func (*V1Store) CountExecutionsByWorkflow ¶
CountExecutionsByWorkflow returns execution counts grouped by status for a workflow.
func (*V1Store) CountLogsByWorkflow ¶
CountLogsByWorkflow returns log counts grouped by level for a workflow.
func (*V1Store) CreateCompany ¶
CreateCompany inserts a new top-level company.
func (*V1Store) CreateOrganization ¶
CreateOrganization inserts a child company under a parent company.
func (*V1Store) CreateProject ¶
CreateProject creates a project under an organization.
func (*V1Store) CreateWorkflow ¶
func (s *V1Store) CreateWorkflow(projectID, name, slug, description, configYAML, createdBy string) (*V1Workflow, error)
CreateWorkflow creates a workflow under a project.
func (*V1Store) DeleteWorkflow ¶
DeleteWorkflow deletes a workflow by ID. Returns an error if the workflow is a system workflow.
func (*V1Store) EnsureSystemHierarchy ¶
func (s *V1Store) EnsureSystemHierarchy(ownerID, adminConfigYAML string) (companyID, orgID, projectID, workflowID string, err error)
EnsureSystemHierarchy creates the system company, organization, project, and admin workflow if they don't already exist. Returns the IDs of all created entities.
func (*V1Store) GetCompany ¶
GetCompany retrieves a company by ID.
func (*V1Store) GetProject ¶
GetProject retrieves a project by ID.
func (*V1Store) GetSystemWorkflow ¶
func (s *V1Store) GetSystemWorkflow() (*V1Workflow, error)
GetSystemWorkflow returns the system workflow if it exists.
func (*V1Store) GetVersion ¶
func (s *V1Store) GetVersion(workflowID string, version int) (*V1WorkflowVersion, error)
GetVersion retrieves a specific version of a workflow.
func (*V1Store) GetWorkflow ¶
func (s *V1Store) GetWorkflow(id string) (*V1Workflow, error)
GetWorkflow retrieves a workflow by ID.
func (*V1Store) GetWorkflowBySlugAndProject ¶
func (s *V1Store) GetWorkflowBySlugAndProject(slug, projectID string) (*V1Workflow, error)
GetWorkflowBySlugAndProject retrieves a workflow by slug within a specific project.
func (*V1Store) InsertExecution ¶
func (s *V1Store) InsertExecution(id, workflowID, triggerType, status, triggeredBy string, startedAt time.Time) error
InsertExecution creates a new workflow execution record.
func (*V1Store) InsertExecutionStep ¶
func (s *V1Store) InsertExecutionStep(id, executionID, stepName, stepType, status string, seqNum int, startedAt time.Time) error
InsertExecutionStep creates a new execution step record.
func (*V1Store) InsertLog ¶
func (s *V1Store) InsertLog(workflowID, executionID, level, message, moduleName, fields string, createdAt time.Time) error
InsertLog inserts a log entry into the execution_logs table.
func (*V1Store) ListAllProjects ¶
ListAllProjects returns all projects regardless of organization.
func (*V1Store) ListCompanies ¶
ListCompanies lists top-level companies (parent_id IS NULL).
func (*V1Store) ListOrganizations ¶
ListOrganizations lists child companies under a parent.
func (*V1Store) ListProjects ¶
ListProjects lists projects for a given organization (company_id).
func (*V1Store) ListVersions ¶
func (s *V1Store) ListVersions(workflowID string) ([]V1WorkflowVersion, error)
ListVersions returns version history for a workflow.
func (*V1Store) ListWorkflows ¶
func (s *V1Store) ListWorkflows(projectID string) ([]V1Workflow, error)
ListWorkflows lists workflows for a project. If projectID is empty, lists all.
func (*V1Store) ResetSystemWorkflow ¶
ResetSystemWorkflow resets the system workflow config to the given YAML, incrementing the version and saving a version snapshot.
func (*V1Store) SaveVersion ¶
SaveVersion stores a version snapshot.
func (*V1Store) SetWorkflowStatus ¶
func (s *V1Store) SetWorkflowStatus(id, status string) (*V1Workflow, error)
SetWorkflowStatus updates a workflow's status field.
func (*V1Store) SetWorkspaceDir ¶
SetWorkspaceDir updates a workflow's workspace_dir field.
func (*V1Store) UpdateWorkflow ¶
func (s *V1Store) UpdateWorkflow(id string, name, description, configYAML, updatedBy string) (*V1Workflow, error)
UpdateWorkflow updates a workflow's fields and auto-increments version. If config_yaml changed, a version snapshot is saved.
func (*V1Store) UpdateWorkflowWorkspaceDir ¶
UpdateWorkflowWorkspaceDir sets the workspace_dir for a workflow.
type V1Workflow ¶
type V1Workflow struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description string `json:"description,omitempty"`
ConfigYAML string `json:"config_yaml"`
Version int `json:"version"`
Status string `json:"status"`
IsSystem bool `json:"is_system,omitempty"`
WorkspaceDir string `json:"workspace_dir,omitempty"`
CreatedBy string `json:"created_by"`
UpdatedBy string `json:"updated_by"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
V1Workflow represents a workflow record.
type V1WorkflowVersion ¶
type V1WorkflowVersion struct {
ID string `json:"id"`
WorkflowID string `json:"workflow_id"`
Version int `json:"version"`
ConfigYAML string `json:"config_yaml"`
CreatedBy string `json:"created_by"`
CreatedAt string `json:"created_at"`
}
V1WorkflowVersion represents a snapshot of a workflow at a specific version.
type ValidatePaginationStep ¶ added in v0.1.6
type ValidatePaginationStep struct {
// contains filtered or unexported fields
}
ValidatePaginationStep validates and normalises page/limit query parameters. It reads from the HTTP request in pipeline metadata and outputs resolved pagination values with defaults applied.
func (*ValidatePaginationStep) Execute ¶ added in v0.1.6
func (s *ValidatePaginationStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute reads page and limit query parameters from the HTTP request, validates their ranges, applies defaults, and outputs the resolved values.
func (*ValidatePaginationStep) Name ¶ added in v0.1.6
func (s *ValidatePaginationStep) Name() string
Name returns the step name.
type ValidatePathParamStep ¶ added in v0.1.6
type ValidatePathParamStep struct {
// contains filtered or unexported fields
}
ValidatePathParamStep validates that path parameters extracted by a request_parse step are present and optionally conform to a format (e.g. UUID).
func (*ValidatePathParamStep) Execute ¶ added in v0.1.6
func (s *ValidatePathParamStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute validates that each configured path parameter is present and optionally matches the required format.
func (*ValidatePathParamStep) Name ¶ added in v0.1.6
func (s *ValidatePathParamStep) Name() string
Name returns the step name.
type ValidateRequestBodyStep ¶ added in v0.1.6
type ValidateRequestBodyStep struct {
// contains filtered or unexported fields
}
ValidateRequestBodyStep parses the JSON request body from the HTTP request and validates that all required fields are present.
func (*ValidateRequestBodyStep) Execute ¶ added in v0.1.6
func (s *ValidateRequestBodyStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute parses the JSON body from the HTTP request and validates required fields are present. The parsed body is returned as output so downstream steps can reference it.
func (*ValidateRequestBodyStep) Name ¶ added in v0.1.6
func (s *ValidateRequestBodyStep) Name() string
Name returns the step name.
type ValidateStep ¶
type ValidateStep struct {
// contains filtered or unexported fields
}
ValidateStep validates data in the pipeline context against a schema or a list of required fields.
func (*ValidateStep) Execute ¶
func (s *ValidateStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute validates pc.Current according to the configured strategy.
type ValidatingNamespace ¶
type ValidatingNamespace struct {
// contains filtered or unexported fields
}
ValidatingNamespace adds validation to any namespace provider
func WithValidation ¶
func WithValidation(base ModuleNamespaceProvider) *ValidatingNamespace
WithValidation creates a validating namespace wrapper around any namespace provider
func (*ValidatingNamespace) FormatName ¶
func (vn *ValidatingNamespace) FormatName(baseName string) string
FormatName formats and validates a module name
func (*ValidatingNamespace) ResolveDependency ¶
func (vn *ValidatingNamespace) ResolveDependency(dependencyName string) string
ResolveDependency formats and validates a dependency name
func (*ValidatingNamespace) ResolveServiceName ¶
func (vn *ValidatingNamespace) ResolveServiceName(serviceName string) string
ResolveServiceName formats and validates a service name
func (*ValidatingNamespace) ValidateModuleName ¶
func (vn *ValidatingNamespace) ValidateModuleName(moduleName string) error
ValidateModuleName validates a module name
type ValidationIssue ¶
type ValidationIssue struct {
Severity ValidationSeverity
Field string
Message string
}
ValidationIssue represents a single problem found during module validation.
func ValidateModule ¶
func ValidateModule(m modular.Module) []ValidationIssue
ValidateModule checks a module implementation for common issues and returns all detected problems. A well-implemented module should produce zero issues.
func (ValidationIssue) String ¶
func (v ValidationIssue) String() string
type ValidationSeverity ¶
type ValidationSeverity string
ValidationSeverity indicates how severe a validation issue is.
const ( SeverityError ValidationSeverity = "error" SeverityWarning ValidationSeverity = "warning" SeverityInfo ValidationSeverity = "info" )
type WebhookConfig ¶
type WebhookConfig struct {
MaxRetries int `json:"maxRetries" yaml:"maxRetries"`
InitialBackoff time.Duration `json:"initialBackoff" yaml:"initialBackoff"`
MaxBackoff time.Duration `json:"maxBackoff" yaml:"maxBackoff"`
BackoffMultiplier float64 `json:"backoffMultiplier" yaml:"backoffMultiplier"`
Timeout time.Duration `json:"timeout" yaml:"timeout"`
}
WebhookConfig holds configuration for the webhook sender
type WebhookDelivery ¶
type WebhookDelivery struct {
ID string `json:"id"`
URL string `json:"url"`
Payload []byte `json:"payload"`
Headers map[string]string `json:"headers"`
Status string `json:"status"` // "pending", "delivered", "failed", "dead_letter"
Attempts int `json:"attempts"`
LastError string `json:"lastError,omitempty"`
CreatedAt time.Time `json:"createdAt"`
DeliveredAt *time.Time `json:"deliveredAt,omitempty"`
}
WebhookDelivery tracks a webhook delivery attempt
type WebhookIntegrationConnector ¶
type WebhookIntegrationConnector struct {
// contains filtered or unexported fields
}
WebhookIntegrationConnector implements a connector that receives webhook callbacks
func NewWebhookIntegrationConnector ¶
func NewWebhookIntegrationConnector(name, path string, port int) *WebhookIntegrationConnector
NewWebhookIntegrationConnector creates a new webhook integration connector
func (*WebhookIntegrationConnector) Connect ¶
func (c *WebhookIntegrationConnector) Connect(ctx context.Context) error
Connect establishes the webhook server
func (*WebhookIntegrationConnector) Disconnect ¶
func (c *WebhookIntegrationConnector) Disconnect(ctx context.Context) error
Disconnect stops the webhook server
func (*WebhookIntegrationConnector) Execute ¶
func (c *WebhookIntegrationConnector) Execute(ctx context.Context, action string, params map[string]any) (map[string]any, error)
Execute is a no-op for webhook connectors (they are passive)
func (*WebhookIntegrationConnector) GetName ¶
func (c *WebhookIntegrationConnector) GetName() string
GetName returns the connector name
func (*WebhookIntegrationConnector) IsConnected ¶
func (c *WebhookIntegrationConnector) IsConnected() bool
IsConnected checks if the connector is connected
func (*WebhookIntegrationConnector) RegisterEventHandler ¶
func (c *WebhookIntegrationConnector) RegisterEventHandler(eventType string, handler func(context.Context, map[string]any) error)
RegisterEventHandler registers a handler for a specific event type
type WebhookSender ¶
type WebhookSender struct {
// contains filtered or unexported fields
}
WebhookSender sends webhooks with retry logic
func NewWebhookSender ¶
func NewWebhookSender(name string, config WebhookConfig) *WebhookSender
NewWebhookSender creates a new WebhookSender with sensible defaults
func (*WebhookSender) GetDeadLetters ¶
func (ws *WebhookSender) GetDeadLetters() []*WebhookDelivery
GetDeadLetters returns all dead letter deliveries
func (*WebhookSender) Init ¶
func (ws *WebhookSender) Init(app modular.Application) error
Init registers the webhook sender as a service
func (*WebhookSender) RetryDeadLetter ¶
func (ws *WebhookSender) RetryDeadLetter(ctx context.Context, id string) (*WebhookDelivery, error)
RetryDeadLetter retries a dead letter delivery
func (*WebhookSender) Send ¶
func (ws *WebhookSender) Send(ctx context.Context, url string, payload []byte, headers map[string]string) (*WebhookDelivery, error)
Send sends a webhook with retry logic
func (*WebhookSender) SetClient ¶
func (ws *WebhookSender) SetClient(client *http.Client)
SetClient sets a custom HTTP client (useful for testing)
type WebhookTracePropagator ¶ added in v0.2.15
type WebhookTracePropagator struct {
// contains filtered or unexported fields
}
WebhookTracePropagator propagates trace context via outbound webhook HTTP headers.
func NewWebhookTracePropagator ¶ added in v0.2.15
func NewWebhookTracePropagator() *WebhookTracePropagator
NewWebhookTracePropagator creates a webhook trace propagator.
func (*WebhookTracePropagator) Extract ¶ added in v0.2.15
func (p *WebhookTracePropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
func (*WebhookTracePropagator) Inject ¶ added in v0.2.15
func (p *WebhookTracePropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) error
func (*WebhookTracePropagator) InjectRequest ¶ added in v0.2.15
InjectRequest injects trace context into an outbound *http.Request.
type WebhookVerifyStep ¶ added in v0.2.3
type WebhookVerifyStep struct {
// contains filtered or unexported fields
}
WebhookVerifyStep verifies HMAC signatures for incoming webhook requests.
func (*WebhookVerifyStep) Execute ¶ added in v0.2.3
func (s *WebhookVerifyStep) Execute(_ context.Context, pc *PipelineContext) (*StepResult, error)
Execute verifies the webhook signature from the HTTP request in pipeline context metadata.
func (*WebhookVerifyStep) Name ¶ added in v0.2.3
func (s *WebhookVerifyStep) Name() string
Name returns the step name.
type WorkflowCallMode ¶ added in v0.1.6
type WorkflowCallMode string
WorkflowCallMode determines how a workflow_call step waits for results.
const ( // WorkflowCallModeSync executes the target pipeline synchronously and maps outputs back. WorkflowCallModeSync WorkflowCallMode = "sync" // WorkflowCallModeAsync fires the target pipeline and returns immediately without waiting. WorkflowCallModeAsync WorkflowCallMode = "async" )
type WorkflowCallStep ¶ added in v0.1.6
type WorkflowCallStep struct {
// contains filtered or unexported fields
}
WorkflowCallStep invokes another pipeline registered in the same engine. It supports synchronous and asynchronous execution modes with input/output template mapping identical to the sub_workflow step pattern.
func (*WorkflowCallStep) Execute ¶ added in v0.1.6
func (s *WorkflowCallStep) Execute(ctx context.Context, pc *PipelineContext) (*StepResult, error)
Execute runs the target workflow. In sync mode it waits for the result and maps outputs back into the parent context. In async mode it dispatches the child pipeline in a goroutine and returns immediately.
func (*WorkflowCallStep) Name ¶ added in v0.1.6
func (s *WorkflowCallStep) Name() string
Name returns the step name.
type WorkflowConfig ¶ added in v0.1.6
type WorkflowConfig struct {
Type string // The type of workflow to use (e.g., "order-workflow")
Engine string // The name of the workflow engine service to use
InitialTransition string // The first transition to trigger after creating a workflow instance (defaults to "start_validation")
InstanceIDPrefix string // Optional prefix for workflow instance IDs
InstanceIDField string // Field in resource data to use for instance ID (defaults to "id")
SeedFile string // Path to JSON seed data file
}
WorkflowConfig holds the six workflow-related settings for a RESTAPIHandler. These fields are always configured together and are extracted here for clarity.
type WorkflowDatabase ¶
type WorkflowDatabase struct {
// contains filtered or unexported fields
}
WorkflowDatabase wraps database/sql for workflow use
func NewWorkflowDatabase ¶
func NewWorkflowDatabase(name string, config DatabaseConfig) *WorkflowDatabase
NewWorkflowDatabase creates a new WorkflowDatabase module
func (*WorkflowDatabase) Close ¶
func (w *WorkflowDatabase) Close() error
Close closes the database connection
func (*WorkflowDatabase) DB ¶
func (w *WorkflowDatabase) DB() *sql.DB
DB returns the underlying *sql.DB
func (*WorkflowDatabase) DeleteRows ¶
func (w *WorkflowDatabase) DeleteRows(ctx context.Context, table string, where string, whereArgs ...any) (int64, error)
DeleteRows builds and executes a DELETE statement
func (*WorkflowDatabase) Init ¶
func (w *WorkflowDatabase) Init(app modular.Application) error
Init registers the database as a service
func (*WorkflowDatabase) InsertRow ¶
func (w *WorkflowDatabase) InsertRow(ctx context.Context, table string, data map[string]any) (int64, error)
InsertRow builds and executes an INSERT statement
func (*WorkflowDatabase) Name ¶
func (w *WorkflowDatabase) Name() string
Name returns the module name
func (*WorkflowDatabase) Open ¶
func (w *WorkflowDatabase) Open() (*sql.DB, error)
Open opens the database connection using config
func (*WorkflowDatabase) Ping ¶
func (w *WorkflowDatabase) Ping(ctx context.Context) error
Ping checks the database connection
func (*WorkflowDatabase) ProvidesServices ¶
func (w *WorkflowDatabase) ProvidesServices() []modular.ServiceProvider
ProvidesServices declares the service this module provides, enabling proper dependency ordering in the modular framework.
func (*WorkflowDatabase) Query ¶
func (w *WorkflowDatabase) Query(ctx context.Context, sqlStr string, args ...any) (*QueryResult, error)
Query executes a query and returns structured results
func (*WorkflowDatabase) RequiresServices ¶
func (w *WorkflowDatabase) RequiresServices() []modular.ServiceDependency
RequiresServices returns no dependencies.
type WorkflowEngine ¶
type WorkflowEngine interface {
TriggerWorkflow(ctx context.Context, workflowType string, action string, data map[string]any) error
}
WorkflowEngine defines the interface for triggering workflows
type WorkflowEventEmitter ¶
type WorkflowEventEmitter struct {
// contains filtered or unexported fields
}
WorkflowEventEmitter publishes workflow and step lifecycle events to the EventBus. All methods are safe to call when the EventBus is unavailable (nil); they silently become no-ops.
func NewWorkflowEventEmitter ¶
func NewWorkflowEventEmitter(app modular.Application) *WorkflowEventEmitter
NewWorkflowEventEmitter creates a new emitter. It attempts to resolve the "eventbus.provider" service from the application. If the service is unavailable the emitter still works but all Emit* calls are no-ops.
func (*WorkflowEventEmitter) EmitStepCompleted ¶
func (e *WorkflowEventEmitter) EmitStepCompleted(ctx context.Context, workflowType, stepName, connector, action string, duration time.Duration, results map[string]any)
EmitStepCompleted publishes a "completed" lifecycle event for a workflow step.
func (*WorkflowEventEmitter) EmitStepFailed ¶
func (e *WorkflowEventEmitter) EmitStepFailed(ctx context.Context, workflowType, stepName, connector, action string, duration time.Duration, err error)
EmitStepFailed publishes a "failed" lifecycle event for a workflow step.
func (*WorkflowEventEmitter) EmitStepStarted ¶
func (e *WorkflowEventEmitter) EmitStepStarted(ctx context.Context, workflowType, stepName, connector, action string)
EmitStepStarted publishes a "started" lifecycle event for a workflow step.
func (*WorkflowEventEmitter) EmitWorkflowCompleted ¶
func (e *WorkflowEventEmitter) EmitWorkflowCompleted(ctx context.Context, workflowType, action string, duration time.Duration, results map[string]any)
EmitWorkflowCompleted publishes a "completed" lifecycle event for a workflow.
func (*WorkflowEventEmitter) EmitWorkflowFailed ¶
func (e *WorkflowEventEmitter) EmitWorkflowFailed(ctx context.Context, workflowType, action string, duration time.Duration, err error)
EmitWorkflowFailed publishes a "failed" lifecycle event for a workflow.
func (*WorkflowEventEmitter) EmitWorkflowStarted ¶
func (e *WorkflowEventEmitter) EmitWorkflowStarted(ctx context.Context, workflowType, action string, data map[string]any)
EmitWorkflowStarted publishes a "started" lifecycle event for a workflow.
type WorkflowInstance ¶
type WorkflowInstance struct {
ID string `json:"id"`
WorkflowType string `json:"workflowType"`
CurrentState string `json:"currentState"`
PreviousState string `json:"previousState"`
Data map[string]any `json:"data"`
StartTime time.Time `json:"startTime"`
LastUpdated time.Time `json:"lastUpdated"`
Completed bool `json:"completed"`
Error string `json:"error,omitempty"`
}
WorkflowInstance represents an instance of a state machine workflow
type WorkflowLifecycleEvent ¶
type WorkflowLifecycleEvent struct {
WorkflowType string `json:"workflowType"`
Action string `json:"action"`
Status string `json:"status"`
Timestamp time.Time `json:"timestamp"`
Duration time.Duration `json:"duration,omitempty"`
Data map[string]any `json:"data,omitempty"`
Error string `json:"error,omitempty"`
Results map[string]any `json:"results,omitempty"`
}
WorkflowLifecycleEvent is the payload published for workflow-level lifecycle events.
type WorkflowRegistry ¶
type WorkflowRegistry struct {
// contains filtered or unexported fields
}
WorkflowRegistry is a module that provides the V1Store as a service, making the workflow data store (companies, projects, workflows) available to other modules via the service registry. It can either use a shared SQLiteStorage backend (via storageBackend config) or open its own database.
func NewWorkflowRegistry ¶
func NewWorkflowRegistry(name, storageBackend string) *WorkflowRegistry
NewWorkflowRegistry creates a new workflow registry module. If storageBackend is non-empty, it uses that SQLiteStorage service's DB; otherwise it opens its own database at the default path.
func (*WorkflowRegistry) Init ¶
func (w *WorkflowRegistry) Init(app modular.Application) error
func (*WorkflowRegistry) Name ¶
func (w *WorkflowRegistry) Name() string
func (*WorkflowRegistry) ProvidesServices ¶
func (w *WorkflowRegistry) ProvidesServices() []modular.ServiceProvider
func (*WorkflowRegistry) RequiresServices ¶
func (w *WorkflowRegistry) RequiresServices() []modular.ServiceDependency
func (*WorkflowRegistry) Start ¶
func (w *WorkflowRegistry) Start(_ context.Context) error
Start initializes the V1Store, using the shared storage backend or its own DB.
func (*WorkflowRegistry) Stop ¶
func (w *WorkflowRegistry) Stop(_ context.Context) error
Stop closes the database if using standalone storage.
func (*WorkflowRegistry) Store ¶
func (w *WorkflowRegistry) Store() *V1Store
Store returns the underlying V1Store.
func (*WorkflowRegistry) WorkflowStore ¶ added in v0.1.6
func (w *WorkflowRegistry) WorkflowStore() any
WorkflowStore satisfies the interfaces.WorkflowStoreProvider interface. It returns the underlying V1Store as an opaque any value so that the interfaces package does not need to import the module package.
type WorkflowTriggerInfo ¶
WorkflowTriggerInfo captures information about a workflow that was triggered
type WorkflowUIHandler ¶
type WorkflowUIHandler struct {
// contains filtered or unexported fields
}
WorkflowUIHandler serves the workflow editor UI and provides API endpoints for managing workflow configurations.
func NewWorkflowUIHandler ¶
func NewWorkflowUIHandler(cfg *config.WorkflowConfig) *WorkflowUIHandler
NewWorkflowUIHandler creates a new handler with an optional initial config.
func (*WorkflowUIHandler) HandleGetConfig ¶
func (h *WorkflowUIHandler) HandleGetConfig(w http.ResponseWriter, r *http.Request)
HandleGetConfig serves the workflow configuration (GET /engine/config).
func (*WorkflowUIHandler) HandleGetModules ¶
func (h *WorkflowUIHandler) HandleGetModules(w http.ResponseWriter, r *http.Request)
HandleGetModules lists available module types (GET /engine/modules).
func (*WorkflowUIHandler) HandleGetServices ¶
func (h *WorkflowUIHandler) HandleGetServices(w http.ResponseWriter, r *http.Request)
HandleGetServices serves the services list (GET /engine/services).
func (*WorkflowUIHandler) HandleManagement ¶
func (h *WorkflowUIHandler) HandleManagement(w http.ResponseWriter, r *http.Request)
HandleManagement dispatches management API requests to the appropriate handler based on the request path. This is intended to be used as a handler function for an http.handler module via SetHandleFunc.
func (*WorkflowUIHandler) HandlePutConfig ¶
func (h *WorkflowUIHandler) HandlePutConfig(w http.ResponseWriter, r *http.Request)
HandlePutConfig updates the workflow configuration (PUT /engine/config).
func (*WorkflowUIHandler) HandleReload ¶
func (h *WorkflowUIHandler) HandleReload(w http.ResponseWriter, r *http.Request)
HandleReload reloads the engine with the current configuration (POST /engine/reload).
func (*WorkflowUIHandler) HandleStatus ¶
func (h *WorkflowUIHandler) HandleStatus(w http.ResponseWriter, r *http.Request)
HandleStatus returns the engine status (GET /engine/status).
func (*WorkflowUIHandler) HandleValidate ¶
func (h *WorkflowUIHandler) HandleValidate(w http.ResponseWriter, r *http.Request)
HandleValidate validates a workflow configuration (POST /engine/validate).
func (*WorkflowUIHandler) RegisterRoutes ¶
func (h *WorkflowUIHandler) RegisterRoutes(mux *http.ServeMux)
RegisterRoutes registers all workflow UI routes on the given mux.
func (*WorkflowUIHandler) ServeHTTP ¶
func (h *WorkflowUIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler for config-driven delegate dispatch. It handles both query (GET) and command (PUT/POST) operations for engine management, dispatching based on the last path segment.
func (*WorkflowUIHandler) SetReloadFunc ¶
func (h *WorkflowUIHandler) SetReloadFunc(fn func(*config.WorkflowConfig) error)
SetReloadFunc sets the callback for reloading the engine with new config.
func (*WorkflowUIHandler) SetServiceRegistry ¶
func (h *WorkflowUIHandler) SetServiceRegistry(fn func() map[string]any)
SetServiceRegistry sets the callback for accessing the service registry.
func (*WorkflowUIHandler) SetStatusFunc ¶
func (h *WorkflowUIHandler) SetStatusFunc(fn func() map[string]any)
SetStatusFunc sets the callback for getting engine status.
type WorkspaceHandler ¶
type WorkspaceHandler struct {
// contains filtered or unexported fields
}
WorkspaceHandler handles file management API endpoints for project workspaces.
func NewWorkspaceHandler ¶
func NewWorkspaceHandler(wm *store.WorkspaceManager) *WorkspaceHandler
NewWorkspaceHandler creates a new handler backed by the given workspace manager.
func (*WorkspaceHandler) HandleWorkspace ¶
func (h *WorkspaceHandler) HandleWorkspace(w http.ResponseWriter, r *http.Request)
HandleWorkspace dispatches workspace file API requests. Expected paths:
POST /api/v1/workspaces/{project-id}/files (upload)
GET /api/v1/workspaces/{project-id}/files (list)
GET /api/v1/workspaces/{project-id}/files/{path} (download)
DELETE /api/v1/workspaces/{project-id}/files/{path} (delete)
POST /api/v1/workspaces/{project-id}/mkdir (create directory)
Source Files
¶
- api_crud_handler.go
- api_gateway.go
- api_handlers.go
- api_v1_featureflags.go
- api_v1_handler.go
- api_v1_store.go
- api_workflow_handler.go
- api_workflow_ui.go
- app_container.go
- argo_workflows.go
- auth_middleware.go
- auth_oauth2.go
- auth_user_store.go
- aws_api_gateway.go
- cache_redis.go
- cloud_account.go
- cloud_account_aws.go
- codebuild.go
- command_handler.go
- cross_workflow_router.go
- data_transformer.go
- database.go
- database_drivers.go
- dlq_service.go
- encryption.go
- errors.go
- event_processor.go
- event_processor_service.go
- event_trigger.go
- eventbus_bridge.go
- eventbus_trigger.go
- eventstore_service.go
- execution_tracker.go
- feature_flag_module.go
- featureflag_admin_adapter.go
- field_mapping.go
- gitlab_client.go
- gitlab_client_module.go
- gitlab_webhook.go
- health.go
- http.go
- http_handlers.go
- http_middleware.go
- http_middleware_otel.go
- http_router.go
- http_server.go
- http_trigger.go
- iac_module.go
- iac_state.go
- iac_state_fs.go
- iac_state_memory.go
- integration.go
- jwt_auth.go
- kafka_broker.go
- license_module.go
- log_collector.go
- memory_broker.go
- message_handlers.go
- messaging.go
- metrics.go
- module_test_helpers.go
- multi_region.go
- namespace.go
- nats_broker.go
- nosql.go
- nosql_dynamodb.go
- nosql_memory.go
- nosql_mongodb.go
- nosql_redis.go
- openapi.go
- openapi_admin_schemas.go
- openapi_consumer.go
- openapi_generator.go
- otel_tracing.go
- persistence.go
- pipeline_context.go
- pipeline_executor.go
- pipeline_step.go
- pipeline_step_ai_classify.go
- pipeline_step_ai_complete.go
- pipeline_step_ai_extract.go
- pipeline_step_apigateway.go
- pipeline_step_app.go
- pipeline_step_argo.go
- pipeline_step_artifact.go
- pipeline_step_artifact_pull.go
- pipeline_step_artifact_push.go
- pipeline_step_autoscaling.go
- pipeline_step_build_binary.go
- pipeline_step_build_from_config.go
- pipeline_step_build_ui.go
- pipeline_step_cache_delete.go
- pipeline_step_cache_get.go
- pipeline_step_cache_set.go
- pipeline_step_circuit_breaker.go
- pipeline_step_cloud_validate.go
- pipeline_step_codebuild.go
- pipeline_step_conditional.go
- pipeline_step_constraint_check.go
- pipeline_step_db_exec.go
- pipeline_step_db_query.go
- pipeline_step_delegate.go
- pipeline_step_deploy.go
- pipeline_step_dns.go
- pipeline_step_do.go
- pipeline_step_docker_build.go
- pipeline_step_docker_push.go
- pipeline_step_docker_run.go
- pipeline_step_drift_check.go
- pipeline_step_ecs.go
- pipeline_step_feature_flag.go
- pipeline_step_ff_gate.go
- pipeline_step_foreach.go
- pipeline_step_gate.go
- pipeline_step_git_checkout.go
- pipeline_step_git_clone.go
- pipeline_step_git_commit.go
- pipeline_step_git_push.go
- pipeline_step_git_tag.go
- pipeline_step_gitlab.go
- pipeline_step_http_call.go
- pipeline_step_iac.go
- pipeline_step_jq.go
- pipeline_step_json_response.go
- pipeline_step_log.go
- pipeline_step_marketplace.go
- pipeline_step_networking.go
- pipeline_step_nosql.go
- pipeline_step_platform_apply.go
- pipeline_step_platform_destroy.go
- pipeline_step_platform_k8s.go
- pipeline_step_platform_plan.go
- pipeline_step_platform_template.go
- pipeline_step_policy.go
- pipeline_step_publish.go
- pipeline_step_rate_limit.go
- pipeline_step_region.go
- pipeline_step_registry.go
- pipeline_step_request_parse.go
- pipeline_step_scaffold.go
- pipeline_step_scaffold_analyze.go
- pipeline_step_scan_container.go
- pipeline_step_scan_deps.go
- pipeline_step_scan_sast.go
- pipeline_step_set.go
- pipeline_step_shell_exec.go
- pipeline_step_statemachine_get.go
- pipeline_step_statemachine_transition.go
- pipeline_step_sub_workflow.go
- pipeline_step_tracing.go
- pipeline_step_transform.go
- pipeline_step_validate.go
- pipeline_step_validate_pagination.go
- pipeline_step_validate_path_param.go
- pipeline_step_validate_request_body.go
- pipeline_step_webhook_verify.go
- pipeline_step_workflow_call.go
- pipeline_template.go
- platform_apigateway.go
- platform_autoscaling.go
- platform_dns.go
- platform_dns_backends.go
- platform_do_app.go
- platform_do_dns.go
- platform_do_networking.go
- platform_doks.go
- platform_ecs.go
- platform_kubernetes.go
- platform_kubernetes_kind.go
- platform_networking.go
- platform_provider.go
- platform_reconciliation_trigger.go
- policy_engine.go
- port_allocator.go
- processing_step.go
- query_handler.go
- region_routing.go
- request_id.go
- runtime_handler.go
- runtime_manager.go
- s3_storage.go
- scan_result.go
- schedule_trigger.go
- scheduler.go
- scheduler_test_helpers.go
- secrets_aws.go
- secrets_vault.go
- security_headers.go
- service_module.go
- service_registry.go
- simple_proxy.go
- slack_notification.go
- sse_tracer.go
- state_connector.go
- state_machine.go
- state_tracker.go
- static_fileserver.go
- storage_artifact.go
- storage_artifact_fs.go
- storage_artifact_s3.go
- storage_gcs.go
- storage_local.go
- storage_sqlite.go
- testutil.go
- timeline_service.go
- tracing_propagation.go
- trigger.go
- trigger_test_helpers.go
- validator.go
- webhook_sender.go
- workflow_events.go
- workflow_registry.go
- workspace_handler.go