go-kit / kit

A standard library for microservices.
https://gokit.io
MIT License
26.53k stars 2.43k forks source link

UDP as a transport #1289

Closed AbhishekRamamurthy closed 6 months ago

AbhishekRamamurthy commented 6 months ago

What would you like?

I have a use case for IPFIX which would use UDP as transport and leverage the go-kit integration with MQs. IPFIX data carrying network stats is most commonly exported over UDP, with UDP handling in transport section we can receive/decode and move the data endpoint. From common use case perspective I feel having UDP server integration at the transport is a useful tool.

1) before -> updates the request context 2) decode -> layer can use decode the binary data to appropriate struct. 3) endpoint -> middleware for logging, enrichment and re-direct the received message to DB/MQ or pass it along as a HTTP payload. 4) after -> handle any failures at endpoint or response from endpoint.

peterbourgon commented 6 months ago

Feel free to implement a UDP transport in your own repo, if it works I'm happy to link to it from the README 😎