Comments (6)
Here's the screenshot from micro web
:
It's odd that meta has stream=false
as well.
from go-micro.
Woops, nevermind. The client itself works.
from go-micro.
Can you specify what you mean by "streaming handler's metadata is empty"?
So looks like the streaming handler does work but its incorrectly registering stream=false. The code that takes care of this uses reflection and I'm thinking perhaps a new version of Go behaves slightly differently.
If you run the client you should get this output
go run client/main.go
--- Call example ---
Call: 0 rsp: d4ebe824-0bbc-11e6-ac38-68a86d0d36b6: Hello John
Call: 1 rsp: d4ebe824-0bbc-11e6-ac38-68a86d0d36b6: Hello John
Call: 2 rsp: d4ebe824-0bbc-11e6-ac38-68a86d0d36b6: Hello John
Call: 3 rsp: d4ebe824-0bbc-11e6-ac38-68a86d0d36b6: Hello John
Call: 4 rsp: d4ebe824-0bbc-11e6-ac38-68a86d0d36b6: Hello John
Call: 5 rsp: d4ebe824-0bbc-11e6-ac38-68a86d0d36b6: Hello John
Call: 6 rsp: d4ebe824-0bbc-11e6-ac38-68a86d0d36b6: Hello John
Call: 7 rsp: d4ebe824-0bbc-11e6-ac38-68a86d0d36b6: Hello John
Call: 8 rsp: d4ebe824-0bbc-11e6-ac38-68a86d0d36b6: Hello John
Call: 9 rsp: d4ebe824-0bbc-11e6-ac38-68a86d0d36b6: Hello John
--- Streamer example ---
Stream: rsp: 0
Stream: rsp: 1
Stream: rsp: 2
Stream: rsp: 3
Stream: rsp: 4
Stream: rsp: 5
Stream: rsp: 6
Stream: rsp: 7
Stream: rsp: 8
Stream: rsp: 9
recv err EOF
stream err: <nil>
--- Ping Pong example ---
Sent ping 1 got pong 1
Sent ping 2 got pong 2
Sent ping 3 got pong 3
Sent ping 4 got pong 4
Sent ping 5 got pong 5
Sent ping 6 got pong 6
Sent ping 7 got pong 7
Sent ping 8 got pong 8
Sent ping 9 got pong 9
Sent ping 10 got pong 10
--- Publisher example ---
2016/04/26 15:40:38 Broker Listening on [::]:53925
Published: &{topic.go.micro.srv.example application/octet-stream 0xc820187ac0}
from go-micro.
@asim sorry, bad wording. I meant that the Request
and Response
helper fields are empty when trying to get the service's metadata.
Also, micro
tool can't query the streaming endpoints. I'll try to fix that.
from go-micro.
decb70b fixed metadata issue.
The micro tool can handle streams using the micro stream
command but it only supports streaming from the server. Useful for logs and events. Bidirectional streaming from the command line seems difficult given the output would be streaming to you at the same time.
from go-micro.
On the Request
and Response
being empty. Its because we use the method signature to determine what those types are. In this case, the Stream is an interface rather than a concrete type.
from go-micro.
Related Issues (20)
- [BUG] 4.10.2 subscribe can't receive pushlish message
- How can we ensure that the service node is Deregister wehn use zookeeper plugins HOT 1
- Advertise-address not work ? it is docker's ip 172.17.0.2 ??、 HOT 2
- what diffrent gateway with http example?
- How can multiple subscribers on a topic only consume once HOT 2
- [BUG]grpc client Call method bug HOT 1
- [BUG] Always show updates when creating a service (watch) HOT 1
- [BUG] Depreciation Warning: github.com/golang/protobuf HOT 1
- I haven't seen anywhere using the logger.Option.Out for write. Is this variable written here to deceive people?
- trying to send message larger than max (14547977 vs. 4194304) ? HOT 1
- panic: qtls.ConnectionState not compatible with tls.ConnectionState
- [BUG] Version V2.9.1 CLI no longer exists HOT 5
- grpc stream use async socket send, but seem use them same buffer, the newer msg seems overwrite the underlying buffer HOT 4
- Tag latest v3 changes (v3.7.2)
- [go-micro/auth.Inspect()] Is this function working? HOT 2
- how can i writter log to file? HOT 4
- [BUG]micro v4 can't register service HOT 10
- how can i pass http request headers through metadata?
- [BUG] go.micro.client.transport write: broken pipe
- [BUG] for v4.9.0 to RegisterSubscriber with Queue
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 go-micro.