Skip to content

Conversation

@yosebyte
Copy link
Owner

This pull request introduces updates to the NodePass project, focusing on improving logging capabilities, enhancing documentation, updating dependencies, and refining core functionality. Key changes include the addition of new log levels, updates to default connection pool capacities, and improvements to health check mechanisms.

Logging Enhancements:

  • Added two new log levels, none (disables logging) and event (logs specific events), to the initLogLevel function in cmd/nodepass/main.go. [1] [2]
  • Updated documentation to reflect the new log levels in both English (docs/en/configuration.md, docs/en/usage.md) and Chinese (docs/zh/configuration.md, docs/zh/usage.md). [1] [2] [3] [4]

Documentation Improvements:

  • Added a detailed table outlining the scope and applicability of URL query parameters for server, client, and master modes in both English (docs/en/configuration.md) and Chinese (docs/zh/configuration.md). [1] [2]
  • Enhanced the Chinese API documentation (docs/zh/api.md) with additional details on RESTful API endpoints, authentication, and instance data structures. [1] [2] [3]

Core Functionality Updates:

  • Refactored initContext to initBackground in internal/common.go for better initialization logic and added error channel handling.
  • Improved health check logic in internal/common.go by introducing PING signals and resetting connection pool errors. [1] [2]
  • Replaced commonOnce and commonQueue with a unified commonControl method for streamlined signal handling and health checks.

Dependency Updates:

  • Updated versions of conn, logs, and pool dependencies in go.mod to ensure compatibility with the latest features.
  • Added conn package import to internal/client.go and utilized TimeoutReader for improved TCP connection handling. [1] [2]

Configuration Changes:

  • Reduced the default maximum connection pool capacity from 8192 to 1024 across relevant files (internal/common.go, docs/en/configuration.md, docs/en/usage.md, docs/zh/configuration.md, docs/zh/usage.md). [1] [2] [3] [4] [5]

yosebyte added 30 commits July 16, 2025 07:57
@yosebyte yosebyte merged commit e780ec0 into yosebyte:main Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant