Versions in this module Expand all Collapse all v0 v0.7.0 Jun 18, 2026 Changes in this version + const CodeCrash + const CodeDeadlineExceeded + const CodeInternal + const CodeInvalidArgument + const CodeNotFound + const CodePermissionDenied + const CodeResourceExhausted + const CodeUnavailable + const CodeUnknown + const POINT_BATCH_CLIENT_CANCEL_BATCH + const POINT_BATCH_CLIENT_CREATE_BATCH + const POINT_BATCH_CLIENT_GET_BATCH + const POINT_BATCH_CLIENT_LIST_BATCHES + const POINT_CONSOLE_CANCEL_JOB + const POINT_CONSOLE_CREATE_JOB + const POINT_CONSOLE_DOWNLOAD_FILE + const POINT_CONSOLE_GET_JOB + const POINT_CONSOLE_LIST_JOBS + const POINT_CONSOLE_UPLOAD_FILE + const POINT_PLANNER_CANCEL + const POINT_PLANNER_ENQUEUE + const POINT_PLANNER_PERSIST + const POINT_PLANNER_PLAN + const POINT_PLANNER_RECOVER + const POINT_PLANNER_SUBMIT_BATCH + const POINT_RM_CATALOG_LOOKUP + const POINT_RM_GET_STATUS + const POINT_RM_LIST + const POINT_RM_PROVISION + const POINT_RM_RELEASE + const POINT_STORE_GET_JOB + const POINT_STORE_GET_PROVISION + const POINT_STORE_LIST_JOBS + const POINT_STORE_UPSERT_JOB + const POINT_STORE_UPSERT_PROVISION + var DefaultRegistry map[string]*InjectionPoint + var ErrInjectorDisabled = errors.New("error injection is disabled") + var ErrInvalidMode = errors.New("invalid injector mode") + var ErrInvalidProbability = errors.New("probability must be between 0.0 and 1.0") + var ErrPointAlreadyRegistered = errors.New("injection point already registered") + var ErrPointNotFound = errors.New("injection point not found") + var ErrTraceNotFound = errors.New("trace not found") + func GetDefaultRegistry() map[string]*InjectionPoint + func ListInjectionPoints() []string + func MergePlaceholders(defaults, overrides map[string]string) map[string]string + func RenderMessage(templateStr string, data map[string]string) (string, error) + func ValidateOverrides(template *InjectionTemplate, overrides map[string]string) error + func ValidatePointID(pointID string) bool + func WithInjectionContext(ctx context.Context, cfg *InjectionConfig) context.Context + type ErrorType string + const ErrorTypeCrash + const ErrorTypeInternal + const ErrorTypeInvalidArgument + const ErrorTypeNotFound + const ErrorTypePermissionDenied + const ErrorTypeResourceExhausted + const ErrorTypeTimeout + const ErrorTypeUnavailable + type ExecutionTrace struct + EndTime time.Time + JobID string + Points []PointRecord + StartTime time.Time + func (t *ExecutionTrace) AppendPoint(record PointRecord) + func (t *ExecutionTrace) Clone() *ExecutionTrace + type GlobalInjectionConfig struct + Enabled bool + ExcludedPoints []string + GlobalProbability float64 + PointWeights map[string]float64 + Rules []InjectionRule + type InMemoryTraceStore struct + func NewInMemoryTraceStore() *InMemoryTraceStore + func NewInMemoryTraceStoreWithLimit(maxTraces int) *InMemoryTraceStore + func (s *InMemoryTraceStore) AppendPoint(jobID string, point PointRecord) error + func (s *InMemoryTraceStore) Clear() + func (s *InMemoryTraceStore) Count() int + func (s *InMemoryTraceStore) Delete(jobID string) error + func (s *InMemoryTraceStore) Get(jobID string) (*ExecutionTrace, error) + func (s *InMemoryTraceStore) List(limit int) ([]*ExecutionTrace, error) + type InjectedError struct + Code string + Details map[string]string + Message string + Type ErrorType + func RenderError(template *InjectionTemplate, overrides map[string]string) (*InjectedError, error) + func (e *InjectedError) Error() string + func (e *InjectedError) ToError() error + type InjectionConfig struct + Enabled bool + GlobalProbability float64 + JobID string + Rules []InjectionRule + func GetInjectionConfigFromContext(ctx context.Context) *InjectionConfig + type InjectionContextKey string + const InjectionKeyConfig + type InjectionPoint struct + Action string + Component string + Description string + ID string + Templates map[ErrorType]*InjectionTemplate + func GetInjectionPoint(pointID string) (*InjectionPoint, bool) + type InjectionRule struct + ErrorType ErrorType + Overrides map[string]string + PointRef string + Probability float64 + type InjectionTemplate struct + Code string + DetailsTemplate map[string]string + MessageTemplate string + Placeholders map[string]string + Type ErrorType + func GetInjectionTemplate(pointID string, errorType ErrorType) (*InjectionTemplate, bool) + type Injector interface + CheckPoint func(ctx context.Context, pointID string) error + GetGlobalConfig func() *GlobalInjectionConfig + GetTrace func(ctx context.Context, jobID string) *ExecutionTrace + RenderTemplate func(pointID string, errorType ErrorType, overrides map[string]string) (*InjectedError, error) + SetGlobalConfig func(config *GlobalInjectionConfig) error + type InjectorImpl struct + func NewInjector() (*InjectorImpl, error) + func (i *InjectorImpl) CheckPoint(ctx context.Context, pointID string) error + func (i *InjectorImpl) GetGlobalConfig() *GlobalInjectionConfig + func (i *InjectorImpl) GetPoint(pointID string) *InjectionPoint + func (i *InjectorImpl) GetTrace(ctx context.Context, jobID string) *ExecutionTrace + func (i *InjectorImpl) ListPoints() []*InjectionPoint + func (i *InjectorImpl) RenderTemplate(pointID string, errorType ErrorType, overrides map[string]string) (*InjectedError, error) + func (i *InjectorImpl) SetGlobalConfig(config *GlobalInjectionConfig) error + type PointRecord struct + ContextSnapshot map[string]string + Error *InjectedError + OverridesApplied map[string]string + PointID string + ProbabilityRoll float64 + TemplateUsed ErrorType + Timestamp time.Time + Triggered bool + type TraceStore interface + AppendPoint func(jobID string, point PointRecord) error + Delete func(jobID string) error + Get func(jobID string) (*ExecutionTrace, error) + List func(limit int) ([]*ExecutionTrace, error) v0.7.0-rc.3 Jun 17, 2026