Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: scor2k/go-vector-logger

Tags

v0.8.0

Toggle v0.8.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: Implement TCP connection idle timeout (#12)

* feat: Implement TCP connection idle timeout

This commit introduces an idle timeout for TCP connections in the VectorLogger.
Connections will now automatically close after one minute of inactivity.

Changes include:
- Added `lastActivityTime`, `TimeoutDuration`, `mu`, `stopChan`, and `wg` fields to `VectorLogger`.
- Modified `New()` to initialize these fields and launch a proactive connection management goroutine.
- Updated `send()` to check for idle connections before sending, re-establish if necessary, and update `lastActivityTime`.
- The proactive goroutine (`manageConnection`) periodically checks for idle connections and closes them.
- `Close()` method now gracefully stops the `manageConnection` goroutine using a channel and `sync.WaitGroup`, and ensures thread-safe connection closing.
- Added unit tests in `logger_test.go` to verify:
    - Connection timeout and automatic reconnection.
    - Frequent logging keeps the connection alive.
    - `Close()` method correctly stops the background goroutine and closes the connection.
- The `TimeoutDuration` field is exported to allow tests to set shorter timeout values.

* docs: add changelog for version 0.8.0

- Add comprehensive release notes for v0.8.0
- Document new TCP connection idle timeout management
- List improvements in connection handling and error recovery
- Include new testing infrastructure and example application
- Note breaking changes and bug fixes from v0.7.0

* feat: 0.8.0 version

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

v0.7.2

Toggle v0.7.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: change module name (#11)

Co-authored-by: Serhii Kushnir <[email protected]>

v0.7.1

Toggle v0.7.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: re-write the code to handle persistent connections (#10)

* feat: remove deprecation part

* feat: add test app and bash script to start vector

* chore: update readme and go.mod to handle local run

* fix: revert all changes with buffers to fix the lib

* chore: improve error messages

* feat: add persist connection

* feat: add re-connect

v0.7.0

Toggle v0.7.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Make TCP timeout configurable via Options, defaulting to 1 second (#9)

- Persistent TCP connection with idle timeout and TCP connection timeout support.
- Graceful shutdown and draining of log messages.

v0.6.0

Toggle v0.6.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: add fatal log message (#8)

* feat: add fatal log message

* fix: readme and FatalError

---------

Co-authored-by: Serhii Kushnir <[email protected]>

v0.5.0

Toggle v0.5.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #7 from rgeoghegan/output-to-writer

feat: Let you specify different output

v0.4.0

Toggle v0.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #6 from scor2k/warn-level

feat: added warn level and did a refactoring

v0.3.0

Toggle v0.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #5 from scor2k/scor2k/formatted-output

feat: formatted output

v0.2.0

Toggle v0.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #4 from scor2k/AK/clean-up

fix: remove instance from the Init function

v0.1.0

Toggle v0.1.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #3 from scor2k/scor2k/rename

fix: rename repo