vectordotdev / vectordotdev/vector
Add `connect` mode to the `socket` source
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22.6k
- Forks
- 2.3k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 146
Description
Currently the socket source uses the specified socket address (for TCP/UDP) or path (for UDS) to create a socket with such an address and listen for connections on it.
However, in some circumstances it might be useful to not listen, but connect to sockets and read data from them.
I propose to add new configuration option, which would take two possible values, listen (the current behavior) and connect (the new mode). I'm not sure what would be the best name for the new configuration option. It could have been mode, but mode is already used to specify whether the socket is TCP/UDP/UDS.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the socket source implementation and its current TCP, UDP, and UDS listening paths. Read the configuration handling and existing source tests first, then determine how a separate option can distinguish listen from connect behavior; done means the new mode connects to each supported socket type and the current listen behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100