Giter Site home page Giter Site logo

Comments (6)

utrack avatar utrack commented on May 5, 2024

Here's the screenshot from micro web:

scrot-20160426_171905

It's odd that meta has stream=false as well.

from go-micro.

utrack avatar utrack commented on May 5, 2024

Woops, nevermind. The client itself works.

from go-micro.

asim avatar asim commented on May 5, 2024

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.

utrack avatar utrack commented on May 5, 2024

@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.

asim avatar asim commented on May 5, 2024

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.

asim avatar asim commented on May 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.