You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor!: eliminate global state and improve architecture
BREAKING CHANGES:
- Move errors package to sentinel with enhanced documentation
- Add context parameter to Get, GetWithInfo, and Count methods
- Change GetMultiple return signature for consistency
Features:
- Extract configuration constants to internal/constants package
- Replace serializer and stats collector global registries with dependency injection
- Add ItemPoolManager for thread-safe memory pool management
- Implement lazy initialization patterns to avoid package-level globals
Performance:
- Replace encoding/json with faster goccy/go-json
- Use slices.Sort instead of sort.Slice for better performance
- Optimize item size calculation with local buffers
Quality:
- Enhance error handling with ewrap throughout codebase
- Add comprehensive documentation to sentinel package
- Improve worker pool error handling
- Standardize interface organization with crud separation
This refactoring eliminates all global variables and init() functions,
improving testability, thread safety, and following Go best practices
while maintaining backward compatibility where possible.
0 commit comments