Documentation
¶
Index ¶
- Constants
- func CalculateResilienceScore(results *ExperimentResults) float64
- func ValidateExperimentSafety(experiment *ChaosExperiment, policy *ChaosPolicy) []string
- type AccessControl
- type ActionCategory
- type ActionItem
- type ActionPriority
- type ActionStatus
- type ActionType
- type ActiveFault
- type AdmissionWebhook
- type AlertChannel
- type AlertChannelConfig
- type AlertCondition
- type AlertManager
- type AlertRule
- type AlertSeverity
- type AlertType
- type AlertingConfig
- type AlertingSystem
- type ArticleResult
- type AuditEvent
- type AuditLog
- type AuditTrail
- type BackoffMode
- type BasicContractValidator
- func (v *BasicContractValidator) Validate(ctx context.Context, interaction *ContractInteraction) error
- func (v *BasicContractValidator) ValidateContract(ctx context.Context, contract *ServiceContract) (*TestResult, error)
- func (v *BasicContractValidator) ValidateInteraction(ctx context.Context, interaction *ContractInteraction) (*InteractionResult, error)
- type BasicEvidenceIndexer
- type BlastRadius
- type BlastRadiusType
- type Break
- type BreakType
- type CRDCondition
- type CRDManager
- type CRDNames
- type CRDSpec
- type CRDStatus
- type CRDVersion
- type ChaosCondition
- type ChaosConfig
- type ChaosController
- type ChaosControllerType
- type ChaosCoordinator
- type ChaosEngineeringConfig
- type ChaosEngineeringFramework
- type ChaosEngineeringMetrics
- type ChaosEngineeringTester
- func (tester *ChaosEngineeringTester) CheckSystemHealth(ctx context.Context) (bool, error)
- func (tester *ChaosEngineeringTester) InjectAPILatency(ctx context.Context, latencyMs int, percentage int, duration time.Duration) error
- func (tester *ChaosEngineeringTester) InjectCPUSpike(ctx context.Context, percentage int, duration time.Duration) error
- func (tester *ChaosEngineeringTester) InjectDatabaseFailure(ctx context.Context, failureType string, duration time.Duration) error
- func (tester *ChaosEngineeringTester) InjectMemoryPressure(ctx context.Context, percentage int, duration time.Duration) error
- type ChaosEvent
- type ChaosEventBus
- type ChaosEventType
- type ChaosExperiment
- type ChaosExperimentResult
- type ChaosExperimentSpec
- type ChaosFailure
- type ChaosGameDay
- type ChaosHealthCheck
- type ChaosMeshIntegration
- func (c *ChaosMeshIntegration) CreateExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
- func (c *ChaosMeshIntegration) GetSupportedFaults() map[ChaosControllerType][]FaultType
- func (c *ChaosMeshIntegration) MonitorExperiment(ctx context.Context, experimentID string, controllerType ChaosControllerType) (*ExperimentStatusInfo, error)
- func (c *ChaosMeshIntegration) StopExperiment(ctx context.Context, experimentID string, controllerType ChaosControllerType) error
- type ChaosMetrics
- type ChaosOperator
- type ChaosOperatorManager
- type ChaosPolicy
- type ChaosPolicyAction
- type ChaosReconciler
- type ChaosReporter
- type ChaosScenario
- type ChaosSchedule
- type ChaosScheduler
- type ChaosScopeType
- type ChaosSeverity
- type ChaosTest
- type ClockSkewer
- type ClusterMetrics
- type ComplianceAlert
- type ComplianceAlerter
- type ComplianceReport
- type ComplianceReporter
- type ComplianceStatus
- type ComplianceSummary
- type ComplianceTestResult
- type ComplianceTestStatus
- type ComplianceValidator
- type Connection
- type ConnectionStatus
- type ConsensusManager
- type ConsentChange
- type ConsentHistory
- type ConsentManager
- type ConsentPolicy
- type ConsentPreferences
- type ConsentRecord
- type ConsistencyLevel
- type ConsistencyTester
- type ConstraintType
- type ContactInfo
- type ContinuousMonitor
- type Contract
- type ContractInteraction
- type ContractRegistry
- type ContractReportExporter
- type ContractReportExporterImpl
- type ContractReportTemplate
- type ContractStatus
- type ContractTest
- type ContractTestConfig
- type ContractTestReporter
- type ContractTestResult
- type ContractTestRunner
- type ContractTestStatus
- type ContractTestSuite
- type ContractTestSummary
- type ContractTestingConfig
- type ContractTestingFramework
- func (f *ContractTestingFramework) CreateContractTest(contract *ServiceContract, validator ContractValidator) (*ContractTest, error)
- func (f *ContractTestingFramework) RunContractTest(ctx context.Context, test *ContractTest) (*ContractTestResult, error)
- func (f *ContractTestingFramework) ValidateContract(ctx context.Context, contract *ServiceContract) (*ContractValidationResult, error)
- type ContractValidationResult
- type ContractValidator
- type ControlCriteria
- type ControlEvidence
- type ControlResult
- type ControlStatus
- type ControlTest
- type CoordinationMode
- type CountryInfo
- type CriteriaType
- type CustomResourceDefinition
- type CustomRetentionPolicy
- type DashboardConfig
- type DashboardManager
- type DashboardType
- type DataFixture
- type DataFixtureManager
- type DataMapper
- type DataMapping
- type DataProcessor
- type DataProtectionControl
- type DataTransfer
- type DatabaseClient
- type DatabaseValidator
- type DependencyType
- type DistributedActionType
- type DistributedAlertConfig
- type DistributedAlertSeverity
- type DistributedComplianceResults
- type DistributedComplianceStatus
- type DistributedComplianceViolation
- type DistributedConditionType
- type DistributedConfig
- type DistributedConstraintType
- type DistributedEventBus
- type DistributedExperiment
- type DistributedExperimentResults
- type DistributedExperimentSpec
- type DistributedExperimentType
- type DistributedFailure
- type DistributedFailureType
- type DistributedFaultInjector
- type DistributedHealthCheck
- type DistributedMetricConfig
- type DistributedMetricType
- type DistributedMonitoringSystem
- type DistributedNetworkPartition
- type DistributedObservation
- type DistributedObservationSeverity
- type DistributedObservationType
- type DistributedRecoveryConfig
- type DistributedRecoveryMode
- type DistributedSecurityConfig
- type EnterpriseTestApp
- type EnterpriseTestPatterns
- func (e *EnterpriseTestPatterns) AddEnvironment(name string, config EnvironmentConfig)
- func (e *EnterpriseTestPatterns) CreateAPIContractTest(apiName, version string, interactions []Interaction) (*Contract, error)
- func (e *EnterpriseTestPatterns) CreateChaosScenario(scenarioType string, config map[string]any) error
- func (e *EnterpriseTestPatterns) CreateMultiEnvironmentTest(name string, testFunc func(env *TestEnvironment) error) error
- func (e *EnterpriseTestPatterns) CreatePerformanceTest(name string, testFunc func() error) TestCase
- func (e *EnterpriseTestPatterns) GenerateReport(suiteName string, results []TestResult) TestReport
- func (e *EnterpriseTestPatterns) GetEnvironment(name string) (*TestEnvironment, error)
- func (e *EnterpriseTestPatterns) RunChaosTests(ctx context.Context) error
- func (e *EnterpriseTestPatterns) RunContractTests(ctx context.Context) (map[string]ContractTestResult, error)
- func (e *EnterpriseTestPatterns) RunTestSuite(ctx context.Context, suite TestSuite) ([]TestResult, error)
- func (e *EnterpriseTestPatterns) ValidatePerformance(ctx context.Context, testCase TestCase, envName string) error
- type EnterpriseTestSuite
- func (e *EnterpriseTestSuite) AddEnvironment(name string, config EnvironmentConfig) *TestEnvironment
- func (e *EnterpriseTestSuite) GetEnvironment(name string) (*TestEnvironment, error)
- func (e *EnterpriseTestSuite) GetEnvironmentMetrics(envName string) (EnvironmentMetrics, error)
- func (e *EnterpriseTestSuite) ResetEnvironment(envName string) error
- func (e *EnterpriseTestSuite) SwitchEnvironment(envName string) error
- func (e *EnterpriseTestSuite) TestAcrossEnvironments(testCase TestCase) error
- type EnvironmentConfig
- type EnvironmentMetrics
- type EnvironmentState
- type EnvironmentStatus
- type EnvironmentValidator
- type ErrorFaultConfig
- type ErrorRateResults
- type EventFilter
- type EventProcessor
- type EventRecorder
- type EventSeverity
- type EventSubscriber
- type EventWatcher
- type Evidence
- type EvidenceEncryption
- type EvidenceFilter
- type EvidenceIndexer
- type EvidenceQuery
- type EvidenceRequirement
- type EvidenceStorage
- type EvidenceStore
- type EvidenceType
- type ExperimentAnalysis
- type ExperimentConstraint
- type ExperimentDependency
- type ExperimentExecutor
- type ExperimentFailure
- type ExperimentMonitoring
- type ExperimentPhase
- type ExperimentReport
- type ExperimentResults
- type ExperimentStatus
- type ExperimentStatusInfo
- type ExperimentTarget
- type ExportDestination
- type ExportFormat
- type FailoverMode
- type FailoverPolicy
- type FailoverThreshold
- type FailureImpact
- type FaultDefinition
- type FaultImpact
- type FaultInjector
- type FaultState
- type FaultStatus
- type FaultType
- type FileEvidenceStorage
- func (f *FileEvidenceStorage) Delete(ctx context.Context, id string) error
- func (f *FileEvidenceStorage) List(ctx context.Context, filter EvidenceFilter) ([]*Evidence, error)
- func (f *FileEvidenceStorage) Retrieve(ctx context.Context, id string) (*Evidence, error)
- func (f *FileEvidenceStorage) Store(ctx context.Context, evidence *Evidence) error
- type FrameworkMetrics
- type GDPRArticle
- type GDPRCategory
- type GDPRCompliance
- type GDPRComplianceReport
- type GDPRComplianceTester
- func (tester *GDPRComplianceTester) GetAuditTrail(ctx context.Context, userID string) (*AuditTrail, error)
- func (tester *GDPRComplianceTester) TestRightToAccess(ctx context.Context, userID string) error
- func (tester *GDPRComplianceTester) TestRightToDataPortability(ctx context.Context, userID string) error
- func (tester *GDPRComplianceTester) TestRightToErasure(ctx context.Context, userID string) error
- func (tester *GDPRComplianceTester) TestRightToObject(ctx context.Context, userID string, processingType string) error
- func (tester *GDPRComplianceTester) TestRightToRectification(ctx context.Context, userID string, updates map[string]any) error
- type GDPRConfig
- type GDPREvidenceStore
- type GDPRMonitor
- type GDPRPrivacyFramework
- type GDPRReport
- type GDPRReporter
- type GDPRRightType
- type GDPRTest
- type GDPRTestCase
- type GDPRTestResult
- type GDPRValidator
- type GameDayResults
- type GameDayScenario
- type GameDaySchedule
- type GameDayStatus
- type GovernanceCategory
- type HTTPClient
- type HealthCheck
- type HealthCheckType
- type IOChaosController
- func (i *IOChaosController) Cleanup(ctx context.Context) error
- func (i *IOChaosController) CreateChaosExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
- func (i *IOChaosController) GetName() string
- func (i *IOChaosController) GetSupportedFaults() []FaultType
- func (i *IOChaosController) GetType() ChaosControllerType
- func (i *IOChaosController) Initialize(ctx context.Context, config *KubernetesConfig) error
- func (i *IOChaosController) MonitorExperiment(ctx context.Context, experimentID string) (*ExperimentStatusInfo, error)
- func (i *IOChaosController) StopExperiment(ctx context.Context, experimentID string) error
- func (i *IOChaosController) ValidateSpec(spec *ChaosExperimentSpec) error
- type IOFaultInjector
- type IOManager
- type InfrastructureAlertChannel
- type InfrastructureComplianceMonitor
- type InfrastructureEvidenceIndexer
- type InfrastructureRetentionPolicy
- type InfrastructureTest
- type Interaction
- type InteractionRequest
- type InteractionResponse
- type InteractionResult
- type InteractionValidation
- type JobStatus
- type KubernetesClient
- type KubernetesConfig
- type KubernetesMetricsCollector
- type KubernetesMonitoringSystem
- type LatencyFaultConfig
- type LatencyResults
- type LeaderElection
- type Lesson
- type LessonCategory
- type LessonImpact
- type LoadBalancingAlgorithm
- type LoadBalancingConfig
- type LocalConsentHistory
- type LocalConsentRecord
- type LogAggregator
- type LogConfig
- type LogFormat
- type LogLevel
- type MetricsCollector
- type Milestone
- type MonitorAction
- type MonitorScheduler
- type MonitorType
- type MonitoringConfig
- type MonitoringMetrics
- type MultiRegionChaosOrchestrator
- type NetworkChaosController
- func (n *NetworkChaosController) Cleanup(ctx context.Context) error
- func (n *NetworkChaosController) CreateChaosExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
- func (n *NetworkChaosController) GetName() string
- func (n *NetworkChaosController) GetSupportedFaults() []FaultType
- func (n *NetworkChaosController) GetType() ChaosControllerType
- func (n *NetworkChaosController) Initialize(ctx context.Context, config *KubernetesConfig) error
- func (n *NetworkChaosController) MonitorExperiment(ctx context.Context, experimentID string) (*ExperimentStatusInfo, error)
- func (n *NetworkChaosController) StopExperiment(ctx context.Context, experimentID string) error
- func (n *NetworkChaosController) ValidateSpec(spec *ChaosExperimentSpec) error
- type NetworkFaultConfig
- type NetworkFaultInjector
- func (nfi *NetworkFaultInjector) Inject(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
- func (nfi *NetworkFaultInjector) Remove(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
- func (nfi *NetworkFaultInjector) Status(ctx context.Context, fault FaultDefinition, target ExperimentTarget) (FaultStatus, error)
- type NetworkInterface
- type NetworkLatencyFailure
- type NetworkLatencyScenario
- func (n *NetworkLatencyScenario) Description() string
- func (n *NetworkLatencyScenario) ExecuteOperations(ctx context.Context) ([]OperationResult, error)
- func (n *NetworkLatencyScenario) InjectFailure(ctx context.Context) (ChaosFailure, error)
- func (n *NetworkLatencyScenario) Name() string
- func (n *NetworkLatencyScenario) ValidateRecovery(ctx context.Context, metrics *ChaosMetrics) error
- type NetworkManager
- type NetworkPartitionConfig
- type NetworkTopology
- type NodeCondition
- type NodeMetrics
- type Notification
- type NotificationChannel
- type NotificationConfig
- type NotificationRule
- type NotificationSeverity
- type NotificationType
- type Observation
- type ObservationSeverity
- type ObservationType
- type OperationResult
- type OperatorStatus
- type PanelConfig
- type PanelType
- type Participant
- type ParticipantFeedback
- type ParticipantRole
- type PartitionTester
- type PartitionType
- type PatternTestReport
- type PatternTestResult
- type PatternTestStatus
- type PendingExperiment
- type PerformanceBaseline
- type PerformanceConfig
- type PerformanceMetrics
- type PerformanceProfiler
- type PerformanceReport
- type PerformanceReporter
- type PerformanceResults
- type PerformanceTestCase
- type PerformanceTestMetrics
- type PerformanceTestReport
- type PerformanceTestResult
- type PerformanceTester
- type PerformanceThreshold
- type PerformanceType
- type PerformanceValidator
- type PersonalDataType
- type PhaseAction
- type PhaseCondition
- type PhaseType
- type PodChaosController
- func (p *PodChaosController) Cleanup(ctx context.Context) error
- func (p *PodChaosController) CreateChaosExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
- func (p *PodChaosController) GetName() string
- func (p *PodChaosController) GetSupportedFaults() []FaultType
- func (p *PodChaosController) GetType() ChaosControllerType
- func (p *PodChaosController) Initialize(ctx context.Context, config *KubernetesConfig) error
- func (p *PodChaosController) MonitorExperiment(ctx context.Context, experimentID string) (*ExperimentStatusInfo, error)
- func (p *PodChaosController) StopExperiment(ctx context.Context, experimentID string) error
- func (p *PodChaosController) ValidateSpec(spec *ChaosExperimentSpec) error
- type PodMetrics
- type PodSelector
- type PolicyEnforcement
- type PolicyException
- type PolicyRule
- type PolicyRuleType
- type PolicyScope
- type PolicySeverity
- type PrivacyEvidenceType
- type PrivacyTestType
- type ProcessingPurpose
- type ProcessorType
- type RBACConfig
- type Recommendation
- type RecommendationPriority
- type RecommendationType
- type RecoveryConfig
- type RecoveryResults
- type RecoveryThresholds
- type RecoveryValidator
- type RegionConfig
- type RegionCredentials
- type RegionHealthChecker
- type RegionManager
- type RegionMonitoringAgent
- type RegionNetworkConfig
- type RegionNetworkManager
- type RegionResourceManager
- type RegionResources
- type RegionStatus
- type RegressionDetector
- type RegressionResult
- type ReplicationChaosController
- type ReplicationMode
- type ReportChart
- type ReportExporter
- type ReportFormat
- type ReportSection
- type ReportTemplate
- type ReportType
- type ResilienceMetrics
- type ResourceFaultConfig
- type ResourceFaultInjector
- func (rfi *ResourceFaultInjector) Inject(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
- func (rfi *ResourceFaultInjector) Remove(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
- func (rfi *ResourceFaultInjector) Status(ctx context.Context, fault FaultDefinition, target ExperimentTarget) (FaultStatus, error)
- type ResourceLimits
- type ResourceManager
- type ResourceMonitor
- type ResourceResults
- type ResourceState
- type ResourceUtilization
- type ResourceValidator
- type ResultSummary
- type RetentionAction
- type RetentionCondition
- type RetentionPolicy
- type RetryConfig
- type RiskAssessment
- type RiskFactor
- type RollbackConfig
- type RuleSeverity
- type SOC2Category
- type SOC2ComplianceReport
- type SOC2ComplianceTester
- func (tester *SOC2ComplianceTester) CollectControlEvidence(ctx context.Context) (*ControlEvidence, error)
- func (tester *SOC2ComplianceTester) TestAvailabilityControls(ctx context.Context) error
- func (tester *SOC2ComplianceTester) TestConfidentialityControls(ctx context.Context) error
- func (tester *SOC2ComplianceTester) TestPrivacyControls(ctx context.Context) error
- func (tester *SOC2ComplianceTester) TestProcessingIntegrity(ctx context.Context) error
- func (tester *SOC2ComplianceTester) TestSecurityControls(ctx context.Context) error
- type SOC2Control
- type SOC2Criteria
- type SOC2Reporter
- type SOC2TestCase
- type SOC2TestResult
- type SOC2TypeIICompliance
- type SafeguardConfig
- type SamplingConfig
- type SamplingRule
- type ScalabilityResults
- type ScenarioType
- type ScheduledJob
- type SchemaDefinition
- type SchemaProperty
- type SectionType
- type SecurityCategory
- type SecurityConfig
- type SecurityControl
- type SelectionMode
- type ServiceContract
- type ServiceDefinition
- type ServiceFaultConfig
- type ServiceFaultInjector
- func (sfi *ServiceFaultInjector) Inject(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
- func (sfi *ServiceFaultInjector) Remove(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
- func (sfi *ServiceFaultInjector) Status(ctx context.Context, fault FaultDefinition, target ExperimentTarget) (FaultStatus, error)
- type ServiceInfo
- type ServiceMetrics
- type ServiceMock
- type ServiceMockRegistry
- type ServicePort
- type ServiceSelector
- type ServiceUnavailableFailure
- type ServiceUnavailableScenario
- func (s *ServiceUnavailableScenario) Description() string
- func (s *ServiceUnavailableScenario) ExecuteOperations(ctx context.Context) ([]OperationResult, error)
- func (s *ServiceUnavailableScenario) InjectFailure(ctx context.Context) (ChaosFailure, error)
- func (s *ServiceUnavailableScenario) Name() string
- func (s *ServiceUnavailableScenario) ValidateRecovery(ctx context.Context, metrics *ChaosMetrics) error
- type ServiceValidator
- type Severity
- type StressChaosController
- func (s *StressChaosController) Cleanup(ctx context.Context) error
- func (s *StressChaosController) CreateChaosExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
- func (s *StressChaosController) GetName() string
- func (s *StressChaosController) GetSupportedFaults() []FaultType
- func (s *StressChaosController) GetType() ChaosControllerType
- func (s *StressChaosController) Initialize(ctx context.Context, config *KubernetesConfig) error
- func (s *StressChaosController) MonitorExperiment(ctx context.Context, experimentID string) (*ExperimentStatusInfo, error)
- func (s *StressChaosController) StopExperiment(ctx context.Context, experimentID string) error
- func (s *StressChaosController) ValidateSpec(spec *ChaosExperimentSpec) error
- type StressInjector
- type SuccessCriteria
- type TargetScope
- type TargetSelector
- type Test
- type TestCase
- type TestConfig
- type TestEnvironment
- type TestExecutor
- type TestFrequency
- type TestReport
- type TestResult
- type TestStatus
- type TestSuite
- type TestSummary
- type TestType
- type ThroughputResults
- type TimeChaosController
- func (t *TimeChaosController) Cleanup(ctx context.Context) error
- func (t *TimeChaosController) CreateChaosExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
- func (t *TimeChaosController) GetName() string
- func (t *TimeChaosController) GetSupportedFaults() []FaultType
- func (t *TimeChaosController) GetType() ChaosControllerType
- func (t *TimeChaosController) Initialize(ctx context.Context, config *KubernetesConfig) error
- func (t *TimeChaosController) MonitorExperiment(ctx context.Context, experimentID string) (*ExperimentStatusInfo, error)
- func (t *TimeChaosController) StopExperiment(ctx context.Context, experimentID string) error
- func (t *TimeChaosController) ValidateSpec(spec *ChaosExperimentSpec) error
- type TimeManager
- type TimeRangeConfig
- type Toleration
- type TopologyType
- type TraceConfig
- type TrafficController
- type TransferMechanism
- type TransferMechanismConfig
- type TransferValidationResult
- type TransferValidator
- type ValidationCheck
- type ValidationConfig
- type ValidationMetrics
- type ValidationProcessor
- type ValidationResult
- type ValidationRule
- type ValidationSeverity
- type ValidationStatus
- type ValidationSummary
- type ValidationViolation
- type ValidationWarning
- type ViolationSeverity
- type WatchManager
- type WebhookClientConfig
- type WebhookRule
- type WebhookService
- type WebhookType
- type WidgetType
- type WorkerStatus
Constants ¶
const ( PendingStatus TestStatus = "pending" RunningStatus TestStatus = "running" PassedStatus TestStatus = "passed" FailedStatus TestStatus = "failed" SkippedStatus TestStatus = "skipped" TimeoutStatus TestStatus = "timeout" ErrorStatus TestStatus = "error" // Aliases for backward compatibility TestStatusPending = PendingStatus TestStatusRunning = RunningStatus TestStatusPassed = PassedStatus TestStatusFailed = FailedStatus TestStatusSkipped = SkippedStatus TestStatusTimeout = TimeoutStatus TestStatusError = ErrorStatus TestStatusCompleted = PassedStatus )
const ( ValidationPassed ValidationStatus = "passed" ValidationFailed ValidationStatus = "failed" ValidationError ValidationStatus = "error" // Aliases for backward compatibility ValidationStatusPassed = ValidationPassed ValidationStatusFailed = ValidationFailed ValidationStatusError = ValidationError )
const ( ExperimentStatusPending = ExperimentPending ExperimentStatusRunning = ExperimentRunning ExperimentStatusCompleted = ExperimentCompleted ExperimentStatusFailed = ExperimentFailed ExperimentStatusAborted = ExperimentAborted CompletedExperimentStatus = ExperimentCompleted )
Additional experiment status constants
const ( ServiceTarget = "service" NetworkTarget = "network" DatabaseTarget = "database" InfrastructureTarget = "infrastructure" )
Target types for chaos experiments
Variables ¶
This section is empty.
Functions ¶
func CalculateResilienceScore ¶
func CalculateResilienceScore(results *ExperimentResults) float64
CalculateResilienceScore calculates a resilience score based on experiment results
func ValidateExperimentSafety ¶
func ValidateExperimentSafety(experiment *ChaosExperiment, policy *ChaosPolicy) []string
Types ¶
type AccessControl ¶
type AccessControl struct {
ControlType string
UserID string
Resource string
Permissions []string
LastAccessed time.Time
Status string
}
AccessControl represents an access control
type ActionCategory ¶
type ActionCategory string
ActionCategory defines action item category
const ( TechnicalAction ActionCategory = "technical" ProcessAction ActionCategory = "process" DocumentationAction ActionCategory = "documentation" TrainingAction ActionCategory = "training" )
type ActionItem ¶
type ActionItem struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Priority ActionPriority `json:"priority"`
Assignee string `json:"assignee"`
DueDate time.Time `json:"due_date"`
Status ActionStatus `json:"status"`
Category ActionCategory `json:"category"`
Metadata map[string]any `json:"metadata"`
}
ActionItem represents an action item from game day
type ActionPriority ¶
type ActionPriority string
ActionPriority defines action item priority
const ( CriticalActionPriority ActionPriority = "critical" HighActionPriority ActionPriority = "high" MediumActionPriority ActionPriority = "medium" LowActionPriority ActionPriority = "low" )
type ActionStatus ¶
type ActionStatus string
ActionStatus defines action item status
const ( OpenAction ActionStatus = "open" InProgressAction ActionStatus = "in_progress" CompletedAction ActionStatus = "completed" CancelledAction ActionStatus = "cancelled" )
type ActionType ¶
type ActionType string
ActionType defines the type of monitor action
const ( AlertAction ActionType = "alert" EmailAction ActionType = "email" WebhookAction ActionType = "webhook" RemediateAction ActionType = "remediate" )
type ActiveFault ¶
type ActiveFault struct {
ID string `json:"id"`
Type FaultType `json:"type"`
StartTime time.Time `json:"start_time"`
Duration time.Duration `json:"duration"`
Config map[string]any `json:"config"`
Impact *FaultImpact `json:"impact"`
}
ActiveFault represents an active fault injection
type AdmissionWebhook ¶
type AdmissionWebhook struct {
Name string `json:"name"`
Type WebhookType `json:"type"`
Rules []WebhookRule `json:"rules"`
ClientConfig *WebhookClientConfig `json:"client_config"`
AdmissionReviewVersions []string `json:"admission_review_versions"`
SideEffects string `json:"side_effects"`
FailurePolicy string `json:"failure_policy"`
}
AdmissionWebhook defines admission webhook configuration
type AlertChannel ¶
type AlertChannel interface {
Send(ctx context.Context, alert *ComplianceAlert) error
Configure(config AlertChannelConfig) error
}
AlertChannel represents an alert channel
type AlertChannelConfig ¶
type AlertChannelConfig struct {
Type string `json:"type"`
Config map[string]any `json:"config"`
Enabled bool `json:"enabled"`
}
AlertChannelConfig represents configuration for an alert channel
type AlertCondition ¶
type AlertCondition struct {
Field string `json:"field"`
Operator string `json:"operator"`
Value any `json:"value"`
}
AlertCondition represents a condition for triggering an alert
type AlertManager ¶
type AlertManager struct{}
type AlertRule ¶
type AlertRule struct {
ID string `json:"id"`
Conditions []AlertCondition `json:"conditions"`
Channels []string `json:"channels"`
Throttle time.Duration `json:"throttle"`
Metadata map[string]any `json:"metadata"`
}
AlertRule represents an alerting rule
type AlertSeverity ¶
type AlertSeverity = Severity
AlertSeverity is an alias for Severity for alert contexts
type AlertingConfig ¶
type AlertingConfig struct {
Enabled bool `json:"enabled"`
Channels []AlertChannelConfig `json:"channels"`
Templates map[string]string `json:"templates"`
Rules []AlertRule `json:"rules"`
}
AlertingConfig represents alerting configuration
type AlertingSystem ¶
type AlertingSystem interface {
SendAlert(ctx context.Context, alert *ComplianceAlert) error
ConfigureChannel(channel AlertChannelConfig) error
GetChannels() []AlertChannelConfig
}
AlertingSystem defines the interface for alerting systems
type ArticleResult ¶
type ArticleResult struct {
ArticleNumber string `json:"article_number"`
Category GDPRCategory `json:"category"`
Status ComplianceStatus `json:"status"`
TestResults map[string]*ComplianceTestResult `json:"test_results"`
Evidence []Evidence `json:"evidence"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
Metadata map[string]any `json:"metadata"`
}
ArticleResult represents the result of testing a GDPR article
type AuditEvent ¶
type AuditEvent struct {
EventID string
EventType string
Timestamp time.Time
UserID string
Description string
Metadata map[string]any
}
AuditEvent represents a single audit event
type AuditLog ¶
type AuditLog struct {
LogID string
Event string
Timestamp time.Time
UserID string
IPAddress string
Details map[string]any
}
AuditLog represents an audit log entry
type AuditTrail ¶
type AuditTrail struct {
UserID string
Events []AuditEvent
}
AuditTrail represents GDPR audit trail
type BackoffMode ¶
type BackoffMode string
BackoffMode defines backoff strategies
const ( BackoffModeLinear BackoffMode = "linear" BackoffModeExponential BackoffMode = "exponential" BackoffModeFixed BackoffMode = "fixed" BackoffModeRandom BackoffMode = "random" )
type BasicContractValidator ¶
type BasicContractValidator struct {
// contains filtered or unexported fields
}
BasicContractValidator implements ContractValidator interface
func NewBasicContractValidator ¶
func NewBasicContractValidator() *BasicContractValidator
NewBasicContractValidator creates a new basic contract validator
func (*BasicContractValidator) Validate ¶
func (v *BasicContractValidator) Validate(ctx context.Context, interaction *ContractInteraction) error
Validate validates a contract interaction
func (*BasicContractValidator) ValidateContract ¶
func (v *BasicContractValidator) ValidateContract(ctx context.Context, contract *ServiceContract) (*TestResult, error)
ValidateContract validates a contract (implementing ContractValidator interface)
func (*BasicContractValidator) ValidateInteraction ¶
func (v *BasicContractValidator) ValidateInteraction(ctx context.Context, interaction *ContractInteraction) (*InteractionResult, error)
ValidateInteraction validates a contract interaction (implementing ContractValidator interface)
type BasicEvidenceIndexer ¶
type BasicEvidenceIndexer struct {
// contains filtered or unexported fields
}
BasicEvidenceIndexer implements EvidenceIndexer interface
func NewBasicEvidenceIndexer ¶
func NewBasicEvidenceIndexer() *BasicEvidenceIndexer
NewBasicEvidenceIndexer creates a new basic evidence indexer
func (*BasicEvidenceIndexer) GetEvidence ¶
GetEvidence implements EvidenceIndexer.GetEvidence
func (*BasicEvidenceIndexer) IndexEvidence ¶
func (b *BasicEvidenceIndexer) IndexEvidence(ctx context.Context, evidence *Evidence) error
IndexEvidence implements EvidenceIndexer.IndexEvidence
func (*BasicEvidenceIndexer) SearchEvidence ¶
func (b *BasicEvidenceIndexer) SearchEvidence(ctx context.Context, query string) ([]*Evidence, error)
SearchEvidence implements EvidenceIndexer.SearchEvidence
type BlastRadius ¶
type BlastRadius struct {
Scope string `json:"scope"`
Severity string `json:"severity"`
Impact map[string]any `json:"impact"`
}
BlastRadius represents the potential impact scope of a chaos experiment
func GenerateBlastRadius ¶
func GenerateBlastRadius(experiment *ChaosExperiment) *BlastRadius
GenerateBlastRadius generates a blast radius assessment for chaos experiments
type BlastRadiusType ¶
type BlastRadiusType string
BlastRadiusType defines types of blast radius
const ( InstanceBlastRadius BlastRadiusType = "instance" ServiceBlastRadius BlastRadiusType = "service" RegionBlastRadius BlastRadiusType = "region" ClusterBlastRadius BlastRadiusType = "cluster" )
type Break ¶
type Break struct {
Name string `json:"name"`
StartTime time.Time `json:"start_time"`
Duration time.Duration `json:"duration"`
Type BreakType `json:"type"`
}
Break represents a scheduled break
type CRDCondition ¶
type CRDCondition struct {
Type string `json:"type"`
Status string `json:"status"`
LastTransitionTime time.Time `json:"last_transition_time"`
Reason string `json:"reason"`
Message string `json:"message"`
}
CRDCondition defines CRD condition
type CRDManager ¶
type CRDManager struct{}
func NewCRDManager ¶
func NewCRDManager(config *KubernetesConfig) (*CRDManager, error)
Placeholder constructor functions
type CRDNames ¶
type CRDNames struct {
Plural string `json:"plural"`
Singular string `json:"singular"`
Kind string `json:"kind"`
ShortNames []string `json:"short_names,omitempty"`
}
CRDNames defines CRD naming
type CRDSpec ¶
type CRDSpec struct {
Group string `json:"group"`
Versions []CRDVersion `json:"versions"`
Scope string `json:"scope"`
Names CRDNames `json:"names"`
}
CRDSpec defines CRD specification
type CRDStatus ¶
type CRDStatus struct {
Conditions []CRDCondition `json:"conditions"`
AcceptedNames CRDNames `json:"accepted_names"`
StoredVersions []string `json:"stored_versions"`
}
CRDStatus defines CRD status
type CRDVersion ¶
type CRDVersion struct {
Name string `json:"name"`
Served bool `json:"served"`
Storage bool `json:"storage"`
Schema map[string]any `json:"schema"`
}
CRDVersion defines CRD version
type ChaosCondition ¶
type ChaosCondition struct {
Type string `json:"type"`
Status string `json:"status"`
LastTransitionTime time.Time `json:"last_transition_time"`
Reason string `json:"reason"`
Message string `json:"message"`
}
ChaosCondition defines experiment conditions
type ChaosConfig ¶
type ChaosConfig struct {
MaxDuration time.Duration `json:"max_duration"`
RecoveryTimeout time.Duration `json:"recovery_timeout"`
FailureRate float64 `json:"failure_rate"`
Enabled bool `json:"enabled"`
}
ChaosConfig configures chaos testing parameters (simple version for basic chaos testing)
type ChaosController ¶
type ChaosController interface {
GetName() string
GetType() ChaosControllerType
Initialize(ctx context.Context, config *KubernetesConfig) error
CreateChaosExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
MonitorExperiment(ctx context.Context, experimentID string) (*ExperimentStatusInfo, error)
StopExperiment(ctx context.Context, experimentID string) error
GetSupportedFaults() []FaultType
ValidateSpec(spec *ChaosExperimentSpec) error
Cleanup(ctx context.Context) error
}
ChaosController interface for specialized chaos controllers
type ChaosControllerType ¶
type ChaosControllerType string
ChaosControllerType defines controller types
const ( PodChaosControllerType ChaosControllerType = "pod_chaos" NetworkChaosControllerType ChaosControllerType = "network_chaos" StressChaosControllerType ChaosControllerType = "stress_chaos" IOChaosControllerType ChaosControllerType = "io_chaos" TimeChaosControllerType ChaosControllerType = "time_chaos" )
type ChaosCoordinator ¶
type ChaosCoordinator struct {
// contains filtered or unexported fields
}
ChaosCoordinator coordinates chaos experiments across regions
func NewChaosCoordinator ¶
func NewChaosCoordinator(config *DistributedConfig, regions map[string]*RegionManager) (*ChaosCoordinator, error)
NewChaosCoordinator creates a new chaos coordinator
func (*ChaosCoordinator) ExecuteExperiment ¶
func (c *ChaosCoordinator) ExecuteExperiment(ctx context.Context, experiment *DistributedExperiment) error
ExecuteExperiment executes a distributed experiment
type ChaosEngineeringConfig ¶
type ChaosEngineeringConfig struct {
Environment string `json:"environment"`
SafetyMode bool `json:"safety_mode"`
MaxConcurrentExperiments int `json:"max_concurrent_experiments"`
DefaultTimeout time.Duration `json:"default_timeout"`
MonitoringInterval time.Duration `json:"monitoring_interval"`
RetentionPeriod time.Duration `json:"retention_period"`
Notifications NotificationConfig `json:"notifications"`
Security SecurityConfig `json:"security"`
Metadata map[string]any `json:"metadata"`
}
ChaosEngineeringConfig configures the comprehensive chaos engineering framework
type ChaosEngineeringFramework ¶
type ChaosEngineeringFramework struct {
// contains filtered or unexported fields
}
ChaosEngineeringFramework represents the main chaos engineering framework
func NewChaosEngineeringFramework ¶
func NewChaosEngineeringFramework(config *ChaosEngineeringConfig) *ChaosEngineeringFramework
NewChaosEngineeringFramework creates a new chaos engineering framework
func (*ChaosEngineeringFramework) RunExperiment ¶
func (f *ChaosEngineeringFramework) RunExperiment(ctx context.Context, experiment *ChaosExperiment) (*ExperimentResults, error)
RunExperiment runs a chaos experiment
type ChaosEngineeringMetrics ¶
type ChaosEngineeringMetrics struct {
ExperimentsRun int `json:"experiments_run"`
ExperimentsSucceeded int `json:"experiments_succeeded"`
ExperimentsFailed int `json:"experiments_failed"`
SuccessRate float64 `json:"success_rate"`
AverageExperimentDuration time.Duration `json:"average_experiment_duration"`
FaultsInjected int `json:"faults_injected"`
SystemsAffected int `json:"systems_affected"`
ImprovementsFound int `json:"improvements_found"`
LastExperiment time.Time `json:"last_experiment"`
Trends map[string]any `json:"trends"`
LastUpdated time.Time `json:"last_updated"`
}
ChaosEngineeringMetrics tracks chaos engineering metrics
type ChaosEngineeringTester ¶
type ChaosEngineeringTester struct {
// contains filtered or unexported fields
}
ChaosEngineeringTester provides chaos engineering testing capabilities
func NewChaosEngineeringTester ¶
func NewChaosEngineeringTester(app any) *ChaosEngineeringTester
NewChaosEngineeringTester creates a new chaos engineering tester
func (*ChaosEngineeringTester) CheckSystemHealth ¶
func (tester *ChaosEngineeringTester) CheckSystemHealth(ctx context.Context) (bool, error)
CheckSystemHealth checks if the system is healthy
func (*ChaosEngineeringTester) InjectAPILatency ¶
func (tester *ChaosEngineeringTester) InjectAPILatency(ctx context.Context, latencyMs int, percentage int, duration time.Duration) error
InjectAPILatency simulates artificial latency in API responses
func (*ChaosEngineeringTester) InjectCPUSpike ¶
func (tester *ChaosEngineeringTester) InjectCPUSpike(ctx context.Context, percentage int, duration time.Duration) error
InjectCPUSpike simulates high CPU load
func (*ChaosEngineeringTester) InjectDatabaseFailure ¶
func (tester *ChaosEngineeringTester) InjectDatabaseFailure(ctx context.Context, failureType string, duration time.Duration) error
InjectDatabaseFailure simulates database connection failures
func (*ChaosEngineeringTester) InjectMemoryPressure ¶
func (tester *ChaosEngineeringTester) InjectMemoryPressure(ctx context.Context, percentage int, duration time.Duration) error
InjectMemoryPressure simulates memory pressure
type ChaosEvent ¶
type ChaosEvent struct {
ID string `json:"id"`
Type ChaosEventType `json:"type"`
Source string `json:"source"`
Target string `json:"target"`
Timestamp time.Time `json:"timestamp"`
Data map[string]any `json:"data"`
Severity EventSeverity `json:"severity"`
Tags []string `json:"tags"`
Metadata map[string]string `json:"metadata"`
}
ChaosEvent defines chaos engineering event
type ChaosEventBus ¶
type ChaosEventBus struct {
// contains filtered or unexported fields
}
ChaosEventBus manages chaos engineering events
func NewChaosEventBus ¶
func NewChaosEventBus() *ChaosEventBus
NewChaosEventBus creates a new chaos event bus
func (*ChaosEventBus) PublishEvent ¶
func (c *ChaosEventBus) PublishEvent(ctx context.Context, event *ChaosEvent) error
PublishEvent publishes a chaos event
func (*ChaosEventBus) Subscribe ¶
func (c *ChaosEventBus) Subscribe(eventType string, subscriber EventSubscriber)
Subscribe subscribes to chaos events
type ChaosEventType ¶
type ChaosEventType string
ChaosEventType defines event types
const ( ExperimentStartedEvent ChaosEventType = "experiment_started" ExperimentStoppedEvent ChaosEventType = "experiment_stopped" FaultInjectedEvent ChaosEventType = "fault_injected" FaultRecoveredEvent ChaosEventType = "fault_recovered" TargetSelectedEvent ChaosEventType = "target_selected" MetricsCollectedEvent ChaosEventType = "metrics_collected" AlertTriggeredEvent ChaosEventType = "alert_triggered" PolicyViolationEvent ChaosEventType = "policy_violation" )
type ChaosExperiment ¶
type ChaosExperiment struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Type FaultType `json:"type"`
Status ExperimentStatus `json:"status"`
Target ExperimentTarget `json:"target"`
Fault FaultDefinition `json:"fault"`
Faults []FaultDefinition `json:"faults"`
Duration time.Duration `json:"duration"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Hypothesis string `json:"hypothesis"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Metadata map[string]any `json:"metadata"`
}
ChaosExperiment represents a chaos engineering experiment
type ChaosExperimentResult ¶
type ChaosExperimentResult struct {
ID string `json:"id"`
ExperimentID string `json:"experiment_id"`
Status ExperimentStatus `json:"status"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
FaultType FaultType `json:"fault_type"`
Target string `json:"target"`
Metrics map[string]any `json:"metrics"`
Errors []string `json:"errors"`
Metadata map[string]any `json:"metadata"`
}
ChaosExperimentResult represents the result of a chaos experiment
type ChaosExperimentSpec ¶
type ChaosExperimentSpec struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
ControllerType ChaosControllerType `json:"controller_type"`
FaultType FaultType `json:"fault_type"`
TargetSelector *TargetSelector `json:"target_selector"`
FaultConfig map[string]any `json:"fault_config"`
Duration time.Duration `json:"duration"`
Schedule *ChaosSchedule `json:"schedule,omitempty"`
Conditions []ChaosCondition `json:"conditions,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
ChaosExperimentSpec defines Kubernetes-specific experiment specification
type ChaosFailure ¶
type ChaosFailure interface {
Type() string
Severity() ChaosSeverity
Duration() time.Duration
Cleanup() error
IsActive() bool
}
ChaosFailure represents an injected failure
type ChaosGameDay ¶
type ChaosGameDay struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Scenarios []GameDayScenario `json:"scenarios"`
Participants []Participant `json:"participants"`
Schedule *GameDaySchedule `json:"schedule"`
Objectives []string `json:"objectives"`
Success []SuccessCriteria `json:"success_criteria"`
Status GameDayStatus `json:"status"`
Results *GameDayResults `json:"results"`
Metadata map[string]any `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
ChaosGameDay represents a coordinated chaos engineering exercise
type ChaosHealthCheck ¶
HealthCheck represents a health check function
type ChaosMeshIntegration ¶
type ChaosMeshIntegration struct {
// contains filtered or unexported fields
}
ChaosMeshIntegration provides native Kubernetes chaos engineering capabilities
func NewChaosMeshIntegration ¶
func NewChaosMeshIntegration(config *KubernetesConfig) (*ChaosMeshIntegration, error)
NewChaosMeshIntegration creates a new Kubernetes chaos engineering integration
func (*ChaosMeshIntegration) CreateExperiment ¶
func (c *ChaosMeshIntegration) CreateExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
CreateExperiment creates a new chaos experiment
func (*ChaosMeshIntegration) GetSupportedFaults ¶
func (c *ChaosMeshIntegration) GetSupportedFaults() map[ChaosControllerType][]FaultType
GetSupportedFaults returns supported fault types for all controllers
func (*ChaosMeshIntegration) MonitorExperiment ¶
func (c *ChaosMeshIntegration) MonitorExperiment(ctx context.Context, experimentID string, controllerType ChaosControllerType) (*ExperimentStatusInfo, error)
MonitorExperiment monitors an active experiment
func (*ChaosMeshIntegration) StopExperiment ¶
func (c *ChaosMeshIntegration) StopExperiment(ctx context.Context, experimentID string, controllerType ChaosControllerType) error
StopExperiment stops an active experiment
type ChaosMetrics ¶
type ChaosMetrics struct {
StartTime time.Time
EndTime time.Time
TotalOperations int
SuccessfulOps int
FailedOps int
AverageLatency time.Duration
RecoveryTime time.Duration
ErrorRate float64
Throughput float64
ResourceUsage map[string]float64
CustomMetrics map[string]any
// contains filtered or unexported fields
}
ChaosMetrics tracks metrics during chaos testing
func NewChaosMetrics ¶
func NewChaosMetrics() *ChaosMetrics
NewChaosMetrics creates new chaos metrics
func (*ChaosMetrics) StartCollection ¶
func (m *ChaosMetrics) StartCollection()
StartCollection starts metrics collection
func (*ChaosMetrics) UpdateWithResults ¶
func (m *ChaosMetrics) UpdateWithResults(results []OperationResult)
UpdateWithResults updates metrics with operation results
type ChaosOperator ¶
type ChaosOperator struct {
Name string `json:"name"`
Version string `json:"version"`
CRDs []*CustomResourceDefinition `json:"crds"`
Controllers []ChaosController `json:"controllers"`
Webhooks []*AdmissionWebhook `json:"webhooks"`
RBAC *RBACConfig `json:"rbac"`
Configuration map[string]any `json:"configuration"`
Status OperatorStatus `json:"status"`
}
ChaosOperator defines a Kubernetes operator for chaos engineering
type ChaosOperatorManager ¶
type ChaosOperatorManager struct {
// contains filtered or unexported fields
}
ChaosOperatorManager manages Kubernetes operator patterns
func NewChaosOperatorManager ¶
func NewChaosOperatorManager(config *KubernetesConfig) (*ChaosOperatorManager, error)
type ChaosPolicy ¶
type ChaosPolicy struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Rules []PolicyRule `json:"rules"`
Enforcement PolicyEnforcement `json:"enforcement"`
Scope PolicyScope `json:"scope"`
Exceptions []PolicyException `json:"exceptions"`
Metadata map[string]any `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Version string `json:"version"`
}
ChaosPolicy defines policies for chaos engineering
type ChaosPolicyAction ¶
type ChaosPolicyAction string
ChaosPolicyAction defines policy actions
const ( AllowPolicyAction ChaosPolicyAction = "allow" DenyPolicyAction ChaosPolicyAction = "deny" RequireApprovalPolicy ChaosPolicyAction = "require_approval" LogPolicyAction ChaosPolicyAction = "log" AlertPolicyAction ChaosPolicyAction = "alert" )
type ChaosReconciler ¶
type ChaosReconciler struct{}
type ChaosReporter ¶
type ChaosReporter struct {
// contains filtered or unexported fields
}
ChaosReporter generates chaos experiment reports
func NewChaosReporter ¶
func NewChaosReporter() *ChaosReporter
NewChaosReporter creates a new chaos reporter
type ChaosScenario ¶
type ChaosScenario interface {
Name() string
Description() string
InjectFailure(ctx context.Context) (ChaosFailure, error)
ExecuteOperations(ctx context.Context) ([]OperationResult, error)
ValidateRecovery(ctx context.Context, metrics *ChaosMetrics) error
}
ChaosScenario represents a chaos engineering scenario
type ChaosSchedule ¶
type ChaosSchedule struct {
Cron string `json:"cron,omitempty"`
StartTime *time.Time `json:"start_time,omitempty"`
EndTime *time.Time `json:"end_time,omitempty"`
Timezone string `json:"timezone,omitempty"`
Repeat int `json:"repeat,omitempty"`
Interval time.Duration `json:"interval,omitempty"`
}
ChaosSchedule defines experiment scheduling
type ChaosScheduler ¶
type ChaosScheduler struct {
// contains filtered or unexported fields
}
ChaosScheduler handles experiment scheduling
func NewChaosScheduler ¶
func NewChaosScheduler(config *ChaosEngineeringConfig) *ChaosScheduler
NewChaosScheduler creates a new chaos scheduler
type ChaosScopeType ¶
type ChaosScopeType string
ChaosScopeType defines types of policy scope
const ( GlobalChaosScope ChaosScopeType = "global" EnvironmentChaosScope ChaosScopeType = "environment" ServiceChaosScope ChaosScopeType = "service" TeamChaosScope ChaosScopeType = "team" )
type ChaosSeverity ¶
type ChaosSeverity string
ChaosSeverity represents the severity of a chaos failure
const ( ChaosSeverityLow ChaosSeverity = "low" ChaosSeverityMedium ChaosSeverity = "medium" ChaosSeverityHigh ChaosSeverity = "high" ChaosSeverityCritical ChaosSeverity = "critical" )
type ChaosTest ¶
type ChaosTest struct {
// contains filtered or unexported fields
}
ChaosTest manages chaos engineering tests
func NewChaosTest ¶
func NewChaosTest(config ChaosConfig) *ChaosTest
NewChaosTest creates a new chaos test
func (*ChaosTest) AddScenario ¶
func (c *ChaosTest) AddScenario(scenario ChaosScenario)
AddScenario adds a chaos scenario to the test
type ClockSkewer ¶
type ClockSkewer any
type ClusterMetrics ¶
type ClusterMetrics struct {
NodeCount int `json:"node_count"`
PodCount int `json:"pod_count"`
ServiceCount int `json:"service_count"`
NamespaceCount int `json:"namespace_count"`
CPUCapacity float64 `json:"cpu_capacity"`
MemoryCapacity int64 `json:"memory_capacity"`
CPUUsage float64 `json:"cpu_usage"`
MemoryUsage int64 `json:"memory_usage"`
StorageCapacity int64 `json:"storage_capacity"`
StorageUsage int64 `json:"storage_usage"`
NetworkThroughput int64 `json:"network_throughput"`
APIServerLatency time.Duration `json:"api_server_latency"`
ETCDLatency time.Duration `json:"etcd_latency"`
Version string `json:"version"`
LastUpdated time.Time `json:"last_updated"`
}
ClusterMetrics defines cluster-level metrics
type ComplianceAlert ¶
type ComplianceAlert struct {
ID string `json:"id"`
Framework string `json:"framework"`
Severity Severity `json:"severity"`
Title string `json:"title"`
Description string `json:"description"`
Timestamp time.Time `json:"timestamp"`
Metadata map[string]any `json:"metadata"`
}
ComplianceAlert represents a compliance-related alert
type ComplianceAlerter ¶
type ComplianceAlerter struct {
// contains filtered or unexported fields
}
ComplianceAlerter sends compliance alerts
type ComplianceReport ¶
type ComplianceReport struct {
ID string `json:"id"`
Framework string `json:"framework"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
AuditPeriod time.Duration `json:"audit_period"`
Controls map[string]*ControlResult `json:"controls"`
OverallStatus ComplianceStatus `json:"overall_status"`
Summary *ComplianceSummary `json:"summary"`
Metadata map[string]any `json:"metadata"`
}
ComplianceReport represents a comprehensive compliance report
type ComplianceReporter ¶
type ComplianceReporter struct {
// contains filtered or unexported fields
}
ComplianceReporter generates compliance reports
func NewComplianceReporter ¶
func NewComplianceReporter() *ComplianceReporter
NewComplianceReporter creates a new compliance reporter
type ComplianceStatus ¶
type ComplianceStatus string
ComplianceStatus represents overall compliance status
const ( CompliantStatus ComplianceStatus = "compliant" NonCompliantStatus ComplianceStatus = "non_compliant" PartiallyCompliant ComplianceStatus = "partially_compliant" )
type ComplianceSummary ¶
type ComplianceSummary struct {
TotalControls int `json:"total_controls"`
PassingControls int `json:"passing_controls"`
FailingControls int `json:"failing_controls"`
ExceptionControls int `json:"exception_controls"`
ControlsByCategory map[SecurityCategory]int `json:"controls_by_category"`
ComplianceScore float64 `json:"compliance_score"`
}
ComplianceSummary provides a summary of compliance results
type ComplianceTestResult ¶
type ComplianceTestResult struct {
TestID string `json:"test_id"`
Type TestType `json:"type"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
Status ComplianceTestStatus `json:"status"`
Result any `json:"result"`
Expected any `json:"expected"`
}
ComplianceTestResult represents the result of a compliance test
type ComplianceTestStatus ¶
type ComplianceTestStatus string
ComplianceTestStatus represents the status of compliance tests
const ( ComplianceTestPassed ComplianceTestStatus = "passed" ComplianceTestFailed ComplianceTestStatus = "failed" ComplianceTestException ComplianceTestStatus = "exception" ComplianceTestSkipped ComplianceTestStatus = "skipped" )
type ComplianceValidator ¶
type ComplianceValidator struct {
// contains filtered or unexported fields
}
ComplianceValidator provides validation capabilities for compliance frameworks
func NewComplianceValidator ¶
func NewComplianceValidator() *ComplianceValidator
NewComplianceValidator creates a new compliance validator
type Connection ¶
type Connection struct {
Source string `json:"source"`
Target string `json:"target"`
Latency time.Duration `json:"latency"`
Bandwidth int64 `json:"bandwidth"`
Reliability float64 `json:"reliability"`
Cost float64 `json:"cost"`
Status ConnectionStatus `json:"status"`
}
Connection defines network connection between regions
type ConnectionStatus ¶
type ConnectionStatus string
ConnectionStatus defines connection status
const ( ConnectionStatusActive ConnectionStatus = "active" ConnectionStatusInactive ConnectionStatus = "inactive" ConnectionStatusDegraded ConnectionStatus = "degraded" ConnectionStatusFailed ConnectionStatus = "failed" )
type ConsensusManager ¶
type ConsensusManager struct{}
type ConsentChange ¶
type ConsentChange struct {
Timestamp time.Time `json:"timestamp"`
Action string `json:"action"`
OldValue any `json:"old_value"`
NewValue any `json:"new_value"`
Reason string `json:"reason"`
Metadata map[string]any `json:"metadata"`
}
ConsentChange represents a change in consent
type ConsentHistory ¶
type ConsentHistory struct {
ConsentID string `json:"consent_id"`
Changes []ConsentChange `json:"changes"`
Metadata map[string]any `json:"metadata"`
}
ConsentHistory represents the history of consent changes
type ConsentManager ¶
type ConsentManager struct {
// contains filtered or unexported fields
}
ConsentManager manages GDPR consent
func NewConsentManager ¶
func NewConsentManager() *ConsentManager
NewConsentManager creates a new consent manager
func (*ConsentManager) GetConsent ¶
func (cm *ConsentManager) GetConsent(ctx context.Context, consentID string) (*LocalConsentRecord, error)
GetConsent retrieves consent by ID
func (*ConsentManager) GrantConsent ¶
func (cm *ConsentManager) GrantConsent(ctx context.Context, consent *LocalConsentRecord) error
GrantConsent grants consent for a data subject
func (*ConsentManager) WithdrawConsent ¶
func (cm *ConsentManager) WithdrawConsent(ctx context.Context, consentID string) error
WithdrawConsent withdraws consent for a data subject
type ConsentPolicy ¶
type ConsentPolicy struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
Purposes []string `json:"purposes"`
Required bool `json:"required"`
Granular bool `json:"granular"`
Expiry *time.Duration `json:"expiry,omitempty"`
Metadata map[string]any `json:"metadata"`
}
ConsentPolicy represents a consent policy
type ConsentPreferences ¶
type ConsentPreferences struct {
UserID string `json:"user_id"`
Preferences map[string]bool `json:"preferences"`
LastUpdated time.Time `json:"last_updated"`
Metadata map[string]any `json:"metadata"`
}
ConsentPreferences represents user consent preferences
type ConsentRecord ¶
type ConsentRecord struct {
ID string `json:"id"`
SubjectID string `json:"subject_id"`
Purpose string `json:"purpose"`
DataTypes []string `json:"data_types"`
ConsentGiven bool `json:"consent_given"`
ConsentDate time.Time `json:"consent_date"`
ExpiryDate *time.Time `json:"expiry_date,omitempty"`
WithdrawnDate *time.Time `json:"withdrawn_date,omitempty"`
LegalBasis string `json:"legal_basis"`
ProcessingScope string `json:"processing_scope"`
Metadata map[string]any `json:"metadata"`
}
ConsentRecord represents a GDPR consent record
type ConsistencyLevel ¶
type ConsistencyLevel string
ConsistencyLevel defines data consistency requirements
const ( ConsistencyLevelEventual ConsistencyLevel = "eventual" ConsistencyLevelStrong ConsistencyLevel = "strong" ConsistencyLevelWeak ConsistencyLevel = "weak" ConsistencyLevelSession ConsistencyLevel = "session" ConsistencyLevelCausal ConsistencyLevel = "causal" )
type ConsistencyTester ¶
type ConsistencyTester struct{}
func NewConsistencyTester ¶
func NewConsistencyTester(config *DistributedConfig) (*ConsistencyTester, error)
NewConsistencyTester creates a new consistency tester
type ConstraintType ¶
type ConstraintType string
ConstraintType defines types of blast radius constraints
const ( TimeConstraint ConstraintType = "time" PercentageConstraint ConstraintType = "percentage" CountConstraint ConstraintType = "count" DependencyConstraint ConstraintType = "dependency" )
type ContactInfo ¶
type ContactInfo struct {
Email string `json:"email"`
Phone string `json:"phone"`
Slack string `json:"slack"`
OnCall bool `json:"on_call"`
}
ContactInfo represents contact information
type ContinuousMonitor ¶
type ContinuousMonitor struct {
// contains filtered or unexported fields
}
ContinuousMonitor provides continuous compliance monitoring
func NewContinuousMonitor ¶
func NewContinuousMonitor() *ContinuousMonitor
NewContinuousMonitor creates a new continuous monitor
type Contract ¶
type Contract struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
Provider string `json:"provider"`
Consumer string `json:"consumer"`
Interactions []Interaction `json:"interactions"`
Metadata map[string]any `json:"metadata"`
}
Contract represents a service contract (for patterns.go)
type ContractInteraction ¶
type ContractInteraction struct {
ID string `json:"id"`
Description string `json:"description"`
Request *InteractionRequest `json:"request"`
Response *InteractionResponse `json:"response"`
State string `json:"state,omitempty"`
Metadata map[string]any `json:"metadata"`
}
ContractInteraction represents an interaction in a contract
type ContractRegistry ¶
type ContractRegistry struct {
// contains filtered or unexported fields
}
ContractRegistry manages service contracts
func NewContractRegistry ¶
func NewContractRegistry(config *ContractTestConfig) *ContractRegistry
NewContractRegistry creates a new contract registry
type ContractReportExporter ¶
type ContractReportExporter interface {
Export(ctx context.Context, report *TestReport, destination string) error
}
ContractReportExporter interface for exporting contract reports
type ContractReportExporterImpl ¶
type ContractReportExporterImpl struct {
// contains filtered or unexported fields
}
ContractReportExporterImpl struct implementation of ContractReportExporter
type ContractReportTemplate ¶
type ContractReportTemplate struct {
ID string `json:"id"`
Name string `json:"name"`
Type ReportType `json:"type"`
Format ReportFormat `json:"format"`
Description string `json:"description"`
Sections []ReportSection `json:"sections"`
Metadata map[string]any `json:"metadata"`
}
ContractReportTemplate represents a template for contract reports
type ContractStatus ¶
type ContractStatus string
ContractStatus represents the status of a contract
const ( ContractActive ContractStatus = "active" ContractInactive ContractStatus = "inactive" ContractDraft ContractStatus = "draft" ContractArchived ContractStatus = "archived" )
type ContractTest ¶
type ContractTest struct {
ID string `json:"id"`
Name string `json:"name"`
Provider string `json:"provider"`
Consumer string `json:"consumer"`
Contract *ServiceContract `json:"contract"`
Validator ContractValidator `json:"validator"`
Config *TestConfig `json:"config"`
Metadata map[string]any `json:"metadata"`
}
ContractTest represents a contract test
type ContractTestConfig ¶
type ContractTestConfig struct {
Environment string `json:"environment"`
Timeout time.Duration `json:"timeout"`
RetryAttempts int `json:"retry_attempts"`
RetryDelay time.Duration `json:"retry_delay"`
StrictMode bool `json:"strict_mode"`
Parallel bool `json:"parallel"`
MaxConcurrency int `json:"max_concurrency"`
}
ContractTestConfig configures contract testing framework
type ContractTestReporter ¶
type ContractTestReporter struct {
// contains filtered or unexported fields
}
ContractTestReporter generates contract test reports
func NewContractTestReporter ¶
func NewContractTestReporter() *ContractTestReporter
NewContractTestReporter creates a new contract test reporter
type ContractTestResult ¶
type ContractTestResult struct {
ContractID string `json:"contract_id"`
Provider string `json:"provider"`
Consumer string `json:"consumer"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
Status TestStatus `json:"status"`
Interactions []InteractionResult `json:"interactions"`
Summary *ContractTestSummary `json:"summary"`
Metadata map[string]any `json:"metadata"`
}
ContractTestResult represents the result of a contract test
type ContractTestRunner ¶
type ContractTestRunner struct {
// contains filtered or unexported fields
}
ContractTestRunner executes contract tests
func NewContractTestRunner ¶
func NewContractTestRunner(config *ContractTestConfig) *ContractTestRunner
NewContractTestRunner creates a new contract test runner
type ContractTestStatus ¶
type ContractTestStatus string
ContractTestStatus represents the status of contract tests
const ( ContractTestStatusPassed ContractTestStatus = "passed" ContractTestStatusFailed ContractTestStatus = "failed" )
type ContractTestSuite ¶
type ContractTestSuite struct {
// contains filtered or unexported fields
}
ContractTestSuite manages contract testing
func NewContractTestSuite ¶
func NewContractTestSuite() *ContractTestSuite
NewContractTestSuite creates a new contract test suite
func (*ContractTestSuite) AddContract ¶
func (c *ContractTestSuite) AddContract(contract *Contract)
AddContract adds a contract to the suite
func (*ContractTestSuite) CreateContractTest ¶
func (c *ContractTestSuite) CreateContractTest(contractName string, validator ContractValidator) (*ContractTest, error)
CreateContractTest creates a contract test
func (*ContractTestSuite) RunContractTests ¶
func (c *ContractTestSuite) RunContractTests() (map[string]ContractTestResult, error)
RunContractTests runs all contract tests in the suite
type ContractTestSummary ¶
type ContractTestSummary struct {
TotalInteractions int `json:"total_interactions"`
PassedInteractions int `json:"passed_interactions"`
FailedInteractions int `json:"failed_interactions"`
SuccessRate float64 `json:"success_rate"`
AverageResponseTime string `json:"average_response_time"`
}
ContractTestSummary provides a summary of contract test results
type ContractTestingConfig ¶
type ContractTestingConfig struct {
DefaultTimeout time.Duration `json:"default_timeout"`
MaxRetries int `json:"max_retries"`
ParallelExecution bool `json:"parallel_execution"`
ReportFormat string `json:"report_format"`
Environment map[string]any `json:"environment"`
}
ContractTestingConfig configures contract testing
type ContractTestingFramework ¶
type ContractTestingFramework struct {
// contains filtered or unexported fields
}
ContractTestingFramework provides contract testing capabilities
func NewContractTestingFramework ¶
func NewContractTestingFramework(config *ContractTestConfig) *ContractTestingFramework
NewContractTestingFramework creates a new contract testing framework
func (*ContractTestingFramework) CreateContractTest ¶
func (f *ContractTestingFramework) CreateContractTest(contract *ServiceContract, validator ContractValidator) (*ContractTest, error)
CreateContractTest creates a new contract test
func (*ContractTestingFramework) RunContractTest ¶
func (f *ContractTestingFramework) RunContractTest(ctx context.Context, test *ContractTest) (*ContractTestResult, error)
RunContractTest executes a contract test
func (*ContractTestingFramework) ValidateContract ¶
func (f *ContractTestingFramework) ValidateContract(ctx context.Context, contract *ServiceContract) (*ContractValidationResult, error)
ValidateContract validates a complete service contract (implementing ContractTestingFramework method)
type ContractValidationResult ¶
type ContractValidationResult struct {
ID string `json:"id"`
ContractID string `json:"contract_id"`
Status TestStatus `json:"status"`
Errors []string `json:"errors"`
Warnings []string `json:"warnings"`
Validations map[string]*InteractionValidation `json:"validations"`
Summary *ValidationSummary `json:"summary"`
Timestamp time.Time `json:"timestamp"`
Duration time.Duration `json:"duration"`
Metadata map[string]any `json:"metadata"`
}
ContractValidationResult represents contract validation results
type ContractValidator ¶
type ContractValidator interface {
ValidateContract(ctx context.Context, contract *ServiceContract) (*TestResult, error)
ValidateInteraction(ctx context.Context, interaction *ContractInteraction) (*InteractionResult, error)
}
ContractValidator defines the interface for validating contracts
type ControlCriteria ¶
type ControlCriteria struct {
ID string `json:"id"`
Description string `json:"description"`
Metrics map[string]string `json:"metrics"`
Thresholds map[string]float64 `json:"thresholds"`
}
ControlCriteria defines specific criteria for a control
type ControlEvidence ¶
type ControlEvidence struct {
SecurityControls []SecurityControl
AuditLogs []AuditLog
AccessControls []AccessControl
DataProtection []DataProtectionControl
}
ControlEvidence represents evidence for SOC2 controls
type ControlResult ¶
type ControlResult struct {
ControlID string `json:"control_id"`
Category any `json:"category"` // Can be SOC2Category, GDPRCategory, or SecurityCategory
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
Status ControlStatus `json:"status"`
TestResults map[string]*ComplianceTestResult `json:"test_results"`
Evidence []Evidence `json:"evidence"`
}
ControlResult represents the result of testing a control
type ControlStatus ¶
type ControlStatus string
ControlStatus represents the status of individual controls
const ( ControlPassing ControlStatus = "passing" ControlFailing ControlStatus = "failing" ControlNotTested ControlStatus = "not_tested" ControlException ControlStatus = "exception" )
type ControlTest ¶
type ControlTest struct {
ID string `json:"id"`
Type TestType `json:"type"`
Procedure string `json:"procedure"`
Frequency TestFrequency `json:"frequency"`
Automated bool `json:"automated"`
Parameters map[string]any `json:"parameters"`
Expected any `json:"expected"`
}
ControlTest defines how to test a control
type CoordinationMode ¶
type CoordinationMode string
CoordinationMode defines how experiments are coordinated
const ( CoordinationModeSequential CoordinationMode = "sequential" CoordinationModeParallel CoordinationMode = "parallel" CoordinationModePipelined CoordinationMode = "pipelined" CoordinationModeConditional CoordinationMode = "conditional" )
type CountryInfo ¶
type CountryInfo struct {
Code string `json:"code"`
Name string `json:"name"`
AdequacyDecision bool `json:"adequacy_decision"`
DecisionDate *time.Time `json:"decision_date,omitempty"`
Restrictions []string `json:"restrictions"`
Safeguards []string `json:"safeguards"`
Metadata map[string]any `json:"metadata"`
}
CountryInfo provides information about countries for transfers
type CriteriaType ¶
type CriteriaType string
CriteriaType defines types of success criteria
const ( TimeCriteria CriteriaType = "time" PerformanceCriteria CriteriaType = "performance" QualityCriteria CriteriaType = "quality" LearningCriteria CriteriaType = "learning" )
type CustomResourceDefinition ¶
type CustomResourceDefinition struct {
APIVersion string `json:"api_version"`
Kind string `json:"kind"`
Metadata map[string]any `json:"metadata"`
Spec *CRDSpec `json:"spec"`
Status *CRDStatus `json:"status"`
}
CustomResourceDefinition defines CRD specifications
type CustomRetentionPolicy ¶
type CustomRetentionPolicy struct {
Conditions []RetentionCondition `json:"conditions"`
Retention time.Duration `json:"retention"`
Actions []RetentionAction `json:"actions"`
}
CustomRetentionPolicy defines custom retention rules
type DashboardConfig ¶
type DashboardConfig struct {
Name string `json:"name"`
Type DashboardType `json:"type"`
Panels []*PanelConfig `json:"panels"`
Refresh time.Duration `json:"refresh"`
TimeRange *TimeRangeConfig `json:"time_range"`
Variables map[string]any `json:"variables"`
}
DashboardConfig defines dashboard configuration
type DashboardManager ¶
type DashboardManager struct{}
type DashboardType ¶
type DashboardType string
DashboardType defines dashboard types
const ( DashboardTypeGrafana DashboardType = "grafana" DashboardTypeKibana DashboardType = "kibana" DashboardTypeDatadog DashboardType = "datadog" DashboardTypeCustom DashboardType = "custom" )
type DataFixture ¶
type DataFixture struct {
Name string
Type string
Data any
Environment string
Dependencies []string
}
DataFixture represents a test data fixture
type DataFixtureManager ¶
type DataFixtureManager struct {
// contains filtered or unexported fields
}
DataFixtureManager manages test data fixtures across environments
func NewDataFixtureManager ¶
func NewDataFixtureManager() *DataFixtureManager
NewDataFixtureManager creates a new data fixture manager
func (*DataFixtureManager) AddFixture ¶
func (d *DataFixtureManager) AddFixture(envName string, fixture DataFixture)
AddFixture adds a fixture for a specific environment
func (*DataFixtureManager) CleanupForEnvironment ¶
func (d *DataFixtureManager) CleanupForEnvironment(env *TestEnvironment) error
CleanupForEnvironment cleans up fixtures for an environment
func (*DataFixtureManager) SetupForEnvironment ¶
func (d *DataFixtureManager) SetupForEnvironment(env *TestEnvironment) error
SetupForEnvironment sets up fixtures for an environment
type DataMapper ¶
type DataMapper struct {
// contains filtered or unexported fields
}
DataMapper maps and tracks personal data processing
func (*DataMapper) GetDataMappings ¶
func (dm *DataMapper) GetDataMappings(ctx context.Context) map[string]*DataMapping
GetDataMappings returns all data mappings
func (*DataMapper) MapData ¶
func (dm *DataMapper) MapData(ctx context.Context, mapping *DataMapping) error
MapData creates a new data mapping
type DataMapping ¶
type DataMapping struct {
ID string `json:"id"`
DataType PersonalDataType `json:"data_type"`
Source string `json:"source"`
Destination string `json:"destination"`
Purpose string `json:"purpose"`
LegalBasis string `json:"legal_basis"`
Retention time.Duration `json:"retention"`
Processors []string `json:"processors"`
Recipients []string `json:"recipients"`
Safeguards []string `json:"safeguards"`
Documented bool `json:"documented"`
LastUpdated time.Time `json:"last_updated"`
Metadata map[string]any `json:"metadata"`
}
DataMapping represents a data mapping entry
type DataProcessor ¶
type DataProcessor struct {
ID string `json:"id"`
Name string `json:"name"`
Type ProcessorType `json:"type"`
Location string `json:"location"`
Safeguards []string `json:"safeguards"`
Agreements []string `json:"agreements"`
Certified bool `json:"certified"`
LastAudited *time.Time `json:"last_audited,omitempty"`
Metadata map[string]any `json:"metadata"`
}
DataProcessor represents a data processor
type DataProtectionControl ¶
type DataProtectionControl struct {
ControlID string
DataType string
Protection string
EncryptionLevel string
Status string
}
DataProtectionControl represents a data protection control
type DataTransfer ¶
type DataTransfer struct {
ID string `json:"id"`
Source string `json:"source"`
Destination string `json:"destination"`
DataTypes []PersonalDataType `json:"data_types"`
Mechanism TransferMechanism `json:"mechanism"`
LegalBasis string `json:"legal_basis"`
Safeguards []string `json:"safeguards"`
Timestamp time.Time `json:"timestamp"`
Status string `json:"status"`
Metadata map[string]any `json:"metadata"`
}
DataTransfer represents a data transfer record
type DatabaseClient ¶
type DatabaseClient struct {
// contains filtered or unexported fields
}
DatabaseClient handles database performance tests
type DatabaseValidator ¶
type DatabaseValidator struct{}
DatabaseValidator validates database connectivity and state
func (*DatabaseValidator) Name ¶
func (d *DatabaseValidator) Name() string
func (*DatabaseValidator) Validate ¶
func (d *DatabaseValidator) Validate(env *TestEnvironment) error
type DependencyType ¶
type DependencyType string
DependencyType defines dependency types
const ( DependencyTypeService DependencyType = "service" DependencyTypeDatabase DependencyType = "database" DependencyTypeNetwork DependencyType = "network" DependencyTypeExperiment DependencyType = "experiment" DependencyTypeResource DependencyType = "resource" )
type DistributedActionType ¶
type DistributedActionType string
DistributedActionType defines action types
const ( DistributedActionTypeInjectFault DistributedActionType = "inject_fault" DistributedActionTypeStopService DistributedActionType = "stop_service" DistributedActionTypeStartService DistributedActionType = "start_service" DistributedActionTypePartitionNetwork DistributedActionType = "partition_network" DistributedActionTypeRestoreNetwork DistributedActionType = "restore_network" DistributedActionTypeCorruptData DistributedActionType = "corrupt_data" DistributedActionTypeValidateData DistributedActionType = "validate_data" DistributedActionTypeCollectMetrics DistributedActionType = "collect_metrics" )
type DistributedAlertConfig ¶
type DistributedAlertConfig struct {
Name string `json:"name"`
Condition string `json:"condition"`
Threshold float64 `json:"threshold"`
Duration time.Duration `json:"duration"`
Severity DistributedAlertSeverity `json:"severity"`
Actions []string `json:"actions"`
Suppression time.Duration `json:"suppression"`
}
DistributedAlertConfig defines alert configuration
type DistributedAlertSeverity ¶
type DistributedAlertSeverity string
DistributedAlertSeverity defines alert severity levels
const ( DistributedAlertSeverityInfo DistributedAlertSeverity = "info" DistributedAlertSeverityWarning DistributedAlertSeverity = "warning" DistributedAlertSeverityError DistributedAlertSeverity = "error" DistributedAlertSeverityCritical DistributedAlertSeverity = "critical" )
type DistributedComplianceResults ¶
type DistributedComplianceResults struct {
Overall DistributedComplianceStatus `json:"overall"`
ByFramework map[string]DistributedComplianceStatus `json:"by_framework"`
Violations []*DistributedComplianceViolation `json:"violations"`
Score float64 `json:"score"`
}
DistributedComplianceResults defines compliance results
type DistributedComplianceStatus ¶
type DistributedComplianceStatus string
DistributedComplianceStatus defines compliance status
const ( DistributedComplianceStatusCompliant DistributedComplianceStatus = "compliant" DistributedComplianceStatusNonCompliant DistributedComplianceStatus = "non_compliant" DistributedComplianceStatusPartial DistributedComplianceStatus = "partial" )
type DistributedComplianceViolation ¶
type DistributedComplianceViolation struct {
Framework string `json:"framework"`
Rule string `json:"rule"`
Severity ViolationSeverity `json:"severity"`
Description string `json:"description"`
Evidence map[string]any `json:"evidence"`
Remediation string `json:"remediation"`
}
DistributedComplianceViolation defines compliance violation
type DistributedConditionType ¶
type DistributedConditionType string
DistributedConditionType defines condition types
const ( DistributedConditionTypeMetric DistributedConditionType = "metric" DistributedConditionTypeHealthCheck DistributedConditionType = "health_check" DistributedConditionTypeTime DistributedConditionType = "time" DistributedConditionTypeEvent DistributedConditionType = "event" DistributedConditionTypeCustom DistributedConditionType = "custom" )
type DistributedConfig ¶
type DistributedConfig struct {
Regions []*RegionConfig `json:"regions"`
CoordinationMode CoordinationMode `json:"coordination_mode"`
ConsistencyLevel ConsistencyLevel `json:"consistency_level"`
ReplicationMode ReplicationMode `json:"replication_mode"`
NetworkTopology *NetworkTopology `json:"network_topology"`
FailoverPolicy *FailoverPolicy `json:"failover_policy"`
LoadBalancing *LoadBalancingConfig `json:"load_balancing"`
Monitoring *MonitoringConfig `json:"monitoring"`
Security *DistributedSecurityConfig `json:"security"`
Performance *PerformanceConfig `json:"performance"`
}
DistributedConfig configures distributed chaos experiments
type DistributedConstraintType ¶
type DistributedConstraintType string
DistributedConstraintType defines constraint types
const ( DistributedConstraintTypeTime DistributedConstraintType = "time" DistributedConstraintTypeResource DistributedConstraintType = "resource" DistributedConstraintTypeAvailability DistributedConstraintType = "availability" DistributedConstraintTypePerformance DistributedConstraintType = "performance" DistributedConstraintTypeSecurity DistributedConstraintType = "security" DistributedConstraintTypeCompliance DistributedConstraintType = "compliance" )
type DistributedEventBus ¶
type DistributedEventBus struct{}
func NewDistributedEventBus ¶
func NewDistributedEventBus(config *DistributedConfig) (*DistributedEventBus, error)
NewDistributedEventBus creates a new distributed event bus
type DistributedExperiment ¶
type DistributedExperiment struct {
ID string `json:"id"`
Name string `json:"name"`
Type DistributedExperimentType `json:"type"`
Regions []string `json:"regions"`
Coordination CoordinationMode `json:"coordination"`
Phases []*ExperimentPhase `json:"phases"`
Dependencies []*ExperimentDependency `json:"dependencies"`
Constraints []*ExperimentConstraint `json:"constraints"`
Monitoring *ExperimentMonitoring `json:"monitoring"`
Status ExperimentStatus `json:"status"`
StartTime time.Time `json:"start_time"`
EndTime *time.Time `json:"end_time,omitempty"`
Results *DistributedExperimentResults `json:"results,omitempty"`
Metadata map[string]any `json:"metadata"`
}
DistributedExperiment defines a multi-region chaos experiment
type DistributedExperimentResults ¶
type DistributedExperimentResults struct {
Summary *ResultSummary `json:"summary"`
Metrics map[string]any `json:"metrics"`
Observations []*DistributedObservation `json:"observations"`
Failures []*DistributedFailure `json:"failures"`
Performance *PerformanceResults `json:"performance"`
Compliance *DistributedComplianceResults `json:"compliance"`
Recommendations []*Recommendation `json:"recommendations"`
}
DistributedExperimentResults defines experiment results
type DistributedExperimentSpec ¶
type DistributedExperimentSpec struct {
Name string `json:"name"`
Type DistributedExperimentType `json:"type"`
Regions []string `json:"regions"`
Coordination CoordinationMode `json:"coordination"`
Phases []*ExperimentPhase `json:"phases"`
Dependencies []*ExperimentDependency `json:"dependencies"`
Constraints []*ExperimentConstraint `json:"constraints"`
Monitoring *ExperimentMonitoring `json:"monitoring"`
Metadata map[string]any `json:"metadata"`
}
DistributedExperimentSpec defines experiment specification
type DistributedExperimentType ¶
type DistributedExperimentType string
DistributedExperimentType defines experiment types
const ( ExperimentTypeNetworkPartition DistributedExperimentType = "network_partition" ExperimentTypeRegionFailure DistributedExperimentType = "region_failure" ExperimentTypeConsistencyTest DistributedExperimentType = "consistency_test" ExperimentTypeReplicationFailure DistributedExperimentType = "replication_failure" ExperimentTypeLoadBalancerFailure DistributedExperimentType = "load_balancer_failure" ExperimentTypeDataCorruption DistributedExperimentType = "data_corruption" ExperimentTypeLatencyInjection DistributedExperimentType = "latency_injection" ExperimentTypeBandwidthLimitation DistributedExperimentType = "bandwidth_limitation" )
type DistributedFailure ¶
type DistributedFailure struct {
Timestamp time.Time `json:"timestamp"`
Type DistributedFailureType `json:"type"`
Component string `json:"component"`
Message string `json:"message"`
Cause string `json:"cause"`
Impact FailureImpact `json:"impact"`
Resolution string `json:"resolution"`
Data map[string]any `json:"data"`
}
DistributedFailure defines distributed failure
type DistributedFailureType ¶
type DistributedFailureType string
DistributedFailureType defines failure types
const ( DistributedFailureTypeNetwork DistributedFailureType = "network" DistributedFailureTypeService DistributedFailureType = "service" DistributedFailureTypeDatabase DistributedFailureType = "database" DistributedFailureTypeInfrastructure DistributedFailureType = "infrastructure" DistributedFailureTypeApplication DistributedFailureType = "application" DistributedFailureTypeConfiguration DistributedFailureType = "configuration" )
type DistributedFaultInjector ¶
type DistributedFaultInjector struct{}
func NewDistributedFaultInjector ¶
func NewDistributedFaultInjector(config *DistributedConfig) (*DistributedFaultInjector, error)
NewDistributedFaultInjector creates a new distributed fault injector
type DistributedHealthCheck ¶
type DistributedHealthCheck struct {
Name string `json:"name"`
Type HealthCheckType `json:"type"`
Endpoint string `json:"endpoint"`
Interval time.Duration `json:"interval"`
Timeout time.Duration `json:"timeout"`
Retries int `json:"retries"`
Expected any `json:"expected"`
Threshold float64 `json:"threshold"`
}
DistributedHealthCheck defines health check configuration
type DistributedMetricConfig ¶
type DistributedMetricConfig struct {
Name string `json:"name"`
Type DistributedMetricType `json:"type"`
Source string `json:"source"`
Query string `json:"query"`
Interval time.Duration `json:"interval"`
Aggregation string `json:"aggregation"`
Labels map[string]string `json:"labels"`
}
DistributedMetricConfig defines metric collection configuration
type DistributedMetricType ¶
type DistributedMetricType string
DistributedMetricType defines metric types
const ( DistributedMetricTypeCounter DistributedMetricType = "counter" DistributedMetricTypeGauge DistributedMetricType = "gauge" DistributedMetricTypeHistogram DistributedMetricType = "histogram" DistributedMetricTypeSummary DistributedMetricType = "summary" )
type DistributedMonitoringSystem ¶
type DistributedMonitoringSystem struct{}
func NewDistributedMonitoringSystem ¶
func NewDistributedMonitoringSystem(config *DistributedConfig) (*DistributedMonitoringSystem, error)
NewDistributedMonitoringSystem creates a new distributed monitoring system
type DistributedNetworkPartition ¶
type DistributedNetworkPartition struct {
Name string `json:"name"`
Regions []string `json:"regions"`
Duration time.Duration `json:"duration"`
Type PartitionType `json:"type"`
Probability float64 `json:"probability"`
Recovery *DistributedRecoveryConfig `json:"recovery"`
}
DistributedNetworkPartition defines network partition configuration
type DistributedObservation ¶
type DistributedObservation struct {
Timestamp time.Time `json:"timestamp"`
Type DistributedObservationType `json:"type"`
Source string `json:"source"`
Message string `json:"message"`
Data map[string]any `json:"data"`
Severity DistributedObservationSeverity `json:"severity"`
}
DistributedObservation defines distributed observation
type DistributedObservationSeverity ¶
type DistributedObservationSeverity string
DistributedObservationSeverity defines observation severity
const ( DistributedObservationSeverityInfo DistributedObservationSeverity = "info" DistributedObservationSeverityWarning DistributedObservationSeverity = "warning" DistributedObservationSeverityError DistributedObservationSeverity = "error" DistributedObservationSeverityCritical DistributedObservationSeverity = "critical" )
type DistributedObservationType ¶
type DistributedObservationType string
DistributedObservationType defines observation types
const ( DistributedObservationTypeMetric DistributedObservationType = "metric" DistributedObservationTypeEvent DistributedObservationType = "event" DistributedObservationTypeLog DistributedObservationType = "log" DistributedObservationTypeTrace DistributedObservationType = "trace" )
type DistributedRecoveryConfig ¶
type DistributedRecoveryConfig struct {
Mode DistributedRecoveryMode `json:"mode"`
Timeout time.Duration `json:"timeout"`
RetryCount int `json:"retry_count"`
BackoffMode BackoffMode `json:"backoff_mode"`
Validation bool `json:"validation"`
}
DistributedRecoveryConfig defines partition recovery settings
type DistributedRecoveryMode ¶
type DistributedRecoveryMode string
DistributedRecoveryMode defines recovery modes
const ( DistributedRecoveryModeAutomatic DistributedRecoveryMode = "automatic" DistributedRecoveryModeManual DistributedRecoveryMode = "manual" DistributedRecoveryModeGradual DistributedRecoveryMode = "gradual" DistributedRecoveryModeImmediate DistributedRecoveryMode = "immediate" )
type DistributedSecurityConfig ¶
type DistributedSecurityConfig struct{}
type EnterpriseTestApp ¶
EnterpriseTestApp wraps TestApp with environment support
func (*EnterpriseTestApp) WithEnvironment ¶
func (app *EnterpriseTestApp) WithEnvironment(env *TestEnvironment) *EnterpriseTestApp
WithEnvironment creates a new EnterpriseTestApp with environment configuration
type EnterpriseTestPatterns ¶
type EnterpriseTestPatterns struct {
// contains filtered or unexported fields
}
EnterpriseTestPatterns provides enterprise-grade testing patterns
func NewEnterpriseTestPatterns ¶
func NewEnterpriseTestPatterns() *EnterpriseTestPatterns
NewEnterpriseTestPatterns creates a new enterprise test patterns instance
func (*EnterpriseTestPatterns) AddEnvironment ¶
func (e *EnterpriseTestPatterns) AddEnvironment(name string, config EnvironmentConfig)
AddEnvironment adds a test environment
func (*EnterpriseTestPatterns) CreateAPIContractTest ¶
func (e *EnterpriseTestPatterns) CreateAPIContractTest(apiName, version string, interactions []Interaction) (*Contract, error)
CreateAPIContractTest creates an API contract test
func (*EnterpriseTestPatterns) CreateChaosScenario ¶
func (e *EnterpriseTestPatterns) CreateChaosScenario(scenarioType string, config map[string]any) error
CreateChaosScenario creates a chaos engineering scenario
func (*EnterpriseTestPatterns) CreateMultiEnvironmentTest ¶
func (e *EnterpriseTestPatterns) CreateMultiEnvironmentTest(name string, testFunc func(env *TestEnvironment) error) error
CreateMultiEnvironmentTest creates a test that runs across multiple environments
func (*EnterpriseTestPatterns) CreatePerformanceTest ¶
func (e *EnterpriseTestPatterns) CreatePerformanceTest(name string, testFunc func() error) TestCase
CreatePerformanceTest creates a performance test
func (*EnterpriseTestPatterns) GenerateReport ¶
func (e *EnterpriseTestPatterns) GenerateReport(suiteName string, results []TestResult) TestReport
GenerateReport generates a comprehensive test report
func (*EnterpriseTestPatterns) GetEnvironment ¶
func (e *EnterpriseTestPatterns) GetEnvironment(name string) (*TestEnvironment, error)
GetEnvironment gets a test environment
func (*EnterpriseTestPatterns) RunChaosTests ¶
func (e *EnterpriseTestPatterns) RunChaosTests(ctx context.Context) error
RunChaosTests runs chaos engineering tests
func (*EnterpriseTestPatterns) RunContractTests ¶
func (e *EnterpriseTestPatterns) RunContractTests(ctx context.Context) (map[string]ContractTestResult, error)
RunContractTests runs contract tests
func (*EnterpriseTestPatterns) RunTestSuite ¶
func (e *EnterpriseTestPatterns) RunTestSuite(ctx context.Context, suite TestSuite) ([]TestResult, error)
RunTestSuite runs a complete test suite
func (*EnterpriseTestPatterns) ValidatePerformance ¶
func (e *EnterpriseTestPatterns) ValidatePerformance(ctx context.Context, testCase TestCase, envName string) error
ValidatePerformance validates performance across environments
type EnterpriseTestSuite ¶
type EnterpriseTestSuite struct {
// contains filtered or unexported fields
}
EnterpriseTestSuite manages testing across multiple environments
func NewEnterpriseTestSuite ¶
func NewEnterpriseTestSuite() *EnterpriseTestSuite
NewEnterpriseTestSuite creates a new enterprise test suite
func (*EnterpriseTestSuite) AddEnvironment ¶
func (e *EnterpriseTestSuite) AddEnvironment(name string, config EnvironmentConfig) *TestEnvironment
AddEnvironment adds a new test environment
func (*EnterpriseTestSuite) GetEnvironment ¶
func (e *EnterpriseTestSuite) GetEnvironment(name string) (*TestEnvironment, error)
GetEnvironment retrieves an environment by name
func (*EnterpriseTestSuite) GetEnvironmentMetrics ¶
func (e *EnterpriseTestSuite) GetEnvironmentMetrics(envName string) (EnvironmentMetrics, error)
GetEnvironmentMetrics returns metrics for an environment
func (*EnterpriseTestSuite) ResetEnvironment ¶
func (e *EnterpriseTestSuite) ResetEnvironment(envName string) error
ResetEnvironment resets an environment to its initial state
func (*EnterpriseTestSuite) SwitchEnvironment ¶
func (e *EnterpriseTestSuite) SwitchEnvironment(envName string) error
SwitchEnvironment switches the test suite to use a different environment
func (*EnterpriseTestSuite) TestAcrossEnvironments ¶
func (e *EnterpriseTestSuite) TestAcrossEnvironments(testCase TestCase) error
TestAcrossEnvironments runs a test across multiple environments
type EnvironmentConfig ¶
type EnvironmentConfig struct {
// Database configuration
DatabaseURL string
DatabaseType string
// AWS configuration
AWSRegion string
AWSProfile string
// Service endpoints
ServiceEndpoints map[string]string
// Feature flags
FeatureFlags map[string]bool
// Performance settings
Timeouts map[string]time.Duration
RateLimits map[string]int
// Security settings
AuthEnabled bool
TLSEnabled bool
// Custom configuration
Custom map[string]any
}
EnvironmentConfig holds environment-specific configuration
type EnvironmentMetrics ¶
type EnvironmentMetrics struct {
RequestCount int64
ErrorCount int64
AverageLatency time.Duration
ResourceUsage map[string]float64
}
EnvironmentMetrics tracks environment performance metrics
type EnvironmentState ¶
type EnvironmentState struct {
Status EnvironmentStatus
LastUpdated time.Time
ActiveTests int
Resources map[string]ResourceState
Metrics EnvironmentMetrics
}
EnvironmentState tracks the current state of an environment
type EnvironmentStatus ¶
type EnvironmentStatus string
EnvironmentStatus represents the status of an environment
const ( EnvironmentStatusReady EnvironmentStatus = "ready" EnvironmentStatusBusy EnvironmentStatus = "busy" EnvironmentStatusMaintenance EnvironmentStatus = "maintenance" EnvironmentStatusError EnvironmentStatus = "error" )
type EnvironmentValidator ¶
type EnvironmentValidator interface {
Validate(env *TestEnvironment) error
Name() string
}
EnvironmentValidator validates environment state
type ErrorFaultConfig ¶
type ErrorFaultConfig struct {
ErrorRate float64 `json:"error_rate"`
ErrorType string `json:"error_type"`
Target string `json:"target"`
Duration time.Duration `json:"duration"`
}
ErrorFaultConfig represents an error injection fault configuration
type ErrorRateResults ¶
type ErrorRateResults struct {
Overall float64 `json:"overall"`
ByType map[string]float64 `json:"by_type"`
ByRegion map[string]float64 `json:"by_region"`
ByService map[string]float64 `json:"by_service"`
Trend []float64 `json:"trend"`
}
ErrorRateResults defines error rate metrics
type EventFilter ¶
type EventFilter struct {
EventTypes []ChaosEventType `json:"event_types"`
Sources []string `json:"sources"`
Targets []string `json:"targets"`
Severities []EventSeverity `json:"severities"`
Tags []string `json:"tags"`
Metadata map[string]string `json:"metadata"`
}
EventFilter defines event filtering criteria
type EventProcessor ¶
type EventProcessor struct{}
type EventRecorder ¶
type EventRecorder any
type EventSeverity ¶
type EventSeverity string
EventSeverity defines event severity levels
const ( EventSeverityInfo EventSeverity = "info" EventSeverityWarning EventSeverity = "warning" EventSeverityError EventSeverity = "error" EventSeverityCritical EventSeverity = "critical" )
type EventSubscriber ¶
type EventSubscriber interface {
HandleEvent(ctx context.Context, event *ChaosEvent) error
GetSubscriptionFilters() []EventFilter
}
EventSubscriber interface for event subscribers
type EventWatcher ¶
type EventWatcher struct{}
type Evidence ¶
type Evidence struct {
Type EvidenceType `json:"type"`
Description string `json:"description"`
Timestamp time.Time `json:"timestamp"`
Location string `json:"location"`
Hash string `json:"hash"`
Metadata map[string]any `json:"metadata"`
}
Evidence represents evidence collected for compliance
type EvidenceEncryption ¶
type EvidenceEncryption struct {
Algorithm string `json:"algorithm"`
KeyID string `json:"key_id"`
Enabled bool `json:"enabled"`
}
EvidenceEncryption handles evidence encryption
type EvidenceFilter ¶
type EvidenceFilter struct {
Framework string `json:"framework"`
ControlID string `json:"control_id"`
Type EvidenceType `json:"type"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Tags []string `json:"tags"`
Metadata map[string]any `json:"metadata"`
}
EvidenceFilter defines filters for evidence queries
type EvidenceIndexer ¶
type EvidenceIndexer interface {
IndexEvidence(ctx context.Context, evidence *Evidence) error
SearchEvidence(ctx context.Context, query string) ([]*Evidence, error)
GetEvidence(ctx context.Context, id string) (*Evidence, error)
}
EvidenceIndexer defines the interface for indexing evidence
type EvidenceQuery ¶
type EvidenceQuery struct {
Text string `json:"text"`
Filters EvidenceFilter `json:"filters"`
SortBy string `json:"sort_by"`
SortOrder string `json:"sort_order"`
Limit int `json:"limit"`
Offset int `json:"offset"`
}
EvidenceQuery defines a search query for evidence
type EvidenceRequirement ¶
type EvidenceRequirement struct {
Type EvidenceType `json:"type"`
Description string `json:"description"`
Retention time.Duration `json:"retention"`
Location string `json:"location"`
Automated bool `json:"automated"`
}
EvidenceRequirement defines what evidence is needed for a control
type EvidenceStorage ¶
type EvidenceStorage interface {
Store(ctx context.Context, evidence *Evidence) error
Retrieve(ctx context.Context, id string) (*Evidence, error)
List(ctx context.Context, filter EvidenceFilter) ([]*Evidence, error)
Delete(ctx context.Context, id string) error
}
EvidenceStorage defines evidence storage interface
type EvidenceStore ¶
type EvidenceStore struct {
// contains filtered or unexported fields
}
EvidenceStore stores and manages compliance evidence
func NewEvidenceStore ¶
func NewEvidenceStore() *EvidenceStore
NewEvidenceStore creates a new evidence store
func (*EvidenceStore) StoreReport ¶
func (e *EvidenceStore) StoreReport(ctx context.Context, report *ComplianceReport) error
StoreReport stores a compliance report as evidence
type EvidenceType ¶
type EvidenceType string
EvidenceType represents different types of evidence
const ( LogEvidence EvidenceType = "log" ScreenshotEvidence EvidenceType = "screenshot" DocumentEvidence EvidenceType = "document" ConfigEvidence EvidenceType = "configuration" MetricEvidence EvidenceType = "metric" TestResultEvidence EvidenceType = "test_result" ConsentEvidence EvidenceType = "consent" ProcessingEvidence EvidenceType = "processing" TransferEvidence EvidenceType = "transfer" BreachEvidence EvidenceType = "breach" )
type ExperimentAnalysis ¶
type ExperimentAnalysis struct {
ResilienceScore float64 `json:"resilience_score"`
Insights []string `json:"insights"`
Recommendations []string `json:"recommendations"`
Trends map[string]any `json:"trends"`
Comparisons map[string]any `json:"comparisons"`
}
ExperimentAnalysis represents analysis of experiment results
type ExperimentConstraint ¶
type ExperimentConstraint struct {
Name string `json:"name"`
Type DistributedConstraintType `json:"type"`
Value any `json:"value"`
Operator string `json:"operator"`
Scope string `json:"scope"`
Enforcement string `json:"enforcement"`
}
ExperimentConstraint defines experiment constraints
type ExperimentDependency ¶
type ExperimentDependency struct {
Name string `json:"name"`
Type DependencyType `json:"type"`
Target string `json:"target"`
Condition string `json:"condition"`
Timeout time.Duration `json:"timeout"`
Required bool `json:"required"`
}
ExperimentDependency defines experiment dependencies
type ExperimentExecutor ¶
type ExperimentExecutor struct {
// contains filtered or unexported fields
}
ExperimentExecutor executes chaos experiments
func NewExperimentExecutor ¶
func NewExperimentExecutor(config *ChaosEngineeringConfig) *ExperimentExecutor
NewExperimentExecutor creates a new experiment executor
type ExperimentFailure ¶
type ExperimentFailure struct {
ID string `json:"id"`
Type string `json:"type"`
Message string `json:"message"`
Timestamp time.Time `json:"timestamp"`
Severity Severity `json:"severity"`
Component string `json:"component"`
Metadata map[string]any `json:"metadata"`
}
ExperimentFailure represents a failure during chaos experiments
type ExperimentMonitoring ¶
type ExperimentMonitoring struct {
Metrics []*DistributedMetricConfig `json:"metrics"`
Alerts []*DistributedAlertConfig `json:"alerts"`
Dashboards []*DashboardConfig `json:"dashboards"`
Logs *LogConfig `json:"logs"`
Traces *TraceConfig `json:"traces"`
Sampling *SamplingConfig `json:"sampling"`
}
ExperimentMonitoring defines experiment monitoring configuration
type ExperimentPhase ¶
type ExperimentPhase struct {
Name string `json:"name"`
Type PhaseType `json:"type"`
Duration time.Duration `json:"duration"`
Actions []*PhaseAction `json:"actions"`
Conditions []*PhaseCondition `json:"conditions"`
Parallel bool `json:"parallel"`
Timeout time.Duration `json:"timeout"`
Rollback *RollbackConfig `json:"rollback,omitempty"`
Metadata map[string]any `json:"metadata"`
}
ExperimentPhase defines experiment execution phase
type ExperimentReport ¶
type ExperimentReport struct {
ID string `json:"id"`
ExperimentID string `json:"experiment_id"`
Type ReportType `json:"type"`
Format ReportFormat `json:"format"`
Results *ExperimentResults `json:"results"`
Analysis *ExperimentAnalysis `json:"analysis"`
Timestamp time.Time `json:"timestamp"`
Metadata map[string]any `json:"metadata"`
}
ExperimentReport represents a chaos experiment report
type ExperimentResults ¶
type ExperimentResults struct {
ExperimentID string `json:"experiment_id"`
Status ExperimentStatus `json:"status"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
HypothesisValid bool `json:"hypothesis_valid"`
Observations []Observation `json:"observations"`
Failures []ExperimentFailure `json:"failures"`
Recovery *RecoveryResults `json:"recovery,omitempty"`
Metrics map[string]any `json:"metrics"`
Summary string `json:"summary"`
Recommendations []string `json:"recommendations"`
Metadata map[string]any `json:"metadata"`
}
ExperimentResults represents the results of a chaos experiment
type ExperimentStatus ¶
type ExperimentStatus string
ExperimentStatus represents the status of a chaos experiment
const ( ExperimentPending ExperimentStatus = "pending" ExperimentRunning ExperimentStatus = "running" ExperimentCompleted ExperimentStatus = "completed" ExperimentFailed ExperimentStatus = "failed" ExperimentAborted ExperimentStatus = "aborted" )
type ExperimentStatusInfo ¶
type ExperimentStatusInfo struct {
ExperimentID string `json:"experiment_id"`
Status ExperimentStatus `json:"status"`
Progress float64 `json:"progress"`
LastUpdated time.Time `json:"last_updated"`
Metadata map[string]any `json:"metadata"`
}
ExperimentStatusInfo represents the status information of a chaos experiment
type ExperimentTarget ¶
type ExperimentTarget struct {
Type string `json:"type"`
Name string `json:"name"`
Identifier string `json:"identifier"`
Scope TargetScope `json:"scope"`
Namespace string `json:"namespace,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Selector string `json:"selector,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
ExperimentTarget represents a target for chaos experiments
type ExportDestination ¶
ExportDestination represents an export destination
type ExportFormat ¶
type ExportFormat = ReportFormat
ExportFormat is an alias for ReportFormat for export contexts
type FailoverMode ¶
type FailoverMode string
FailoverMode defines failover modes
const ( FailoverModeActive FailoverMode = "active" FailoverModePassive FailoverMode = "passive" FailoverModeHotStandby FailoverMode = "hot_standby" FailoverModeColdStandby FailoverMode = "cold_standby" )
type FailoverPolicy ¶
type FailoverPolicy struct {
Mode FailoverMode `json:"mode"`
Threshold *FailoverThreshold `json:"threshold"`
Priority []string `json:"priority"`
AutoFailback bool `json:"auto_failback"`
FailbackDelay time.Duration `json:"failback_delay"`
HealthChecks []*DistributedHealthCheck `json:"health_checks"`
Notifications []*Notification `json:"notifications"`
}
FailoverPolicy defines failover behavior
type FailoverThreshold ¶
type FailoverThreshold struct {
ErrorRate float64 `json:"error_rate"`
ResponseTime time.Duration `json:"response_time"`
Availability float64 `json:"availability"`
ConsecutiveFailures int `json:"consecutive_failures"`
TimeWindow time.Duration `json:"time_window"`
}
FailoverThreshold defines failover trigger conditions
type FailureImpact ¶
type FailureImpact string
FailureImpact defines failure impact levels
const ( FailureImpactLow FailureImpact = "low" FailureImpactMedium FailureImpact = "medium" FailureImpactHigh FailureImpact = "high" FailureImpactCritical FailureImpact = "critical" )
type FaultDefinition ¶
type FaultDefinition struct {
ID string `json:"id"`
Type FaultType `json:"type"`
Target string `json:"target"`
Severity Severity `json:"severity"`
Parameters map[string]any `json:"parameters"`
Duration time.Duration `json:"duration"`
Probability float64 `json:"probability"`
Enabled bool `json:"enabled"`
Recovery *RecoveryConfig `json:"recovery,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
FaultDefinition defines a fault injection configuration
type FaultImpact ¶
type FaultImpact struct {
AffectedRequests int64 `json:"affected_requests"`
ErrorsIntroduced int64 `json:"errors_introduced"`
LatencyAdded time.Duration `json:"latency_added"`
Metrics map[string]any `json:"metrics"`
LastUpdated time.Time `json:"last_updated"`
}
FaultImpact tracks the impact of fault injection
type FaultInjector ¶
type FaultInjector interface {
InjectFault(ctx context.Context, fault *FaultDefinition) error
RemoveFault(ctx context.Context, faultID string) error
GetStatus(ctx context.Context, faultID string) (*FaultStatus, error)
}
FaultInjector interface for fault injection
type FaultState ¶
type FaultState string
FaultState represents the state of a fault injection
const ( FaultPending FaultState = "pending" FaultActive FaultState = "active" FaultCompleted FaultState = "completed" FaultFailed FaultState = "failed" FaultAborted FaultState = "aborted" )
type FaultStatus ¶
type FaultStatus struct {
Active bool `json:"active"`
StartTime time.Time `json:"start_time"`
Duration time.Duration `json:"duration"`
Impact map[string]any `json:"impact"`
Metadata map[string]any `json:"metadata"`
}
FaultStatus represents the status of a fault injection
type FaultType ¶
type FaultType string
FaultType represents different types of faults that can be injected
const ( LatencyFault FaultType = "latency" NetworkPartition FaultType = "network_partition" TimeoutFault FaultType = "timeout" ErrorFault FaultType = "error" ResourceExhaustion FaultType = "resource_exhaustion" CPUStressFault FaultType = "cpu_stress" MemoryStressFault FaultType = "memory_stress" DiskStressFault FaultType = "disk_stress" PodKillFault FaultType = "pod_kill" ContainerKillFault FaultType = "container_kill" )
type FileEvidenceStorage ¶
type FileEvidenceStorage struct {
// contains filtered or unexported fields
}
FileEvidenceStorage implements EvidenceStorage interface for file-based storage
func NewFileEvidenceStorage ¶
func NewFileEvidenceStorage(basePath string, indexer EvidenceIndexer) *FileEvidenceStorage
NewFileEvidenceStorage creates a new file-based evidence storage
func (*FileEvidenceStorage) Delete ¶
func (f *FileEvidenceStorage) Delete(ctx context.Context, id string) error
Delete implements EvidenceStorage.Delete
func (*FileEvidenceStorage) List ¶
func (f *FileEvidenceStorage) List(ctx context.Context, filter EvidenceFilter) ([]*Evidence, error)
List implements EvidenceStorage.List
type FrameworkMetrics ¶
type FrameworkMetrics struct {
Framework string `json:"framework"`
TotalControls int64 `json:"total_controls"`
PassingControls int64 `json:"passing_controls"`
FailingControls int64 `json:"failing_controls"`
ComplianceScore float64 `json:"compliance_score"`
LastAssessment time.Time `json:"last_assessment"`
}
FrameworkMetrics tracks metrics for a specific framework
type GDPRArticle ¶
type GDPRArticle struct {
Number string `json:"number"`
Title string `json:"title"`
Category GDPRCategory `json:"category"`
Description string `json:"description"`
Tests []GDPRTest `json:"tests"`
Evidence []EvidenceRequirement `json:"evidence"`
Metadata map[string]any `json:"metadata"`
}
GDPRArticle represents a GDPR article for testing
type GDPRCategory ¶
type GDPRCategory string
GDPRCategory represents GDPR compliance categories
const ( DataProtectionCategory GDPRCategory = "data_protection" ConsentManagementCategory GDPRCategory = "consent_management" DataSubjectRightsCategory GDPRCategory = "data_subject_rights" DataProcessingCategory GDPRCategory = "data_processing" DataTransferCategory GDPRCategory = "data_transfer" BreachNotificationCategory GDPRCategory = "breach_notification" PrivacyByDesignCategory GDPRCategory = "privacy_by_design" )
const (
GDPRGovernanceCategory GDPRCategory = "gdpr_governance"
)
GDPR governance category constant for use in tests
type GDPRCompliance ¶
type GDPRCompliance struct {
// contains filtered or unexported fields
}
GDPRCompliance provides GDPR compliance testing
func NewGDPRCompliance ¶
func NewGDPRCompliance() *GDPRCompliance
NewGDPRCompliance creates a new GDPR compliance tester
func (*GDPRCompliance) GenerateComplianceReport ¶
func (g *GDPRCompliance) GenerateComplianceReport(ctx context.Context) (*TestReport, error)
GenerateComplianceReport generates a GDPR compliance report
func (*GDPRCompliance) TestDataSubjectRights ¶
func (g *GDPRCompliance) TestDataSubjectRights(ctx context.Context) (*TestResult, error)
TestDataSubjectRights tests data subject rights compliance
func (*GDPRCompliance) ValidateCompliance ¶
func (g *GDPRCompliance) ValidateCompliance(ctx context.Context, data any) (*ValidationResult, error)
ValidateCompliance validates GDPR compliance
type GDPRComplianceReport ¶
type GDPRComplianceReport struct {
TotalTests int
PassedTests int
FailedTests int
OverallCompliance bool
Summary string
Results []GDPRTestResult
GeneratedAt time.Time
}
GDPRComplianceReport represents a GDPR compliance report
type GDPRComplianceTester ¶
type GDPRComplianceTester struct {
// contains filtered or unexported fields
}
GDPRComplianceTester provides GDPR compliance testing capabilities
func NewGDPRComplianceTester ¶
func NewGDPRComplianceTester(app any) *GDPRComplianceTester
NewGDPRComplianceTester creates a new GDPR compliance tester
func (*GDPRComplianceTester) GetAuditTrail ¶
func (tester *GDPRComplianceTester) GetAuditTrail(ctx context.Context, userID string) (*AuditTrail, error)
GetAuditTrail retrieves the audit trail for a user
func (*GDPRComplianceTester) TestRightToAccess ¶
func (tester *GDPRComplianceTester) TestRightToAccess(ctx context.Context, userID string) error
TestRightToAccess tests the right to access personal data
func (*GDPRComplianceTester) TestRightToDataPortability ¶
func (tester *GDPRComplianceTester) TestRightToDataPortability(ctx context.Context, userID string) error
TestRightToDataPortability tests the right to data portability
func (*GDPRComplianceTester) TestRightToErasure ¶
func (tester *GDPRComplianceTester) TestRightToErasure(ctx context.Context, userID string) error
TestRightToErasure tests the right to erasure (right to be forgotten)
func (*GDPRComplianceTester) TestRightToObject ¶
func (tester *GDPRComplianceTester) TestRightToObject(ctx context.Context, userID string, processingType string) error
TestRightToObject tests the right to object to processing
func (*GDPRComplianceTester) TestRightToRectification ¶
func (tester *GDPRComplianceTester) TestRightToRectification(ctx context.Context, userID string, updates map[string]any) error
TestRightToRectification tests the right to rectify personal data
type GDPRConfig ¶
type GDPRConfig struct {
StrictMode bool `json:"strict_mode"`
DataRetention time.Duration `json:"data_retention"`
ConsentRequired bool `json:"consent_required"`
BreachThreshold time.Duration `json:"breach_threshold"`
AuditFrequency time.Duration `json:"audit_frequency"`
}
GDPRConfig configures GDPR compliance testing
type GDPREvidenceStore ¶
type GDPREvidenceStore struct {
// contains filtered or unexported fields
}
GDPREvidenceStore stores GDPR compliance evidence
func NewGDPREvidenceStore ¶
func NewGDPREvidenceStore() *GDPREvidenceStore
NewGDPREvidenceStore creates a new GDPR evidence store
type GDPRMonitor ¶
type GDPRMonitor struct {
// contains filtered or unexported fields
}
GDPRMonitor monitors GDPR compliance
type GDPRPrivacyFramework ¶
type GDPRPrivacyFramework struct {
// contains filtered or unexported fields
}
GDPRPrivacyFramework represents the GDPR privacy framework for testing
func NewGDPRPrivacyFramework ¶
func NewGDPRPrivacyFramework(auditPeriod time.Duration) *GDPRPrivacyFramework
NewGDPRPrivacyFramework creates a new GDPR privacy framework
func (*GDPRPrivacyFramework) ValidateGDPRCompliance ¶
func (f *GDPRPrivacyFramework) ValidateGDPRCompliance(ctx context.Context, app any) (*GDPRReport, error)
ValidateGDPRCompliance validates GDPR compliance for an application
type GDPRReport ¶
type GDPRReport struct {
Framework string `json:"framework"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
OverallStatus ComplianceStatus `json:"overall_status"`
Articles map[string]*ArticleResult `json:"articles"`
RiskAssessment *RiskAssessment `json:"risk_assessment"`
Metadata map[string]any `json:"metadata"`
}
GDPRReport represents a GDPR compliance report
type GDPRReporter ¶
type GDPRReporter struct {
// contains filtered or unexported fields
}
GDPRReporter generates GDPR compliance reports
func NewGDPRReporter ¶
func NewGDPRReporter() *GDPRReporter
NewGDPRReporter creates a new GDPR reporter
type GDPRRightType ¶
type GDPRRightType string
GDPRRightType represents the type of GDPR data subject right
const ( GDPRRightToAccess GDPRRightType = "right_to_access" GDPRRightToRectification GDPRRightType = "right_to_rectification" GDPRRightToErasure GDPRRightType = "right_to_erasure" GDPRRightToDataPortability GDPRRightType = "right_to_data_portability" GDPRRightToObject GDPRRightType = "right_to_object" GDPRRightToRestriction GDPRRightType = "right_to_restriction" )
type GDPRTest ¶
type GDPRTest struct {
ID string `json:"id"`
Type PrivacyTestType `json:"type"`
Procedure string `json:"procedure"`
Expected any `json:"expected"`
Metadata map[string]any `json:"metadata"`
}
GDPRTest represents a test for a GDPR article
type GDPRTestCase ¶
type GDPRTestCase struct {
Name string
Type GDPRRightType
Description string
TestFunc func(ctx context.Context, tester *GDPRComplianceTester) error
}
GDPRTestCase represents a GDPR compliance test case
type GDPRTestResult ¶
type GDPRTestResult struct {
TestCase GDPRTestCase
Success bool
Duration time.Duration
Timestamp time.Time
Error string
}
GDPRTestResult represents the result of a GDPR test
type GDPRValidator ¶
type GDPRValidator struct {
// contains filtered or unexported fields
}
GDPRValidator validates GDPR compliance
func NewGDPRValidator ¶
func NewGDPRValidator() *GDPRValidator
NewGDPRValidator creates a new GDPR validator
type GameDayResults ¶
type GameDayResults struct {
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
ScenariosRun int `json:"scenarios_run"`
ExperimentsRun int `json:"experiments_run"`
SuccessRate float64 `json:"success_rate"`
Lessons []Lesson `json:"lessons"`
ActionItems []ActionItem `json:"action_items"`
Feedback []ParticipantFeedback `json:"feedback"`
Metrics map[string]any `json:"metrics"`
Summary string `json:"summary"`
}
GameDayResults contains game day results
type GameDayScenario ¶
type GameDayScenario struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Type ScenarioType `json:"type"`
Experiments []string `json:"experiments"`
Duration time.Duration `json:"duration"`
Sequence int `json:"sequence"`
Dependencies []string `json:"dependencies"`
Metadata map[string]any `json:"metadata"`
}
GameDayScenario represents a scenario in a game day
type GameDaySchedule ¶
type GameDaySchedule struct {
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
TimeZone string `json:"time_zone"`
Breaks []Break `json:"breaks"`
Milestones []Milestone `json:"milestones"`
}
GameDaySchedule defines game day scheduling
type GameDayStatus ¶
type GameDayStatus string
GameDayStatus defines game day status
const ( PlannedGameDay GameDayStatus = "planned" InProgressGameDay GameDayStatus = "in_progress" CompletedGameDay GameDayStatus = "completed" CancelledGameDay GameDayStatus = "cancelled" PostponedGameDay GameDayStatus = "postponed" )
type GovernanceCategory ¶
type GovernanceCategory string
GovernanceCategory represents governance categories
const ( DataGovernance GovernanceCategory = "data_governance" PrivacyGovernance GovernanceCategory = "privacy_governance" RiskGovernance GovernanceCategory = "risk_governance" )
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient handles HTTP-based performance tests
type HealthCheck ¶
HealthCheck represents a health check function
type HealthCheckType ¶
type HealthCheckType string
HealthCheckType defines health check types
const ( HealthCheckTypeHTTP HealthCheckType = "http" HealthCheckTypeTCP HealthCheckType = "tcp" HealthCheckTypeDatabase HealthCheckType = "database" HealthCheckTypeCustom HealthCheckType = "custom" )
type IOChaosController ¶
type IOChaosController struct {
// contains filtered or unexported fields
}
IOChaosController implements I/O fault injection
func NewIOChaosController ¶
func NewIOChaosController(config *KubernetesConfig) *IOChaosController
func (*IOChaosController) CreateChaosExperiment ¶
func (i *IOChaosController) CreateChaosExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
func (*IOChaosController) GetName ¶
func (i *IOChaosController) GetName() string
Add Cleanup method to IOChaosController
func (*IOChaosController) GetSupportedFaults ¶
func (i *IOChaosController) GetSupportedFaults() []FaultType
func (*IOChaosController) GetType ¶
func (i *IOChaosController) GetType() ChaosControllerType
func (*IOChaosController) Initialize ¶
func (i *IOChaosController) Initialize(ctx context.Context, config *KubernetesConfig) error
func (*IOChaosController) MonitorExperiment ¶
func (i *IOChaosController) MonitorExperiment(ctx context.Context, experimentID string) (*ExperimentStatusInfo, error)
func (*IOChaosController) StopExperiment ¶
func (i *IOChaosController) StopExperiment(ctx context.Context, experimentID string) error
func (*IOChaosController) ValidateSpec ¶
func (i *IOChaosController) ValidateSpec(spec *ChaosExperimentSpec) error
type IOFaultInjector ¶
type IOFaultInjector any
type InfrastructureAlertChannel ¶
type InfrastructureAlertChannel interface {
Send(ctx context.Context, alert *ComplianceAlert) error
}
InfrastructureAlertChannel defines an alert channel (renamed to avoid conflict)
type InfrastructureComplianceMonitor ¶
type InfrastructureComplianceMonitor struct {
ID string `json:"id"`
Framework string `json:"framework"`
Controls []string `json:"controls"`
Frequency time.Duration `json:"frequency"`
Enabled bool `json:"enabled"`
Thresholds map[string]float64 `json:"thresholds"`
Actions []MonitorAction `json:"actions"`
}
InfrastructureComplianceMonitor defines a compliance monitor (renamed to avoid conflict)
type InfrastructureEvidenceIndexer ¶
type InfrastructureEvidenceIndexer interface {
Index(ctx context.Context, evidence *Evidence) error
Search(ctx context.Context, query EvidenceQuery) ([]*Evidence, error)
Update(ctx context.Context, evidence *Evidence) error
Remove(ctx context.Context, id string) error
}
InfrastructureEvidenceIndexer provides evidence indexing and search (renamed to avoid conflict)
type InfrastructureRetentionPolicy ¶
type InfrastructureRetentionPolicy struct {
DefaultRetention time.Duration `json:"default_retention"`
FrameworkPolicies map[string]time.Duration `json:"framework_policies"`
TypePolicies map[EvidenceType]time.Duration `json:"type_policies"`
CustomPolicies map[string]CustomRetentionPolicy `json:"custom_policies"`
}
InfrastructureRetentionPolicy defines evidence retention policies (renamed to avoid conflict)
type InfrastructureTest ¶
type InfrastructureTest struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Target string `json:"target"`
Config map[string]any `json:"config"`
Timeout time.Duration `json:"timeout"`
Retries int `json:"retries"`
Severity ValidationSeverity `json:"severity"`
}
InfrastructureTest represents an infrastructure test
type Interaction ¶
type Interaction struct {
ID string `json:"id"`
Description string `json:"description"`
Request *InteractionRequest `json:"request"`
Response *InteractionResponse `json:"response"`
Metadata map[string]any `json:"metadata"`
}
Interaction represents a single interaction in a contract (for patterns.go)
type InteractionRequest ¶
type InteractionRequest struct {
Method string `json:"method"`
Path string `json:"path"`
Headers map[string]string `json:"headers"`
Body any `json:"body"`
Query map[string]any `json:"query"`
Schema *SchemaDefinition `json:"schema,omitempty"`
}
InteractionRequest represents a request in a contract interaction
type InteractionResponse ¶
type InteractionResponse struct {
Status int `json:"status"`
Headers map[string]string `json:"headers"`
Body any `json:"body"`
Schema *SchemaDefinition `json:"schema,omitempty"`
}
InteractionResponse represents a response in a contract interaction
type InteractionResult ¶
type InteractionResult struct {
InteractionID string `json:"interaction_id"`
Status TestStatus `json:"status"`
Request *InteractionRequest `json:"request"`
Response *InteractionResponse `json:"response"`
Expected *InteractionResponse `json:"expected"`
Errors []string `json:"errors"`
Metadata map[string]any `json:"metadata"`
}
InteractionResult represents the result of testing an interaction
type InteractionValidation ¶
type InteractionValidation struct {
InteractionID string `json:"interaction_id"`
Status string `json:"status"`
Checks map[string]*ValidationCheck `json:"checks"`
Errors []string `json:"errors"`
Warnings []string `json:"warnings"`
Duration time.Duration `json:"duration"`
Timestamp time.Time `json:"timestamp"`
}
InteractionValidation represents validation results for a contract interaction
type KubernetesConfig ¶
type KubernetesConfig struct {
ClusterName string `json:"cluster_name"`
Namespace string `json:"namespace"`
KubeConfig string `json:"kube_config"`
ServiceAccount string `json:"service_account"`
RBAC *RBACConfig `json:"rbac"`
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations"`
Tolerations []Toleration `json:"tolerations"`
NodeSelector map[string]string `json:"node_selector"`
ResourceLimits *ResourceLimits `json:"resource_limits"`
}
KubernetesConfig defines Kubernetes cluster configuration
type KubernetesMetricsCollector ¶
type KubernetesMetricsCollector struct {
// contains filtered or unexported fields
}
KubernetesMetricsCollector collects Kubernetes-specific metrics
type KubernetesMonitoringSystem ¶
type KubernetesMonitoringSystem struct {
// contains filtered or unexported fields
}
KubernetesMonitoringSystem provides comprehensive monitoring
func NewKubernetesMonitoringSystem ¶
func NewKubernetesMonitoringSystem(config *KubernetesConfig) (*KubernetesMonitoringSystem, error)
type LatencyFaultConfig ¶
type LatencyFaultConfig struct {
Latency time.Duration `json:"latency"`
Jitter time.Duration `json:"jitter"`
Target string `json:"target"`
Duration time.Duration `json:"duration"`
}
LatencyFaultConfig represents a network latency fault configuration
type LatencyResults ¶
type LatencyResults struct {
Mean time.Duration `json:"mean"`
Median time.Duration `json:"median"`
P95 time.Duration `json:"p95"`
P99 time.Duration `json:"p99"`
Max time.Duration `json:"max"`
Min time.Duration `json:"min"`
StdDev time.Duration `json:"std_dev"`
}
LatencyResults defines latency metrics
type LeaderElection ¶
type LeaderElection struct{}
type Lesson ¶
type Lesson struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Category LessonCategory `json:"category"`
Impact LessonImpact `json:"impact"`
Source string `json:"source"`
Timestamp time.Time `json:"timestamp"`
Metadata map[string]any `json:"metadata"`
}
Lesson represents a lesson learned
type LessonCategory ¶
type LessonCategory string
LessonCategory defines lesson categories
const ( TechnicalLesson LessonCategory = "technical" ProcessLesson LessonCategory = "process" CommunicationLesson LessonCategory = "communication" ToolingLesson LessonCategory = "tooling" )
type LessonImpact ¶
type LessonImpact string
LessonImpact defines lesson impact
const ( HighImpact LessonImpact = "high" MediumImpact LessonImpact = "medium" LowImpact LessonImpact = "low" )
type LoadBalancingAlgorithm ¶
type LoadBalancingAlgorithm string
LoadBalancingAlgorithm defines load balancing algorithms
const ( LoadBalancingAlgorithmRoundRobin LoadBalancingAlgorithm = "round_robin" LoadBalancingAlgorithmWeightedRR LoadBalancingAlgorithm = "weighted_round_robin" LoadBalancingAlgorithmLeastConn LoadBalancingAlgorithm = "least_connections" LoadBalancingAlgorithmIPHash LoadBalancingAlgorithm = "ip_hash" LoadBalancingAlgorithmGeographic LoadBalancingAlgorithm = "geographic" LoadBalancingAlgorithmLatencyBased LoadBalancingAlgorithm = "latency_based" )
type LoadBalancingConfig ¶
type LoadBalancingConfig struct {
Algorithm LoadBalancingAlgorithm `json:"algorithm"`
HealthChecks []*DistributedHealthCheck `json:"health_checks"`
StickySession bool `json:"sticky_session"`
Weights map[string]int `json:"weights"`
Failover bool `json:"failover"`
Timeout time.Duration `json:"timeout"`
}
LoadBalancingConfig defines load balancing settings
type LocalConsentHistory ¶
type LocalConsentHistory struct {
Timestamp time.Time `json:"timestamp"`
Action string `json:"action"`
Details map[string]any `json:"details"`
}
LocalConsentHistory represents consent history (local version to avoid conflicts)
type LocalConsentRecord ¶
type LocalConsentRecord struct {
ID string `json:"id"`
Purpose string `json:"purpose"`
LegalBasis string `json:"legal_basis"`
Granted bool `json:"granted"`
Timestamp time.Time `json:"timestamp"`
ExpiryDate *time.Time `json:"expiry_date,omitempty"`
Withdrawn bool `json:"withdrawn"`
WithdrawnAt *time.Time `json:"withdrawn_at,omitempty"`
Granular bool `json:"granular"`
Metadata map[string]any `json:"metadata"`
}
LocalConsentRecord represents a consent record (local version to avoid conflicts)
type LogAggregator ¶
type LogAggregator struct{}
type LogConfig ¶
type LogConfig struct {
Level LogLevel `json:"level"`
Format LogFormat `json:"format"`
Destination string `json:"destination"`
Retention time.Duration `json:"retention"`
Sampling float64 `json:"sampling"`
}
LogConfig defines log collection configuration
type MetricsCollector ¶
type MetricsCollector any
type Milestone ¶
type Milestone struct {
Name string `json:"name"`
Time time.Time `json:"time"`
Description string `json:"description"`
Completed bool `json:"completed"`
}
Milestone represents a game day milestone
type MonitorAction ¶
type MonitorAction struct {
Type ActionType `json:"type"`
Parameters map[string]any `json:"parameters"`
}
MonitorAction defines an action to take when a monitor triggers
type MonitorScheduler ¶
type MonitorScheduler struct {
// contains filtered or unexported fields
}
MonitorScheduler schedules compliance monitoring
type MonitorType ¶
type MonitorType string
MonitorType represents different types of monitoring
const ( PerformanceMonitor MonitorType = "performance" SecurityMonitor MonitorType = "security" ComplianceMonitor MonitorType = "compliance" AvailabilityMonitor MonitorType = "availability" IntegrityMonitor MonitorType = "integrity" )
type MonitoringConfig ¶
type MonitoringConfig struct{}
type MonitoringMetrics ¶
type MonitoringMetrics struct {
TotalMonitors int64 `json:"total_monitors"`
ActiveMonitors int64 `json:"active_monitors"`
AlertsGenerated int64 `json:"alerts_generated"`
ComplianceScore float64 `json:"compliance_score"`
LastUpdate time.Time `json:"last_update"`
MetricsByFramework map[string]*FrameworkMetrics `json:"metrics_by_framework"`
}
MonitoringMetrics tracks monitoring metrics
type MultiRegionChaosOrchestrator ¶
type MultiRegionChaosOrchestrator struct {
// contains filtered or unexported fields
}
MultiRegionChaosOrchestrator orchestrates chaos experiments across multiple regions
func NewMultiRegionChaosOrchestrator ¶
func NewMultiRegionChaosOrchestrator(config *DistributedConfig) (*MultiRegionChaosOrchestrator, error)
NewMultiRegionChaosOrchestrator creates a new multi-region chaos orchestrator
func (*MultiRegionChaosOrchestrator) CreateDistributedExperiment ¶
func (m *MultiRegionChaosOrchestrator) CreateDistributedExperiment(ctx context.Context, spec *DistributedExperimentSpec) (*DistributedExperiment, error)
CreateDistributedExperiment creates a new distributed chaos experiment
type NetworkChaosController ¶
type NetworkChaosController struct {
// contains filtered or unexported fields
}
NetworkChaosController implements network-level chaos operations
func NewNetworkChaosController ¶
func NewNetworkChaosController(config *KubernetesConfig) *NetworkChaosController
Placeholder implementations for remaining controllers
func (*NetworkChaosController) Cleanup ¶
func (n *NetworkChaosController) Cleanup(ctx context.Context) error
func (*NetworkChaosController) CreateChaosExperiment ¶
func (n *NetworkChaosController) CreateChaosExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
func (*NetworkChaosController) GetName ¶
func (n *NetworkChaosController) GetName() string
Add Cleanup method to NetworkChaosController
func (*NetworkChaosController) GetSupportedFaults ¶
func (n *NetworkChaosController) GetSupportedFaults() []FaultType
func (*NetworkChaosController) GetType ¶
func (n *NetworkChaosController) GetType() ChaosControllerType
func (*NetworkChaosController) Initialize ¶
func (n *NetworkChaosController) Initialize(ctx context.Context, config *KubernetesConfig) error
func (*NetworkChaosController) MonitorExperiment ¶
func (n *NetworkChaosController) MonitorExperiment(ctx context.Context, experimentID string) (*ExperimentStatusInfo, error)
func (*NetworkChaosController) StopExperiment ¶
func (n *NetworkChaosController) StopExperiment(ctx context.Context, experimentID string) error
func (*NetworkChaosController) ValidateSpec ¶
func (n *NetworkChaosController) ValidateSpec(spec *ChaosExperimentSpec) error
type NetworkFaultConfig ¶
type NetworkFaultConfig struct {
Interface string `json:"interface"`
DefaultDelay time.Duration `json:"default_delay"`
DefaultLoss float64 `json:"default_loss"`
DefaultJitter time.Duration `json:"default_jitter"`
MaxBandwidth int64 `json:"max_bandwidth"`
}
NetworkFaultConfig configures network fault injection
type NetworkFaultInjector ¶
type NetworkFaultInjector struct {
// contains filtered or unexported fields
}
NetworkFaultInjector injects network-related faults
func NewNetworkFaultInjector ¶
func NewNetworkFaultInjector(config *NetworkFaultConfig) *NetworkFaultInjector
func (*NetworkFaultInjector) Inject ¶
func (nfi *NetworkFaultInjector) Inject(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
func (*NetworkFaultInjector) Remove ¶
func (nfi *NetworkFaultInjector) Remove(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
func (*NetworkFaultInjector) Status ¶
func (nfi *NetworkFaultInjector) Status(ctx context.Context, fault FaultDefinition, target ExperimentTarget) (FaultStatus, error)
type NetworkInterface ¶
type NetworkInterface struct {
Name string `json:"name"`
RXBytes int64 `json:"rx_bytes"`
TXBytes int64 `json:"tx_bytes"`
RXPackets int64 `json:"rx_packets"`
TXPackets int64 `json:"tx_packets"`
}
NetworkInterface defines network interface metrics
type NetworkLatencyFailure ¶
type NetworkLatencyFailure struct {
// contains filtered or unexported fields
}
NetworkLatencyFailure represents a network latency failure
func (*NetworkLatencyFailure) Cleanup ¶
func (n *NetworkLatencyFailure) Cleanup() error
func (*NetworkLatencyFailure) Duration ¶
func (n *NetworkLatencyFailure) Duration() time.Duration
func (*NetworkLatencyFailure) IsActive ¶
func (n *NetworkLatencyFailure) IsActive() bool
func (*NetworkLatencyFailure) Severity ¶
func (n *NetworkLatencyFailure) Severity() ChaosSeverity
func (*NetworkLatencyFailure) Type ¶
func (n *NetworkLatencyFailure) Type() string
type NetworkLatencyScenario ¶
type NetworkLatencyScenario struct {
// contains filtered or unexported fields
}
NetworkLatencyScenario injects network latency
func NewNetworkLatencyScenario ¶
func NewNetworkLatencyScenario(latency, duration time.Duration) *NetworkLatencyScenario
NewNetworkLatencyScenario creates a network latency scenario
func (*NetworkLatencyScenario) Description ¶
func (n *NetworkLatencyScenario) Description() string
func (*NetworkLatencyScenario) ExecuteOperations ¶
func (n *NetworkLatencyScenario) ExecuteOperations(ctx context.Context) ([]OperationResult, error)
func (*NetworkLatencyScenario) InjectFailure ¶
func (n *NetworkLatencyScenario) InjectFailure(ctx context.Context) (ChaosFailure, error)
func (*NetworkLatencyScenario) Name ¶
func (n *NetworkLatencyScenario) Name() string
func (*NetworkLatencyScenario) ValidateRecovery ¶
func (n *NetworkLatencyScenario) ValidateRecovery(ctx context.Context, metrics *ChaosMetrics) error
type NetworkManager ¶
type NetworkManager any
type NetworkPartitionConfig ¶
type NetworkPartitionConfig struct {
Targets []string `json:"targets"`
Duration time.Duration `json:"duration"`
Mode string `json:"mode"`
}
NetworkPartitionConfig represents a network partition fault configuration
type NetworkTopology ¶
type NetworkTopology struct {
Type TopologyType `json:"type"`
Connections []*Connection `json:"connections"`
Latencies map[string]int64 `json:"latencies"`
Bandwidths map[string]int64 `json:"bandwidths"`
Partitions []*DistributedNetworkPartition `json:"partitions"`
Redundancy int `json:"redundancy"`
}
NetworkTopology defines network structure
type NodeCondition ¶
type NodeCondition struct {
Type string `json:"type"`
Status string `json:"status"`
LastHeartbeatTime time.Time `json:"last_heartbeat_time"`
LastTransitionTime time.Time `json:"last_transition_time"`
Reason string `json:"reason"`
Message string `json:"message"`
}
NodeCondition defines node condition
type NodeMetrics ¶
type NodeMetrics struct {
Name string `json:"name"`
CPUCapacity float64 `json:"cpu_capacity"`
MemoryCapacity int64 `json:"memory_capacity"`
CPUUsage float64 `json:"cpu_usage"`
MemoryUsage int64 `json:"memory_usage"`
PodCount int `json:"pod_count"`
PodCapacity int `json:"pod_capacity"`
DiskUsage int64 `json:"disk_usage"`
DiskCapacity int64 `json:"disk_capacity"`
NetworkInterfaces []NetworkInterface `json:"network_interfaces"`
Conditions []NodeCondition `json:"conditions"`
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations"`
LastUpdated time.Time `json:"last_updated"`
}
NodeMetrics defines node-level metrics
type Notification ¶
type Notification struct {
Type NotificationType `json:"type"`
Destination string `json:"destination"`
Template string `json:"template"`
Severity NotificationSeverity `json:"severity"`
Throttle time.Duration `json:"throttle"`
}
Notification defines notification configuration
type NotificationChannel ¶
type NotificationChannel struct {
Type string `json:"type"`
Config map[string]any `json:"config"`
Enabled bool `json:"enabled"`
}
NotificationChannel defines a notification channel
type NotificationConfig ¶
type NotificationConfig struct {
Enabled bool `json:"enabled"`
Channels []NotificationChannel `json:"channels"`
Templates map[string]string `json:"templates"`
Rules []NotificationRule `json:"rules"`
}
NotificationConfig configures notifications
type NotificationRule ¶
type NotificationRule struct {
Event string `json:"event"`
Severity string `json:"severity"`
Channels []string `json:"channels"`
Template string `json:"template"`
Enabled bool `json:"enabled"`
}
NotificationRule defines notification rules
type NotificationSeverity ¶
type NotificationSeverity string
NotificationSeverity defines notification severity
const ( NotificationSeverityLow NotificationSeverity = "low" NotificationSeverityMedium NotificationSeverity = "medium" NotificationSeverityHigh NotificationSeverity = "high" NotificationSeverityCritical NotificationSeverity = "critical" )
type NotificationType ¶
type NotificationType string
NotificationType defines notification types
const ( NotificationTypeEmail NotificationType = "email" NotificationTypeSMS NotificationType = "sms" NotificationTypeSlack NotificationType = "slack" NotificationTypeWebhook NotificationType = "webhook" NotificationTypePagerDuty NotificationType = "pagerduty" )
type Observation ¶
type Observation struct {
ID string `json:"id"`
Type ObservationType `json:"type"`
Severity ObservationSeverity `json:"severity"`
Timestamp time.Time `json:"timestamp"`
Message string `json:"message"`
Data map[string]any `json:"data"`
Source string `json:"source"`
Metadata map[string]any `json:"metadata"`
}
Observation represents an observation during chaos experiments
type ObservationSeverity ¶
type ObservationSeverity string
Observation severity
const ( InfoObservationSeverity ObservationSeverity = "info" WarningObservationSeverity ObservationSeverity = "warning" ErrorObservationSeverity ObservationSeverity = "error" CriticalObservationSeverity ObservationSeverity = "critical" )
type ObservationType ¶
type ObservationType string
Observation types for chaos engineering
const ( MetricObservation ObservationType = "metric" LogObservation ObservationType = "log" EventObservation ObservationType = "event" HealthObservation ObservationType = "health" )
type OperationResult ¶
type OperationResult struct {
Operation string
Success bool
Duration time.Duration
Error error
Timestamp time.Time
Metadata map[string]any
}
OperationResult represents the result of an operation during chaos testing
type OperatorStatus ¶
type OperatorStatus string
OperatorStatus defines operator status
const ( OperatorStatusPending OperatorStatus = "pending" OperatorStatusRunning OperatorStatus = "running" OperatorStatusStopped OperatorStatus = "stopped" OperatorStatusError OperatorStatus = "error" )
type PanelConfig ¶
type PanelConfig struct {
Name string `json:"name"`
Type PanelType `json:"type"`
Query string `json:"query"`
Visualization string `json:"visualization"`
Options map[string]any `json:"options"`
}
PanelConfig defines dashboard panel configuration
type Participant ¶
type Participant struct {
ID string `json:"id"`
Name string `json:"name"`
Role ParticipantRole `json:"role"`
Team string `json:"team"`
Contact ContactInfo `json:"contact"`
Skills []string `json:"skills"`
Metadata map[string]any `json:"metadata"`
}
Participant represents a game day participant
type ParticipantFeedback ¶
type ParticipantFeedback struct {
ParticipantID string `json:"participant_id"`
Rating int `json:"rating"`
Comments string `json:"comments"`
Suggestions []string `json:"suggestions"`
Timestamp time.Time `json:"timestamp"`
Anonymous bool `json:"anonymous"`
Metadata map[string]any `json:"metadata"`
}
ParticipantFeedback represents feedback from participants
type ParticipantRole ¶
type ParticipantRole string
ParticipantRole defines participant roles
const ( IncidentCommanderRole ParticipantRole = "incident_commander" TechnicalLeadRole ParticipantRole = "technical_lead" ObserverRole ParticipantRole = "observer" ParticipantRoleType ParticipantRole = "participant" FacilitatorRole ParticipantRole = "facilitator" )
type PartitionTester ¶
type PartitionTester struct{}
func NewPartitionTester ¶
func NewPartitionTester(config *DistributedConfig) (*PartitionTester, error)
NewPartitionTester creates a new partition tester
type PartitionType ¶
type PartitionType string
PartitionType defines partition types
const ( PartitionTypeComplete PartitionType = "complete" PartitionTypePartial PartitionType = "partial" PartitionTypeAsymmetric PartitionType = "asymmetric" PartitionTypeFlapping PartitionType = "flapping" )
type PatternTestReport ¶
type PatternTestReport struct {
SuiteName string `json:"suiteName"`
StartTime time.Time `json:"startTime"`
EndTime time.Time `json:"endTime"`
Duration time.Duration `json:"duration"`
TotalTests int `json:"totalTests"`
PassedTests int `json:"passedTests"`
FailedTests int `json:"failedTests"`
SkippedTests int `json:"skippedTests"`
TestResults []PatternTestResult `json:"testResults"`
ContractResults map[string]ContractTestResult `json:"contractResults,omitempty"`
ChaosResults *ChaosMetrics `json:"chaosResults,omitempty"`
PerformanceData map[string]PerformanceBaseline `json:"performanceData,omitempty"`
Environment string `json:"environment"`
Metadata map[string]any `json:"metadata"`
}
PatternTestReport generates a comprehensive pattern test report
type PatternTestResult ¶
type PatternTestResult struct {
Name string
Status PatternTestStatus
Duration time.Duration
Error error
StartTime time.Time
EndTime time.Time
Metadata map[string]any
}
PatternTestResult represents the result of running a pattern test
type PatternTestStatus ¶
type PatternTestStatus = TestStatus
PatternTestStatus is an alias for the common TestStatus type
type PendingExperiment ¶
type PendingExperiment struct {
ID string `json:"id"`
Experiment *ChaosExperiment `json:"experiment"`
ScheduledAt time.Time `json:"scheduled_at"`
Priority int `json:"priority"`
Metadata map[string]any `json:"metadata"`
}
PendingExperiment represents an experiment in pending state
type PerformanceBaseline ¶
type PerformanceBaseline struct {
Metric string
Value float64
Environment string
Timestamp time.Time
}
PerformanceBaseline represents a performance baseline
type PerformanceConfig ¶
type PerformanceConfig struct {
// HTTP/API Configuration
Endpoint string
Method string
// Load Configuration
ConcurrentUsers int
TestDuration time.Duration
// Response Time Expectations
ExpectedP95 time.Duration
ExpectedP99 time.Duration
// Throughput Expectations
ExpectedTPS int
// Database Configuration
QueryType string
// Memory Configuration
MaxMemoryMB int
}
PerformanceConfig defines configuration for performance tests
type PerformanceMetrics ¶
type PerformanceMetrics struct {
CPUUsage float64
MemoryUsage float64
Latency time.Duration
Throughput float64
ErrorRate float64
Timestamp time.Time
}
PerformanceMetrics contains real-time performance monitoring data
type PerformanceProfiler ¶
type PerformanceProfiler struct {
// contains filtered or unexported fields
}
PerformanceProfiler profiles performance metrics
func NewPerformanceProfiler ¶
func NewPerformanceProfiler() *PerformanceProfiler
NewPerformanceProfiler creates a new performance profiler
func (*PerformanceProfiler) Profile ¶
func (p *PerformanceProfiler) Profile(testCase TestCase, env *TestEnvironment) (map[string]float64, error)
Profile profiles a test case and returns metrics
type PerformanceReport ¶
type PerformanceReport struct {
Environment string
Metrics map[string]float64
Timestamp time.Time
Status string
}
PerformanceReport represents a performance report
type PerformanceReporter ¶
type PerformanceReporter struct {
// contains filtered or unexported fields
}
PerformanceReporter reports performance results
func NewPerformanceReporter ¶
func NewPerformanceReporter() *PerformanceReporter
NewPerformanceReporter creates a new performance reporter
func (*PerformanceReporter) AddReport ¶
func (p *PerformanceReporter) AddReport(report PerformanceReport)
AddReport adds a performance report
func (*PerformanceReporter) GenerateReport ¶
func (pr *PerformanceReporter) GenerateReport(results []PerformanceTestResult) (*PerformanceTestReport, error)
GenerateReport generates a comprehensive performance report
func (*PerformanceReporter) GetReports ¶
func (p *PerformanceReporter) GetReports(envName string) []PerformanceReport
GetReports gets performance reports for an environment
type PerformanceResults ¶
type PerformanceResults struct {
Latency *LatencyResults `json:"latency"`
Throughput *ThroughputResults `json:"throughput"`
ErrorRates *ErrorRateResults `json:"error_rates"`
Resources *ResourceResults `json:"resources"`
Scalability *ScalabilityResults `json:"scalability"`
}
PerformanceResults defines performance test results
type PerformanceTestCase ¶
type PerformanceTestCase struct {
Name string
Type PerformanceType
Description string
Config PerformanceConfig
}
PerformanceTestCase represents a performance test case
type PerformanceTestMetrics ¶
type PerformanceTestMetrics struct {
// Response Time Metrics
P95Latency time.Duration
P99Latency time.Duration
MeanLatency time.Duration
MedianLatency time.Duration
MinLatency time.Duration
MaxLatency time.Duration
// Throughput Metrics
ThroughputTPS float64
TotalRequests int64
SuccessfulReqs int64
FailedRequests int64
// Resource Metrics
MaxMemoryMB float64
AvgMemoryMB float64
MaxCPUPercent float64
AvgCPUPercent float64
// Error Metrics
ErrorCount int64
ErrorRate float64
// Database Metrics (if applicable)
AvgQueryTime time.Duration
QueryCount int64
}
PerformanceTestMetrics contains detailed performance metrics
type PerformanceTestReport ¶
type PerformanceTestReport struct {
TotalTests int
PassedTests int
FailedTests int
AllTestsPassed bool
Summary string
Results []PerformanceTestResult
Timestamp time.Time
}
PerformanceTestReport represents a comprehensive performance report
type PerformanceTestResult ¶
type PerformanceTestResult struct {
TestCase PerformanceTestCase
Success bool
Duration time.Duration
Timestamp time.Time
Metrics PerformanceTestMetrics
Error string
}
PerformanceTestResult represents the result of a performance test
type PerformanceTester ¶
type PerformanceTester struct {
// contains filtered or unexported fields
}
PerformanceTester provides comprehensive performance testing capabilities
func NewPerformanceTester ¶
func NewPerformanceTester(app *EnterpriseTestApp) *PerformanceTester
NewPerformanceTester creates a new performance tester
func (*PerformanceTester) ExecuteTest ¶
func (pt *PerformanceTester) ExecuteTest(ctx context.Context, testCase PerformanceTestCase) (*PerformanceTestResult, error)
ExecuteTest executes a performance test case
type PerformanceThreshold ¶
type PerformanceThreshold struct {
Metric string
AbsoluteMax float64
RegressionFactor float64
Environment string
}
PerformanceThreshold represents performance thresholds
type PerformanceType ¶
type PerformanceType string
Performance test types
const ( PerformanceTypeResponseTime PerformanceType = "response_time" PerformanceTypeThroughput PerformanceType = "throughput" PerformanceTypeDatabase PerformanceType = "database" PerformanceTypeMemory PerformanceType = "memory" )
type PerformanceValidator ¶
type PerformanceValidator struct {
// contains filtered or unexported fields
}
PerformanceValidator validates performance across environments
func NewPerformanceValidator ¶
func NewPerformanceValidator() *PerformanceValidator
NewPerformanceValidator creates a new performance validator
func (*PerformanceValidator) GetBaseline ¶
func (p *PerformanceValidator) GetBaseline(envName, metric string) (PerformanceBaseline, bool)
GetBaseline gets a performance baseline
func (*PerformanceValidator) SetThreshold ¶
func (p *PerformanceValidator) SetThreshold(envName, metric string, absoluteMax, regressionFactor float64)
SetThreshold sets a performance threshold
func (*PerformanceValidator) ValidatePerformance ¶
func (p *PerformanceValidator) ValidatePerformance(testCase TestCase, env *TestEnvironment) error
ValidatePerformance validates performance for a test case
type PersonalDataType ¶
type PersonalDataType string
PersonalDataType represents different types of personal data
const ( IdentityData PersonalDataType = "identity" ContactData PersonalDataType = "contact" BiometricData PersonalDataType = "biometric" FinancialData PersonalDataType = "financial" HealthData PersonalDataType = "health" LocationData PersonalDataType = "location" BehavioralData PersonalDataType = "behavioral" PreferenceData PersonalDataType = "preference" // Additional aliases for backward compatibility IdentifyingData PersonalDataType = "identifying" SensitiveData PersonalDataType = "sensitive" CommunicationData PersonalDataType = "communication" )
type PhaseAction ¶
type PhaseAction struct {
Name string `json:"name"`
Type DistributedActionType `json:"type"`
Target string `json:"target"`
Parameters map[string]any `json:"parameters"`
Timeout time.Duration `json:"timeout"`
Retry *RetryConfig `json:"retry,omitempty"`
Condition string `json:"condition,omitempty"`
}
PhaseAction defines actions within a phase
type PhaseCondition ¶
type PhaseCondition struct {
Type DistributedConditionType `json:"type"`
Operator string `json:"operator"`
Value any `json:"value"`
Timeout time.Duration `json:"timeout"`
Retry *RetryConfig `json:"retry,omitempty"`
}
PhaseCondition defines phase execution conditions
type PodChaosController ¶
type PodChaosController struct {
// contains filtered or unexported fields
}
PodChaosController implements pod-level chaos operations
func NewPodChaosController ¶
func NewPodChaosController(config *KubernetesConfig) *PodChaosController
NewPodChaosController creates a new pod chaos controller
func (*PodChaosController) Cleanup ¶
func (p *PodChaosController) Cleanup(ctx context.Context) error
Cleanup cleans up controller resources
func (*PodChaosController) CreateChaosExperiment ¶
func (p *PodChaosController) CreateChaosExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
CreateChaosExperiment creates a pod chaos experiment
func (*PodChaosController) GetName ¶
func (p *PodChaosController) GetName() string
GetName returns controller name
func (*PodChaosController) GetSupportedFaults ¶
func (p *PodChaosController) GetSupportedFaults() []FaultType
GetSupportedFaults returns supported fault types
func (*PodChaosController) GetType ¶
func (p *PodChaosController) GetType() ChaosControllerType
GetType returns controller type
func (*PodChaosController) Initialize ¶
func (p *PodChaosController) Initialize(ctx context.Context, config *KubernetesConfig) error
Initialize initializes the pod chaos controller
func (*PodChaosController) MonitorExperiment ¶
func (p *PodChaosController) MonitorExperiment(ctx context.Context, experimentID string) (*ExperimentStatusInfo, error)
MonitorExperiment monitors a pod chaos experiment
func (*PodChaosController) StopExperiment ¶
func (p *PodChaosController) StopExperiment(ctx context.Context, experimentID string) error
StopExperiment stops a pod chaos experiment
func (*PodChaosController) ValidateSpec ¶
func (p *PodChaosController) ValidateSpec(spec *ChaosExperimentSpec) error
ValidateSpec validates pod chaos experiment specification
type PodMetrics ¶
type PodMetrics struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Phase string `json:"phase"`
CPUUsage float64 `json:"cpu_usage"`
MemoryUsage float64 `json:"memory_usage"`
NetworkRX int64 `json:"network_rx"`
NetworkTX int64 `json:"network_tx"`
RestartCount int32 `json:"restart_count"`
ReadinessProbe bool `json:"readiness_probe"`
LivenessProbe bool `json:"liveness_probe"`
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations"`
CreationTimestamp time.Time `json:"creation_timestamp"`
LastUpdated time.Time `json:"last_updated"`
}
PodMetrics defines pod-level metrics
type PodSelector ¶
type PodSelector struct {
Names []string `json:"names,omitempty"`
Phases []string `json:"phases,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
PodSelector defines pod-specific selection
type PolicyEnforcement ¶
type PolicyEnforcement string
PolicyEnforcement defines policy enforcement
const ( StrictEnforcementPolicy PolicyEnforcement = "strict" LenientEnforcementPolicy PolicyEnforcement = "lenient" AdvisoryEnforcementPolicy PolicyEnforcement = "advisory" )
type PolicyException ¶
type PolicyException struct {
ID string `json:"id"`
Name string `json:"name"`
Reason string `json:"reason"`
Approver string `json:"approver"`
ExpiresAt time.Time `json:"expires_at"`
Conditions []string `json:"conditions"`
Metadata map[string]any `json:"metadata"`
}
PolicyException defines policy exceptions
type PolicyRule ¶
type PolicyRule struct {
ID string `json:"id"`
Name string `json:"name"`
Type PolicyRuleType `json:"type"`
Condition string `json:"condition"`
Action ChaosPolicyAction `json:"action"`
Severity PolicySeverity `json:"severity"`
Parameters map[string]any `json:"parameters"`
Enabled bool `json:"enabled"`
}
PolicyRule defines a policy rule
type PolicyRuleType ¶
type PolicyRuleType string
PolicyRuleType defines types of policy rules
const ( BlastRadiusRule PolicyRuleType = "blast_radius" TimeWindowRule PolicyRuleType = "time_window" ApprovalRule PolicyRuleType = "approval" SafetyRule PolicyRuleType = "safety" ComplianceRule PolicyRuleType = "compliance" )
type PolicyScope ¶
type PolicyScope struct {
Type ChaosScopeType `json:"type"`
Targets []string `json:"targets"`
Filters map[string]any `json:"filters"`
Metadata map[string]any `json:"metadata"`
}
PolicyScope defines policy scope
type PolicySeverity ¶
type PolicySeverity string
PolicySeverity defines policy severity
const ( InfoPolicySeverity PolicySeverity = "info" WarningPolicySeverity PolicySeverity = "warning" ErrorPolicySeverity PolicySeverity = "error" CriticalPolicySeverity PolicySeverity = "critical" )
type PrivacyEvidenceType ¶
type PrivacyEvidenceType = EvidenceType
PrivacyEvidenceType is an alias for EvidenceType for privacy contexts
type PrivacyTestType ¶
type PrivacyTestType string
PrivacyTestType represents different types of privacy tests
const ( ConsentTest PrivacyTestType = "consent_test" DataMappingTest PrivacyTestType = "data_mapping_test" RightToAccessTest PrivacyTestType = "right_to_access_test" RightToErasureTest PrivacyTestType = "right_to_erasure_test" DataPortabilityTest PrivacyTestType = "data_portability_test" TransferValidationTest PrivacyTestType = "transfer_validation_test" BreachDetectionTest PrivacyTestType = "breach_detection_test" PIATest PrivacyTestType = "pia_test" )
type ProcessingPurpose ¶
type ProcessingPurpose struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
LegalBasis string `json:"legal_basis"`
Categories []PersonalDataType `json:"categories"`
Retention time.Duration `json:"retention"`
Automated bool `json:"automated"`
Profiling bool `json:"profiling"`
Metadata map[string]any `json:"metadata"`
}
ProcessingPurpose represents a data processing purpose
type ProcessorType ¶
type ProcessorType string
ProcessorType defines types of data processors
const ( InternalProcessor ProcessorType = "internal" ExternalProcessor ProcessorType = "external" SubProcessor ProcessorType = "sub_processor" JointProcessor ProcessorType = "joint_processor" )
type RBACConfig ¶
type RBACConfig struct {
ClusterRole string `json:"cluster_role"`
ClusterBinding string `json:"cluster_binding"`
ServiceAccount string `json:"service_account"`
Permissions []string `json:"permissions"`
APIGroups []string `json:"api_groups"`
Resources []string `json:"resources"`
Verbs []string `json:"verbs"`
}
RBACConfig defines role-based access control settings
type Recommendation ¶
type Recommendation struct {
Type RecommendationType `json:"type"`
Priority RecommendationPriority `json:"priority"`
Title string `json:"title"`
Description string `json:"description"`
Actions []string `json:"actions"`
Impact string `json:"impact"`
Effort string `json:"effort"`
Timeline string `json:"timeline"`
}
Recommendation defines recommendation
type RecommendationPriority ¶
type RecommendationPriority string
RecommendationPriority defines recommendation priority
const ( RecommendationPriorityLow RecommendationPriority = "low" RecommendationPriorityMedium RecommendationPriority = "medium" RecommendationPriorityHigh RecommendationPriority = "high" RecommendationPriorityCritical RecommendationPriority = "critical" )
type RecommendationType ¶
type RecommendationType string
RecommendationType defines recommendation types
const ( RecommendationTypePerformance RecommendationType = "performance" RecommendationTypeReliability RecommendationType = "reliability" RecommendationTypeSecurity RecommendationType = "security" RecommendationTypeCompliance RecommendationType = "compliance" RecommendationTypeCost RecommendationType = "cost" RecommendationTypeOperational RecommendationType = "operational" )
type RecoveryConfig ¶
type RecoveryConfig struct {
Automatic bool `json:"automatic"`
Timeout time.Duration `json:"timeout"`
RetryAttempts int `json:"retry_attempts"`
RetryDelay time.Duration `json:"retry_delay"`
Rollback bool `json:"rollback"`
HealthChecks []string `json:"health_checks"`
}
RecoveryConfig represents recovery configuration for chaos experiments
type RecoveryResults ¶
type RecoveryResults struct {
Successful bool `json:"successful"`
Duration time.Duration `json:"duration"`
Method string `json:"method"`
Steps []string `json:"steps"`
Errors []string `json:"errors"`
Attempted bool `json:"attempted"`
}
RecoveryResults represents recovery results
type RecoveryThresholds ¶
type RecoveryThresholds struct {
MaxRecoveryTime time.Duration
MinSuccessRate float64
MaxErrorRate float64
MaxLatencyIncrease float64
}
RecoveryThresholds defines thresholds for recovery validation
type RecoveryValidator ¶
type RecoveryValidator struct {
// contains filtered or unexported fields
}
RecoveryValidator validates system recovery after chaos injection
func NewRecoveryValidator ¶
func NewRecoveryValidator() *RecoveryValidator
NewRecoveryValidator creates a new recovery validator
func (*RecoveryValidator) AddHealthCheck ¶
func (r *RecoveryValidator) AddHealthCheck(check HealthCheck)
AddHealthCheck adds a health check to the recovery validator
func (*RecoveryValidator) ValidateRecovery ¶
func (r *RecoveryValidator) ValidateRecovery(ctx context.Context, metrics *ChaosMetrics) error
ValidateRecovery validates system recovery after chaos
type RegionConfig ¶
type RegionConfig struct {
Name string `json:"name"`
Code string `json:"code"`
Endpoint string `json:"endpoint"`
Credentials *RegionCredentials `json:"credentials"`
Resources *RegionResources `json:"resources"`
NetworkConfig *RegionNetworkConfig `json:"network_config"`
AvailabilityZones []string `json:"availability_zones"`
Latency time.Duration `json:"latency"`
Bandwidth int64 `json:"bandwidth"`
Priority int `json:"priority"`
Status RegionStatus `json:"status"`
Metadata map[string]any `json:"metadata"`
}
RegionConfig configures a specific region
type RegionCredentials ¶
type RegionCredentials struct {
AccessKey string `json:"access_key"`
SecretKey string `json:"secret_key"`
SessionToken string `json:"session_token,omitempty"`
Region string `json:"region"`
Profile string `json:"profile,omitempty"`
}
RegionCredentials holds region-specific credentials
type RegionHealthChecker ¶
type RegionHealthChecker struct{}
type RegionManager ¶
type RegionManager struct {
// contains filtered or unexported fields
}
RegionManager manages chaos operations within a region
func NewRegionManager ¶
func NewRegionManager(config *RegionConfig) (*RegionManager, error)
NewRegionManager creates a new region manager
type RegionMonitoringAgent ¶
type RegionMonitoringAgent struct{}
type RegionNetworkConfig ¶
type RegionNetworkConfig struct {
VPCId string `json:"vpc_id"`
SubnetIds []string `json:"subnet_ids"`
SecurityGroups []string `json:"security_groups"`
InternetGateway string `json:"internet_gateway"`
NATGateways []string `json:"nat_gateways"`
RouteTables []string `json:"route_tables"`
PeeringConnections []string `json:"peering_connections"`
VPNConnections []string `json:"vpn_connections"`
}
RegionNetworkConfig configures region networking
type RegionNetworkManager ¶
type RegionNetworkManager struct{}
type RegionResources ¶
type RegionResources struct {
ComputeInstances int `json:"compute_instances"`
StorageCapacity int64 `json:"storage_capacity"`
NetworkBandwidth int64 `json:"network_bandwidth"`
DatabaseNodes int `json:"database_nodes"`
CacheNodes int `json:"cache_nodes"`
LoadBalancers int `json:"load_balancers"`
CPUCores int `json:"cpu_cores"`
MemoryGB int `json:"memory_gb"`
CostPerHour float64 `json:"cost_per_hour"`
}
RegionResources defines available resources in a region
type RegionStatus ¶
type RegionStatus string
RegionStatus defines region operational status
const ( RegionStatusActive RegionStatus = "active" RegionStatusInactive RegionStatus = "inactive" RegionStatusMaintenance RegionStatus = "maintenance" RegionStatusDegraded RegionStatus = "degraded" RegionStatusFailed RegionStatus = "failed" )
type RegressionDetector ¶
type RegressionDetector struct {
// contains filtered or unexported fields
}
RegressionDetector detects performance regressions
func NewRegressionDetector ¶
func NewRegressionDetector() *RegressionDetector
NewRegressionDetector creates a new regression detector
func (*RegressionDetector) DetectRegressions ¶
func (rd *RegressionDetector) DetectRegressions(results []PerformanceTestResult) ([]RegressionResult, error)
DetectRegressions detects performance regressions in test results
type RegressionResult ¶
type RegressionResult struct {
TestName string
Metric string
BaselineValue float64
CurrentValue float64
RegressionPct float64
Severity string
}
RegressionResult represents a detected regression
type ReplicationChaosController ¶
type ReplicationChaosController struct{}
func NewReplicationChaosController ¶
func NewReplicationChaosController(config *DistributedConfig) (*ReplicationChaosController, error)
NewReplicationChaosController creates a new replication chaos controller
type ReplicationMode ¶
type ReplicationMode string
ReplicationMode defines data replication strategy
const ( ReplicationModeSync ReplicationMode = "synchronous" ReplicationModeAsync ReplicationMode = "asynchronous" ReplicationModeSemiSync ReplicationMode = "semi_synchronous" ReplicationModeMultiMaster ReplicationMode = "multi_master" )
type ReportChart ¶
type ReportChart struct {
Type string `json:"type"`
Title string `json:"title"`
Data map[string]any `json:"data"`
}
ReportChart represents a chart in a report
type ReportExporter ¶
type ReportExporter interface {
Export(ctx context.Context, report any, format ReportFormat) ([]byte, error)
}
ReportExporter defines the interface for exporting reports
type ReportFormat ¶
type ReportFormat string
ReportFormat represents the format for exporting reports
const ( JSONFormat ReportFormat = "json" PDFFormat ReportFormat = "pdf" HTMLFormat ReportFormat = "html" CSVFormat ReportFormat = "csv" XMLFormat ReportFormat = "xml" )
type ReportSection ¶
type ReportSection struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Type SectionType `json:"type"`
Content string `json:"content"`
Data map[string]any `json:"data"`
Charts []ReportChart `json:"charts"`
}
ReportSection represents a section in a report
type ReportTemplate ¶
type ReportTemplate struct {
ID string `json:"id"`
Name string `json:"name"`
Framework string `json:"framework"`
Type ReportType `json:"type"`
Format ReportFormat `json:"format"`
Description string `json:"description"`
Sections []ReportSection `json:"sections"`
Metadata map[string]any `json:"metadata"`
}
ReportTemplate represents a template for generating reports
type ReportType ¶
type ReportType string
Report Types
const ( ComplianceReportType ReportType = "compliance" SecurityReportType ReportType = "security" PerformanceReportType ReportType = "performance" TestReportType ReportType = "test" ContractReportType ReportType = "contract" ChaosReportType ReportType = "chaos" )
type ResilienceMetrics ¶
type ResilienceMetrics struct {
MTTR time.Duration `json:"mttr"`
MTBF time.Duration `json:"mtbf"`
Availability float64 `json:"availability"`
ErrorBudget float64 `json:"error_budget"`
LastIncident time.Time `json:"last_incident"`
IncidentCount int `json:"incident_count"`
ResilienceScore float64 `json:"resilience_score"`
Trends map[string]any `json:"trends"`
ExperimentCount int `json:"experiment_count"`
LastUpdated time.Time `json:"last_updated"`
}
ResilienceMetrics represents metrics for measuring system resilience
type ResourceFaultConfig ¶
type ResourceFaultConfig struct {
CPULimits map[string]float64 `json:"cpu_limits"`
MemoryLimits map[string]int64 `json:"memory_limits"`
DiskLimits map[string]int64 `json:"disk_limits"`
NetworkLimits map[string]int64 `json:"network_limits"`
}
ResourceFaultConfig configures resource fault injection
type ResourceFaultInjector ¶
type ResourceFaultInjector struct {
// contains filtered or unexported fields
}
ResourceFaultInjector injects resource-related faults
func NewResourceFaultInjector ¶
func NewResourceFaultInjector(config *ResourceFaultConfig) *ResourceFaultInjector
func (*ResourceFaultInjector) Inject ¶
func (rfi *ResourceFaultInjector) Inject(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
func (*ResourceFaultInjector) Remove ¶
func (rfi *ResourceFaultInjector) Remove(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
func (*ResourceFaultInjector) Status ¶
func (rfi *ResourceFaultInjector) Status(ctx context.Context, fault FaultDefinition, target ExperimentTarget) (FaultStatus, error)
type ResourceLimits ¶
type ResourceLimits struct {
CPU string `json:"cpu"`
Memory string `json:"memory"`
EphemeralStorage string `json:"ephemeral_storage"`
MaxPods int `json:"max_pods"`
}
ResourceLimits defines resource constraints
type ResourceManager ¶
type ResourceManager any
type ResourceMonitor ¶
type ResourceMonitor struct {
// contains filtered or unexported fields
}
ResourceMonitor monitors system resources during tests
type ResourceResults ¶
type ResourceResults struct {
CPU *ResourceUtilization `json:"cpu"`
Memory *ResourceUtilization `json:"memory"`
Network *ResourceUtilization `json:"network"`
Storage *ResourceUtilization `json:"storage"`
}
ResourceResults defines resource utilization metrics
type ResourceState ¶
type ResourceState struct {
Type string
Status string
LastChecked time.Time
Metadata map[string]any
}
ResourceState tracks the state of environment resources
type ResourceUtilization ¶
type ResourceUtilization struct {
Average float64 `json:"average"`
Peak float64 `json:"peak"`
Minimum float64 `json:"minimum"`
StdDev float64 `json:"std_dev"`
}
ResourceUtilization defines resource utilization metrics
type ResourceValidator ¶
type ResourceValidator struct{}
ResourceValidator validates resource availability and limits
func (*ResourceValidator) Name ¶
func (r *ResourceValidator) Name() string
func (*ResourceValidator) Validate ¶
func (r *ResourceValidator) Validate(env *TestEnvironment) error
type ResultSummary ¶
type ResultSummary struct {
Status ExperimentStatus `json:"status"`
Duration time.Duration `json:"duration"`
SuccessRate float64 `json:"success_rate"`
ErrorRate float64 `json:"error_rate"`
AvailabilityImpact float64 `json:"availability_impact"`
PerformanceImpact float64 `json:"performance_impact"`
RecoveryTime time.Duration `json:"recovery_time"`
BlastRadius int `json:"blast_radius"`
}
ResultSummary defines result summary
type RetentionAction ¶
type RetentionAction struct {
Type string `json:"type"`
Parameters map[string]any `json:"parameters"`
}
RetentionAction defines an action for retention
type RetentionCondition ¶
type RetentionCondition struct {
Field string `json:"field"`
Operator string `json:"operator"`
Value any `json:"value"`
}
RetentionCondition defines a condition for retention
type RetentionPolicy ¶
type RetentionPolicy struct {
DefaultRetention time.Duration `json:"default_retention"`
TypeRetention map[PrivacyEvidenceType]time.Duration `json:"type_retention"`
AutoCleanup bool `json:"auto_cleanup"`
ArchiveLocation string `json:"archive_location"`
}
RetentionPolicy represents a data retention policy
type RetryConfig ¶
type RetryConfig struct {
MaxAttempts int `json:"max_attempts"`
Delay time.Duration `json:"delay"`
BackoffMode BackoffMode `json:"backoff_mode"`
MaxDelay time.Duration `json:"max_delay"`
}
RetryConfig defines retry behavior
type RiskAssessment ¶
type RiskAssessment struct {
OverallRisk string `json:"overall_risk"`
RiskFactors []RiskFactor `json:"risk_factors"`
Mitigations []string `json:"mitigations"`
LastUpdated time.Time `json:"last_updated"`
Metadata map[string]any `json:"metadata"`
}
RiskAssessment represents a privacy risk assessment
type RiskFactor ¶
type RiskFactor struct {
Type string `json:"type"`
Severity Severity `json:"severity"`
Description string `json:"description"`
Impact string `json:"impact"`
Likelihood string `json:"likelihood"`
Metadata map[string]any `json:"metadata"`
}
RiskFactor represents a privacy risk factor
type RollbackConfig ¶
type RollbackConfig struct {
Enabled bool `json:"enabled"`
Trigger string `json:"trigger"`
Actions []*PhaseAction `json:"actions"`
Timeout time.Duration `json:"timeout"`
Validation bool `json:"validation"`
}
RollbackConfig defines rollback behavior
type RuleSeverity ¶
type RuleSeverity = Severity
RuleSeverity is an alias for Severity for rule contexts
type SOC2Category ¶
type SOC2Category string
SOC2Category represents the five SOC 2 trust service categories
const ( SOC2SecurityCategory SOC2Category = "security" AvailabilityCategory SOC2Category = "availability" ProcessingIntegrityCategory SOC2Category = "processing_integrity" ConfidentialityCategory SOC2Category = "confidentiality" PrivacyCategory SOC2Category = "privacy" )
type SOC2ComplianceReport ¶
type SOC2ComplianceReport struct {
TotalTests int
PassedTests int
FailedTests int
OverallCompliance bool
Summary string
Results []SOC2TestResult
GeneratedAt time.Time
}
SOC2ComplianceReport represents a SOC2 compliance report
type SOC2ComplianceTester ¶
type SOC2ComplianceTester struct {
// contains filtered or unexported fields
}
SOC2ComplianceTester provides SOC2 compliance testing capabilities
func NewSOC2ComplianceTester ¶
func NewSOC2ComplianceTester(app any) *SOC2ComplianceTester
NewSOC2ComplianceTester creates a new SOC2 compliance tester
func (*SOC2ComplianceTester) CollectControlEvidence ¶
func (tester *SOC2ComplianceTester) CollectControlEvidence(ctx context.Context) (*ControlEvidence, error)
CollectControlEvidence collects evidence for SOC2 controls
func (*SOC2ComplianceTester) TestAvailabilityControls ¶
func (tester *SOC2ComplianceTester) TestAvailabilityControls(ctx context.Context) error
TestAvailabilityControls tests system availability controls
func (*SOC2ComplianceTester) TestConfidentialityControls ¶
func (tester *SOC2ComplianceTester) TestConfidentialityControls(ctx context.Context) error
TestConfidentialityControls tests data confidentiality controls
func (*SOC2ComplianceTester) TestPrivacyControls ¶
func (tester *SOC2ComplianceTester) TestPrivacyControls(ctx context.Context) error
TestPrivacyControls tests privacy controls
func (*SOC2ComplianceTester) TestProcessingIntegrity ¶
func (tester *SOC2ComplianceTester) TestProcessingIntegrity(ctx context.Context) error
TestProcessingIntegrity tests data processing integrity controls
func (*SOC2ComplianceTester) TestSecurityControls ¶
func (tester *SOC2ComplianceTester) TestSecurityControls(ctx context.Context) error
TestSecurityControls tests security controls implementation
type SOC2Control ¶
type SOC2Control struct {
ID string `json:"id"`
Category SOC2Category `json:"category"`
Description string `json:"description"`
Criteria []ControlCriteria `json:"criteria"`
Tests []ControlTest `json:"tests"`
Evidence []EvidenceRequirement `json:"evidence"`
Frequency TestFrequency `json:"frequency"`
Status ControlStatus `json:"status"`
}
SOC2Control represents a SOC 2 control requirement
type SOC2Criteria ¶
type SOC2Criteria string
SOC2Criteria represents SOC2 Trust Service Criteria
const ( SOC2Security SOC2Criteria = "security" SOC2Availability SOC2Criteria = "availability" SOC2ProcessingIntegrity SOC2Criteria = "processing_integrity" SOC2Confidentiality SOC2Criteria = "confidentiality" SOC2Privacy SOC2Criteria = "privacy" )
type SOC2Reporter ¶
type SOC2Reporter struct{}
SOC2Reporter generates SOC2 compliance reports
func NewSOC2Reporter ¶
func NewSOC2Reporter() *SOC2Reporter
NewSOC2Reporter creates a new SOC2 reporter
func (*SOC2Reporter) GenerateComplianceReport ¶
func (reporter *SOC2Reporter) GenerateComplianceReport(results []SOC2TestResult) (*SOC2ComplianceReport, error)
GenerateComplianceReport generates a SOC2 compliance report
type SOC2TestCase ¶
type SOC2TestCase struct {
Name string
Criteria SOC2Criteria
Description string
TestFunc func(ctx context.Context, tester *SOC2ComplianceTester) error
}
SOC2TestCase represents a SOC2 compliance test case
type SOC2TestResult ¶
type SOC2TestResult struct {
TestCase SOC2TestCase
Success bool
Duration time.Duration
Timestamp time.Time
Error string
}
SOC2TestResult represents the result of a SOC2 test
type SOC2TypeIICompliance ¶
type SOC2TypeIICompliance struct {
// contains filtered or unexported fields
}
SOC2TypeIICompliance provides comprehensive SOC 2 Type II compliance validation
func NewSOC2TypeIICompliance ¶
func NewSOC2TypeIICompliance(auditPeriod time.Duration) *SOC2TypeIICompliance
NewSOC2TypeIICompliance creates a new SOC 2 Type II compliance framework
func (*SOC2TypeIICompliance) ValidateCompliance ¶
func (s *SOC2TypeIICompliance) ValidateCompliance(ctx context.Context, app *lift.App) (*ComplianceReport, error)
ValidateCompliance performs comprehensive SOC 2 Type II compliance validation
type SafeguardConfig ¶
type SafeguardConfig struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Requirements []string `json:"requirements"`
Effectiveness string `json:"effectiveness"`
Metadata map[string]any `json:"metadata"`
}
SafeguardConfig configures transfer safeguards
type SamplingConfig ¶
type SamplingConfig struct {
Rate float64 `json:"rate"`
MaxPerSecond int `json:"max_per_second"`
Rules []*SamplingRule `json:"rules"`
}
SamplingConfig defines sampling configuration
type SamplingRule ¶
type SamplingRule struct {
Service string `json:"service"`
Operation string `json:"operation"`
Rate float64 `json:"rate"`
MaxTraces int `json:"max_traces"`
}
SamplingRule defines sampling rule
type ScalabilityResults ¶
type ScalabilityResults struct {
MaxConcurrentUsers int `json:"max_concurrent_users"`
BreakingPoint int `json:"breaking_point"`
ScalabilityFactor float64 `json:"scalability_factor"`
BottleneckAnalysis string `json:"bottleneck_analysis"`
}
ScalabilityResults defines scalability test results
type ScenarioType ¶
type ScenarioType string
ScenarioType defines types of game day scenarios
const ( DisasterRecoveryScenario ScenarioType = "disaster_recovery" SecurityIncidentScenario ScenarioType = "security_incident" PerformanceScenario ScenarioType = "performance" ComplianceScenario ScenarioType = "compliance" IntegrationScenario ScenarioType = "integration" )
type ScheduledJob ¶
type ScheduledJob struct {
ID string `json:"id"`
Monitor string `json:"monitor"`
Frequency time.Duration `json:"frequency"`
NextRun time.Time `json:"next_run"`
LastRun time.Time `json:"last_run"`
Status JobStatus `json:"status"`
}
ScheduledJob represents a scheduled monitoring job
type SchemaDefinition ¶
type SchemaDefinition struct {
Type string `json:"type"`
Properties map[string]*SchemaProperty `json:"properties,omitempty"`
Required []string `json:"required,omitempty"`
MinLength *int `json:"min_length,omitempty"`
MaxLength *int `json:"max_length,omitempty"`
Minimum *float64 `json:"minimum,omitempty"`
Maximum *float64 `json:"maximum,omitempty"`
Pattern string `json:"pattern,omitempty"`
Format string `json:"format,omitempty"`
Items *SchemaDefinition `json:"items,omitempty"`
Enum []any `json:"enum,omitempty"`
Description string `json:"description,omitempty"`
}
SchemaDefinition defines a JSON schema for validation
type SchemaProperty ¶
type SchemaProperty struct {
Type string `json:"type"`
Required bool `json:"required"`
MinLength *int `json:"min_length,omitempty"`
MaxLength *int `json:"max_length,omitempty"`
Minimum *float64 `json:"minimum,omitempty"`
Maximum *float64 `json:"maximum,omitempty"`
Pattern string `json:"pattern,omitempty"`
Format string `json:"format,omitempty"`
Items *SchemaProperty `json:"items,omitempty"`
Enum []any `json:"enum,omitempty"`
Description string `json:"description,omitempty"`
}
SchemaProperty defines a property in a JSON schema
type SectionType ¶
type SectionType string
SectionType represents different types of report sections
const ( SummarySection SectionType = "summary" DetailSection SectionType = "detail" EvidenceSection SectionType = "evidence" RecommendationSection SectionType = "recommendation" )
type SecurityCategory ¶
type SecurityCategory string
SecurityCategory represents general security categories
const ( DataProtectionSecurity SecurityCategory = "data_protection" AccessControlSecurity SecurityCategory = "access_control" EncryptionSecurity SecurityCategory = "encryption" NetworkSecurity SecurityCategory = "network" ApplicationSecurity SecurityCategory = "application" InfrastructureSecurity SecurityCategory = "infrastructure" IdentityManagementSecurity SecurityCategory = "identity_management" IncidentResponseSecurity SecurityCategory = "incident_response" )
type SecurityConfig ¶
type SecurityConfig struct {
RequireApproval bool `json:"require_approval"`
ApprovedTargets []string `json:"approved_targets"`
ForbiddenTargets []string `json:"forbidden_targets"`
MaxSeverity string `json:"max_severity"`
AuditLogging bool `json:"audit_logging"`
EncryptionEnabled bool `json:"encryption_enabled"`
}
SecurityConfig configures security settings
type SecurityControl ¶
type SecurityControl struct {
ControlID string
Name string
Description string
Implementation string
Effectiveness string
TestDate time.Time
}
SecurityControl represents a security control
type SelectionMode ¶
type SelectionMode string
SelectionMode defines target selection mode
const ( SelectionModeAll SelectionMode = "all" SelectionModeOne SelectionMode = "one" SelectionModeFixed SelectionMode = "fixed" SelectionModePercent SelectionMode = "percent" SelectionModeRandom SelectionMode = "random" )
type ServiceContract ¶
type ServiceContract struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
Provider ServiceInfo `json:"provider"`
Consumer ServiceInfo `json:"consumer"`
Status ContractStatus `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Interactions []ContractInteraction `json:"interactions"`
Metadata map[string]any `json:"metadata"`
}
ServiceContract represents a service contract
type ServiceDefinition ¶
type ServiceDefinition struct {
Name string `json:"name"`
Version string `json:"version"`
BaseURL string `json:"base_url"`
}
ServiceDefinition represents a service definition for contracts
type ServiceFaultConfig ¶
type ServiceFaultConfig struct {
ServiceName string `json:"service_name"`
BaseURL string `json:"base_url"`
DefaultTimeout time.Duration `json:"default_timeout"`
ErrorRates map[string]float64 `json:"error_rates"`
LatencyProfiles map[string]any `json:"latency_profiles"`
}
ServiceFaultConfig configures service fault injection
type ServiceFaultInjector ¶
type ServiceFaultInjector struct {
// contains filtered or unexported fields
}
ServiceFaultInjector injects service-level faults
func NewServiceFaultInjector ¶
func NewServiceFaultInjector(config *ServiceFaultConfig) *ServiceFaultInjector
func (*ServiceFaultInjector) Inject ¶
func (sfi *ServiceFaultInjector) Inject(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
func (*ServiceFaultInjector) Remove ¶
func (sfi *ServiceFaultInjector) Remove(ctx context.Context, fault FaultDefinition, target ExperimentTarget) error
func (*ServiceFaultInjector) Status ¶
func (sfi *ServiceFaultInjector) Status(ctx context.Context, fault FaultDefinition, target ExperimentTarget) (FaultStatus, error)
type ServiceInfo ¶
type ServiceInfo struct {
Name string `json:"name"`
Version string `json:"version"`
BaseURL string `json:"base_url"`
Environment string `json:"environment"`
Metadata map[string]any `json:"metadata,omitempty"`
}
ServiceInfo represents service information in contracts
type ServiceMetrics ¶
type ServiceMetrics struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Type string `json:"type"`
ClusterIP string `json:"cluster_ip"`
ExternalIPs []string `json:"external_ips"`
Ports []ServicePort `json:"ports"`
EndpointCount int `json:"endpoint_count"`
RequestCount int64 `json:"request_count"`
ErrorCount int64 `json:"error_count"`
ResponseTime time.Duration `json:"response_time"`
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations"`
LastUpdated time.Time `json:"last_updated"`
}
ServiceMetrics defines service-level metrics
type ServiceMock ¶
type ServiceMock struct {
Name string
Type string
Endpoint string
Responses map[string]any
Environment string
Active bool
}
ServiceMock represents a mock service
type ServiceMockRegistry ¶
type ServiceMockRegistry struct {
// contains filtered or unexported fields
}
ServiceMockRegistry manages mock services across environments
func NewServiceMockRegistry ¶
func NewServiceMockRegistry() *ServiceMockRegistry
NewServiceMockRegistry creates a new service mock registry
func (*ServiceMockRegistry) AddMock ¶
func (s *ServiceMockRegistry) AddMock(envName string, mock ServiceMock)
AddMock adds a mock service for a specific environment
func (*ServiceMockRegistry) CleanupForEnvironment ¶
func (s *ServiceMockRegistry) CleanupForEnvironment(env *TestEnvironment) error
CleanupForEnvironment cleans up mock services for an environment
func (*ServiceMockRegistry) SetupForEnvironment ¶
func (s *ServiceMockRegistry) SetupForEnvironment(env *TestEnvironment) error
SetupForEnvironment sets up mock services for an environment
type ServicePort ¶
type ServicePort struct {
Name string `json:"name"`
Protocol string `json:"protocol"`
Port int32 `json:"port"`
TargetPort string `json:"target_port"`
NodePort int32 `json:"node_port,omitempty"`
}
ServicePort defines service port
type ServiceSelector ¶
type ServiceSelector struct {
Names []string `json:"names,omitempty"`
Types []string `json:"types,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Ports []int `json:"ports,omitempty"`
}
ServiceSelector defines service-specific selection
type ServiceUnavailableFailure ¶
type ServiceUnavailableFailure struct {
// contains filtered or unexported fields
}
ServiceUnavailableFailure represents a service unavailable failure
func (*ServiceUnavailableFailure) Cleanup ¶
func (s *ServiceUnavailableFailure) Cleanup() error
func (*ServiceUnavailableFailure) Duration ¶
func (s *ServiceUnavailableFailure) Duration() time.Duration
func (*ServiceUnavailableFailure) IsActive ¶
func (s *ServiceUnavailableFailure) IsActive() bool
func (*ServiceUnavailableFailure) Severity ¶
func (s *ServiceUnavailableFailure) Severity() ChaosSeverity
func (*ServiceUnavailableFailure) Type ¶
func (s *ServiceUnavailableFailure) Type() string
type ServiceUnavailableScenario ¶
type ServiceUnavailableScenario struct {
// contains filtered or unexported fields
}
ServiceUnavailableScenario makes a service unavailable
func NewServiceUnavailableScenario ¶
func NewServiceUnavailableScenario(serviceName string, duration time.Duration) *ServiceUnavailableScenario
NewServiceUnavailableScenario creates a service unavailable scenario
func (*ServiceUnavailableScenario) Description ¶
func (s *ServiceUnavailableScenario) Description() string
func (*ServiceUnavailableScenario) ExecuteOperations ¶
func (s *ServiceUnavailableScenario) ExecuteOperations(ctx context.Context) ([]OperationResult, error)
func (*ServiceUnavailableScenario) InjectFailure ¶
func (s *ServiceUnavailableScenario) InjectFailure(ctx context.Context) (ChaosFailure, error)
func (*ServiceUnavailableScenario) Name ¶
func (s *ServiceUnavailableScenario) Name() string
func (*ServiceUnavailableScenario) ValidateRecovery ¶
func (s *ServiceUnavailableScenario) ValidateRecovery(ctx context.Context, metrics *ChaosMetrics) error
type ServiceValidator ¶
type ServiceValidator struct{}
ServiceValidator validates external service connectivity
func (*ServiceValidator) Name ¶
func (s *ServiceValidator) Name() string
func (*ServiceValidator) Validate ¶
func (s *ServiceValidator) Validate(env *TestEnvironment) error
type Severity ¶
type Severity string
Severity represents the severity level of issues, alerts, and violations
type StressChaosController ¶
type StressChaosController struct {
// contains filtered or unexported fields
}
StressChaosController implements resource stress testing
func NewStressChaosController ¶
func NewStressChaosController(config *KubernetesConfig) *StressChaosController
func (*StressChaosController) Cleanup ¶
func (s *StressChaosController) Cleanup(ctx context.Context) error
func (*StressChaosController) CreateChaosExperiment ¶
func (s *StressChaosController) CreateChaosExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
func (*StressChaosController) GetName ¶
func (s *StressChaosController) GetName() string
Add Cleanup method to StressChaosController
func (*StressChaosController) GetSupportedFaults ¶
func (s *StressChaosController) GetSupportedFaults() []FaultType
func (*StressChaosController) GetType ¶
func (s *StressChaosController) GetType() ChaosControllerType
func (*StressChaosController) Initialize ¶
func (s *StressChaosController) Initialize(ctx context.Context, config *KubernetesConfig) error
func (*StressChaosController) MonitorExperiment ¶
func (s *StressChaosController) MonitorExperiment(ctx context.Context, experimentID string) (*ExperimentStatusInfo, error)
func (*StressChaosController) StopExperiment ¶
func (s *StressChaosController) StopExperiment(ctx context.Context, experimentID string) error
func (*StressChaosController) ValidateSpec ¶
func (s *StressChaosController) ValidateSpec(spec *ChaosExperimentSpec) error
type StressInjector ¶
type StressInjector any
type SuccessCriteria ¶
type SuccessCriteria struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Type CriteriaType `json:"type"`
Target any `json:"target"`
Actual any `json:"actual"`
Met bool `json:"met"`
Weight float64 `json:"weight"`
Metadata map[string]any `json:"metadata"`
}
SuccessCriteria defines success criteria for game day
type TargetScope ¶
type TargetScope string
TargetScope defines the scope of experiment targets
const ( SingleScope TargetScope = "single" MultipleScope TargetScope = "multiple" ClusterScope TargetScope = "cluster" RegionScope TargetScope = "region" )
const (
SingleInstanceScope TargetScope = "single_instance"
)
Target scopes (additional to existing ones)
type TargetSelector ¶
type TargetSelector struct {
LabelSelector map[string]string `json:"label_selector"`
FieldSelector map[string]string `json:"field_selector"`
NamespaceSelector map[string]string `json:"namespace_selector"`
NodeSelector map[string]string `json:"node_selector"`
PodSelector *PodSelector `json:"pod_selector,omitempty"`
ServiceSelector *ServiceSelector `json:"service_selector,omitempty"`
Mode SelectionMode `json:"mode"`
Value string `json:"value,omitempty"`
}
TargetSelector defines target selection criteria
type Test ¶
type Test struct {
Name string
Description string
Function func(ctx context.Context) error
Timeout time.Duration
Retries int
Tags []string
}
Test represents a single test
type TestCase ¶
type TestCase struct {
Name string
Description string
Setup func(*EnterpriseTestApp, *TestEnvironment) error
Execute func(*EnterpriseTestApp, *TestEnvironment) error
Teardown func(*EnterpriseTestApp, *TestEnvironment) error
Timeout time.Duration
Retries int
}
TestCase represents a test case that can be executed across environments
type TestConfig ¶
type TestConfig struct {
Timeout time.Duration `json:"timeout"`
Retries int `json:"retries"`
Parallel bool `json:"parallel"`
Environment string `json:"environment"`
Parameters map[string]any `json:"parameters"`
Prerequisites []string `json:"prerequisites"`
Cleanup bool `json:"cleanup"`
}
TestConfig represents configuration for tests
type TestEnvironment ¶
type TestEnvironment struct {
Name string
Config EnvironmentConfig
Resources map[string]any
State EnvironmentState
Validators []EnvironmentValidator
// contains filtered or unexported fields
}
TestEnvironment represents a testing environment configuration
type TestExecutor ¶
type TestExecutor struct {
// contains filtered or unexported fields
}
TestExecutor executes performance tests
func NewTestExecutor ¶
func NewTestExecutor() *TestExecutor
NewTestExecutor creates a new test executor
type TestFrequency ¶
type TestFrequency string
TestFrequency defines how often tests should be performed
const ( ContinuousFrequency TestFrequency = "continuous" DailyFrequency TestFrequency = "daily" WeeklyFrequency TestFrequency = "weekly" MonthlyFrequency TestFrequency = "monthly" QuarterlyFrequency TestFrequency = "quarterly" AnnualFrequency TestFrequency = "annual" )
type TestReport ¶
type TestReport struct {
ID string `json:"id"`
Name string `json:"name"`
SuiteName string `json:"suite_name"`
Type ReportType `json:"type"`
Format ReportFormat `json:"format"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
TotalTests int `json:"total_tests"`
PassedTests int `json:"passed_tests"`
FailedTests int `json:"failed_tests"`
SkippedTests int `json:"skipped_tests"`
TestResults []*TestResult `json:"test_results"`
Summary *TestSummary `json:"summary"`
Metadata map[string]any `json:"metadata"`
GeneratedAt time.Time `json:"generated_at"`
}
TestReport represents a comprehensive test report
type TestResult ¶
type TestResult struct {
TestID string `json:"test_id"`
Name string `json:"name"`
Status TestStatus `json:"status"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
Passed bool `json:"passed"`
Error error `json:"error,omitempty"`
Errors []string `json:"errors"`
Warnings []string `json:"warnings"`
Metrics map[string]any `json:"metrics"`
Metadata map[string]any `json:"metadata"`
}
TestResult represents the result of a test execution
type TestSuite ¶
type TestSuite struct {
Name string
Description string
Tests []Test
Setup func() error
Teardown func() error
Parallel bool
Timeout time.Duration
Environment string
}
TestSuite represents a comprehensive test suite
type TestSummary ¶
type TestSummary struct {
TotalTests int `json:"total_tests"`
PassedTests int `json:"passed_tests"`
FailedTests int `json:"failed_tests"`
SkippedTests int `json:"skipped_tests"`
SuccessRate float64 `json:"success_rate"`
TotalDuration time.Duration `json:"total_duration"`
AverageDuration time.Duration `json:"average_duration"`
}
TestSummary provides a summary of test results
type ThroughputResults ¶
type ThroughputResults struct {
RequestsPerSecond float64 `json:"requests_per_second"`
BytesPerSecond int64 `json:"bytes_per_second"`
Peak float64 `json:"peak"`
Average float64 `json:"average"`
Minimum float64 `json:"minimum"`
}
ThroughputResults defines throughput metrics
type TimeChaosController ¶
type TimeChaosController struct {
// contains filtered or unexported fields
}
TimeChaosController implements time-based chaos scenarios
func NewTimeChaosController ¶
func NewTimeChaosController(config *KubernetesConfig) *TimeChaosController
func (*TimeChaosController) Cleanup ¶
func (t *TimeChaosController) Cleanup(ctx context.Context) error
func (*TimeChaosController) CreateChaosExperiment ¶
func (t *TimeChaosController) CreateChaosExperiment(ctx context.Context, spec *ChaosExperimentSpec) (*ChaosExperimentResult, error)
func (*TimeChaosController) GetName ¶
func (t *TimeChaosController) GetName() string
Add Cleanup method to TimeChaosController
func (*TimeChaosController) GetSupportedFaults ¶
func (t *TimeChaosController) GetSupportedFaults() []FaultType
func (*TimeChaosController) GetType ¶
func (t *TimeChaosController) GetType() ChaosControllerType
func (*TimeChaosController) Initialize ¶
func (t *TimeChaosController) Initialize(ctx context.Context, config *KubernetesConfig) error
func (*TimeChaosController) MonitorExperiment ¶
func (t *TimeChaosController) MonitorExperiment(ctx context.Context, experimentID string) (*ExperimentStatusInfo, error)
func (*TimeChaosController) StopExperiment ¶
func (t *TimeChaosController) StopExperiment(ctx context.Context, experimentID string) error
func (*TimeChaosController) ValidateSpec ¶
func (t *TimeChaosController) ValidateSpec(spec *ChaosExperimentSpec) error
type TimeManager ¶
type TimeManager any
type TimeRangeConfig ¶
TimeRangeConfig defines time range configuration
type Toleration ¶
type Toleration struct {
Key string `json:"key"`
Operator string `json:"operator"`
Value string `json:"value"`
Effect string `json:"effect"`
}
Toleration defines pod scheduling tolerations
type TopologyType ¶
type TopologyType string
TopologyType defines network topology types
const ( TopologyTypeMesh TopologyType = "mesh" TopologyTypeStar TopologyType = "star" TopologyTypeRing TopologyType = "ring" TopologyTypeTree TopologyType = "tree" TopologyTypeHybrid TopologyType = "hybrid" TopologyTypeHierarchical TopologyType = "hierarchical" )
type TraceConfig ¶
type TraceConfig struct {
Enabled bool `json:"enabled"`
Sampling float64 `json:"sampling"`
Endpoint string `json:"endpoint"`
Headers map[string]string `json:"headers"`
Timeout time.Duration `json:"timeout"`
BatchSize int `json:"batch_size"`
}
TraceConfig defines trace collection configuration
type TrafficController ¶
type TrafficController any
type TransferMechanism ¶
type TransferMechanism string
TransferMechanism represents data transfer mechanisms
const ( AdequacyDecision TransferMechanism = "adequacy_decision" StandardClauses TransferMechanism = "standard_clauses" BindingRules TransferMechanism = "binding_rules" Certification TransferMechanism = "certification" CodeOfConduct TransferMechanism = "code_of_conduct" )
type TransferMechanismConfig ¶
type TransferMechanismConfig struct {
ID string `json:"id"`
Name string `json:"name"`
Type TransferMechanism `json:"type"`
Requirements []string `json:"requirements"`
Validity time.Duration `json:"validity"`
Automated bool `json:"automated"`
Metadata map[string]any `json:"metadata"`
}
TransferMechanismConfig configures transfer mechanisms
type TransferValidationResult ¶
type TransferValidationResult struct {
TransferID string `json:"transfer_id"`
Valid bool `json:"valid"`
Issues []string `json:"issues"`
Timestamp time.Time `json:"timestamp"`
}
TransferValidationResult represents transfer validation results
type TransferValidator ¶
type TransferValidator struct {
// contains filtered or unexported fields
}
TransferValidator validates cross-border data transfers
func NewTransferValidator ¶
func NewTransferValidator() *TransferValidator
NewTransferValidator creates a new transfer validator
func (*TransferValidator) ValidateTransfer ¶
func (tv *TransferValidator) ValidateTransfer(ctx context.Context, transfer *DataTransfer) (*TransferValidationResult, error)
ValidateTransfer validates a data transfer
type ValidationCheck ¶
type ValidationCheck struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Status string `json:"status"`
Valid bool `json:"valid"`
Expected any `json:"expected"`
Actual any `json:"actual"`
Errors []string `json:"errors"`
Warnings []string `json:"warnings"`
Metadata map[string]any `json:"metadata"`
}
ValidationCheck represents a single validation check
type ValidationConfig ¶
type ValidationConfig struct {
StrictMode bool `json:"strict_mode"`
Timeout time.Duration `json:"timeout"`
MaxErrors int `json:"max_errors"`
FailFast bool `json:"fail_fast"`
ValidateHeaders bool `json:"validate_headers"`
ValidateBody bool `json:"validate_body"`
}
ValidationConfig configures contract validation
type ValidationMetrics ¶
type ValidationMetrics struct {
TotalValidations int64 `json:"total_validations"`
SuccessfulValidations int64 `json:"successful_validations"`
FailedValidations int64 `json:"failed_validations"`
AverageTime time.Duration `json:"average_time"`
LastValidation time.Time `json:"last_validation"`
}
ValidationMetrics tracks validation performance
type ValidationProcessor ¶
type ValidationProcessor interface {
Process(ctx context.Context, app *lift.App, rule ValidationRule) (*ValidationResult, error)
}
ValidationProcessor processes validation rules
type ValidationResult ¶
type ValidationResult struct {
RuleID string `json:"rule_id"`
Status ValidationStatus `json:"status"`
Message string `json:"message"`
Details map[string]any `json:"details"`
Timestamp time.Time `json:"timestamp"`
}
ValidationResult represents the result of a validation
type ValidationRule ¶
type ValidationRule struct {
ID string `json:"id"`
Framework string `json:"framework"`
Category string `json:"category"`
Description string `json:"description"`
Severity ValidationSeverity `json:"severity"`
Parameters map[string]any `json:"parameters"`
}
ValidationRule defines a compliance validation rule
type ValidationSeverity ¶
type ValidationSeverity = Severity
ValidationSeverity is an alias for Severity for validation contexts
type ValidationStatus ¶
type ValidationStatus string
ValidationStatus represents validation result status
type ValidationSummary ¶
type ValidationSummary struct {
TotalInteractions int `json:"total_interactions"`
ValidInteractions int `json:"valid_interactions"`
InvalidInteractions int `json:"invalid_interactions"`
TotalChecks int `json:"total_checks"`
PassedChecks int `json:"passed_checks"`
FailedChecks int `json:"failed_checks"`
SuccessRate float64 `json:"success_rate"`
}
ValidationSummary represents a summary of validation results
type ValidationViolation ¶
type ValidationViolation struct {
RuleID string `json:"rule_id"`
Severity Severity `json:"severity"`
Message string `json:"message"`
Field string `json:"field"`
Value any `json:"value"`
Expected any `json:"expected"`
Metadata map[string]any `json:"metadata"`
}
ValidationViolation represents a validation violation
type ValidationWarning ¶
type ValidationWarning struct {
Message string `json:"message"`
Field string `json:"field"`
Metadata map[string]any `json:"metadata"`
}
ValidationWarning represents a validation warning
type ViolationSeverity ¶
type ViolationSeverity string
ViolationSeverity defines violation severity
const ( ViolationSeverityLow ViolationSeverity = "low" ViolationSeverityMedium ViolationSeverity = "medium" ViolationSeverityHigh ViolationSeverity = "high" ViolationSeverityCritical ViolationSeverity = "critical" )
type WatchManager ¶
type WatchManager struct{}
type WebhookClientConfig ¶
type WebhookClientConfig struct {
Service *WebhookService `json:"service,omitempty"`
URL *string `json:"url,omitempty"`
CABundle []byte `json:"ca_bundle,omitempty"`
}
WebhookClientConfig defines webhook client configuration
type WebhookRule ¶
type WebhookRule struct {
Operations []string `json:"operations"`
APIGroups []string `json:"api_groups"`
APIVersions []string `json:"api_versions"`
Resources []string `json:"resources"`
}
WebhookRule defines webhook rule
type WebhookService ¶
type WebhookService struct {
Namespace string `json:"namespace"`
Name string `json:"name"`
Path string `json:"path"`
Port int32 `json:"port"`
}
WebhookService defines webhook service
type WebhookType ¶
type WebhookType string
WebhookType defines webhook types
const ( ValidatingWebhookType WebhookType = "validating" MutatingWebhookType WebhookType = "mutating" )
type WidgetType ¶
type WidgetType string
WidgetType represents different types of dashboard widgets
const ( ChartWidget WidgetType = "chart" MetricWidget WidgetType = "metric" TableWidget WidgetType = "table" AlertWidget WidgetType = "alert" StatusWidget WidgetType = "status" )
type WorkerStatus ¶
type WorkerStatus string
WorkerStatus defines worker status
const ( IdleWorker WorkerStatus = "idle" BusyWorker WorkerStatus = "busy" StoppedWorker WorkerStatus = "stopped" ErrorWorker WorkerStatus = "error" )