Skip to content

cmd: add visus node list subcommand with heartbeat#254

Merged
sravotto merged 1 commit into
mainfrom
sr8_node_cmd
Mar 17, 2026
Merged

cmd: add visus node list subcommand with heartbeat#254
sravotto merged 1 commit into
mainfrom
sr8_node_cmd

Conversation

@sravotto
Copy link
Copy Markdown
Contributor

On startup, the server registers itself in the node table and schedules a 1-minute heartbeat job. On graceful shutdown the node deregisters itself.

The visus node list command displays ID, HOSTNAME, PID, VERSION, UPDATED columns for all registered nodes.

@sravotto sravotto marked this pull request as ready for review March 16, 2026 19:14
@sravotto sravotto requested a review from BramGruneir March 16, 2026 19:15
@BramGruneir
Copy link
Copy Markdown

LGTM, with two comments

"github.com/cockroachlabs/visus/internal/store"
"github.com/go-co-op/gocron"
"github.com/google/uuid"
"github.com/pkg/errors"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

please use "github.com/cockroachdb/errors" instead of pkg/errors

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm using pkg/errors in this repo... filed #256


// TestCommands verifies the behavior of each CLI command.
func TestCommands(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just note that this if 5 seconds for all the tests, not a test-by-test basis

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

On startup, the server registers itself in the node table and schedules
a 1-minute heartbeat job. On graceful shutdown the node
deregisters itself.

The `visus node list` command displays ID, HOSTNAME, PID, VERSION, UPDATED
columns for all registered nodes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sravotto sravotto merged commit 9dd962f into main Mar 17, 2026
7 checks passed
@sravotto sravotto deleted the sr8_node_cmd branch March 17, 2026 16:41
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.

2 participants