Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/public visors advertising #743

Merged

Conversation

i-hate-nicknames
Copy link
Contributor

@i-hate-nicknames i-hate-nicknames commented Apr 27, 2021

Did you run make format && make check?

Fixes #574

Changes:

On start visor registers itself in the service discovery. Visor attaches IPs of its local active network interface to the request;
If public_autoconnect field is set to true in config, visor will try to connect to 5 known visors on its start.

taras-skycoin and others added 30 commits November 18, 2020 15:42
@i-hate-nicknames
Copy link
Contributor Author

One thing I dislike is that I had to rely on callbacks in autoconnect. This is due to the reason that autoconnect needs transport manager, but importing transport manager introduces dependency cycle: transport package depends on servicedisc package.

I'm thinking about restructuring it a better way, maybe splitting some packages. Input on this subject is welcome.

@ersonp
Copy link
Contributor

ersonp commented May 6, 2021

@i-hate-nicknames I was testing out the PR and skywire-cli visor gen-config generates config for v1.1.0 and not for v1.1.1.

@i-hate-nicknames
Copy link
Contributor Author

i-hate-nicknames commented May 6, 2021

Weird, I just checked and it generated 1.1.1 for me. Is it possible that you didn't build with make build and accidentally ran an old binary?

@ersonp
Copy link
Contributor

ersonp commented May 6, 2021

make build; make install solved it. And connect_to_public_visors mentioned above. I could not find it in the config. Perhaps you meant public_autoconnect.

Copy link
Member

@jdknives jdknives left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall good work although some of the implementation details might be improvable.

pkg/servicedisc/client.go Outdated Show resolved Hide resolved
pkg/servicedisc/autoconnect.go Outdated Show resolved Hide resolved
pkg/servicedisc/autoconnect.go Outdated Show resolved Hide resolved
pkg/servicedisc/autoconnect.go Outdated Show resolved Hide resolved
pkg/servicedisc/autoconnect.go Outdated Show resolved Hide resolved
pkg/servicedisc/types.go Outdated Show resolved Hide resolved
pkg/visor/init.go Outdated Show resolved Hide resolved
pkg/servicedisc/client.go Outdated Show resolved Hide resolved
pkg/servicedisc/autoconnect.go Outdated Show resolved Hide resolved
pkg/servicedisc/autoconnect.go Outdated Show resolved Hide resolved
pkg/servicedisc/autoconnect.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alexadhy alexadhy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome code, lgtm.

@jdknives jdknives merged commit 944474c into skycoin:develop May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants