anycable / anycable-go

AnyCable real-time server
https://anycable.io
MIT License
377 stars 65 forks source link

Return support for an scheme omitted IP address in RPC_HOST #199

Closed ardecvz closed 11 months ago

ardecvz commented 11 months ago

What is the purpose of this pull request?

Return support for an scheme omitted IP address in RPC_HOST

For example, 127.0.0.1:50051/anycable.

It's missing from 1.4.6 which introduced auto RPC implementation inferring from the RPC host.

What changes did you make? (overview)

Default to grpc:// scheme if omitted + test all known RPC_HOST variants + include invalid RPC_HOST to logs for better debugging: !!! RPC failed !!!, cause: unknown RPC implementation: <invalid RPC host: invalid://:+>

Is there anything you'd like reviewers to focus on?

Checklist

palkan commented 11 months ago

Thanks!