Skip to content

Feature request: add support for unix domain socketย #654

@AurelienRichez

Description

@AurelienRichez

Feature request: add support for unix domain socket

Just discovered the project. This looks really nice.

go grpc implementation supports unix sockets. I wanted to know if you would consider adding support in evans as well.

From what I see it is already almost working if we set as an address unix:///path/to/socket. evans already tries to connect via the unix socket protocol but the only issue seems to be that evans concatenate the port no matter what

addr := fmt.Sprintf("%s:%s", cfg.Server.Host, cfg.Server.Port)

As a consequence the file name is wrong and evans cannot connect (I guess that it could work if the socket was awkwardly named like socket:123 ๐Ÿ˜…)

I could get it to work by not adding the :<port> part if the address starts with unix://, so the fix looks simple (but there are other things to do for completeness, probably to add tests and change the prompt in the repl).

I can try to work on it and open a PR if you are interested (I'm not very familiar with go and the project itself, so if someone else is faster than me even better).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions