Comments (6)
backwards compatible version, separate interface
seems like a safe harbor
from sdk-go.
I have a rethink on the solution to this: "Ready" is a very transport-specific concept, some transports might not even have such a phase. So instead of adding this to the Tranport interface, I propose to update the HTTP transport (and any others with similar issues) as follows:
l := net.Listen(...)
transport := http.New(WithListener(l))
That gives the user full control (if they wish) over the listener, including the ability to get a Listen(":0") address from l.Addr(). It also allows listening on specific interfaces on a multi-homed host (which is currently impossible) and listening specifically for tpc6 or tcp4 trafic. And it is backwards compatible :)
We'd want to encourage something similar on any transport that uses a listener, I'll have a look at the existing ones.
from sdk-go.
you can already give port 0 in http options.
Let me look more at this...
from sdk-go.
from sdk-go.
I wonder if this is a time to introduce message channels that can be passed to the transport via options. An error channel and an fyi channel? (in addition to the PR you have pending).
Then the FYI channel could send a transport state update messages. (Ready, Failed, restarting...?)
from sdk-go.
from sdk-go.
Related Issues (20)
- Errors from event handler are swallowed and never logged
- Infinite loop on AMQP disconnect HOT 3
- `protocol.go.swp` file for http protocol? HOT 4
- Feature: Expose pubsub PublishSettings along with ReceiveSettings
- Panic on Kafka IP change HOT 7
- NATS Jetstream optimistic concurrency headers HOT 2
- Memory leak in the confluent kafka producer
- Race condition in func WithCustomAttributes(ctx context.Context, attrs map[string]string)
- Support new JetStream API
- Create CODE OWNERS file for reviewers
- Support https://github.com/Azure/go-amqp stable version HOT 3
- Cloud Events HTTP Client Read/Write Timeout is Not Configurable
- Add sql HasPrefix and HasSuffix string functions HOT 11
- Expose AddFunction API for CESQL Parser HOT 5
- Improve CESQL LIKE expression implementation HOT 1
- Propose adding receiver transformer for message queue protocols
- Adding a sample command for mqtt samples
- BUG: invalid CE prefix in Confluent Kafka binding implementation
- Context issue when using protocol's incoming channel with gin framework
- The `content-type` for the MQTT protocol might have been set multiple times
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdk-go.