Add current tick information to the server-status
This commit is contained in:
parent
1412579c6c
commit
3ba7652c74
5 changed files with 85 additions and 64 deletions
|
@ -12,9 +12,10 @@ import (
|
|||
// ServerStatus returns the status of the current server to a gRPC request
|
||||
func (s *Server) ServerStatus(context.Context, *rove.ServerStatusRequest) (*rove.ServerStatusResponse, error) {
|
||||
response := &rove.ServerStatusResponse{
|
||||
Ready: true,
|
||||
Version: version.Version,
|
||||
Tick: int32(s.tick),
|
||||
Ready: true,
|
||||
Version: version.Version,
|
||||
TickRate: int32(s.minutesPerTick),
|
||||
CurrentTick: int32(s.world.CurrentTicks),
|
||||
}
|
||||
|
||||
// TODO: Verify the accountant is up and ready too
|
||||
|
|
|
@ -175,7 +175,8 @@ func InnerMain(command string, args ...string) error {
|
|||
default:
|
||||
fmt.Printf("Ready: %t\n", response.Ready)
|
||||
fmt.Printf("Version: %s\n", response.Version)
|
||||
fmt.Printf("Tick: %d\n", response.Tick)
|
||||
fmt.Printf("Tick Rate: %d\n", response.TickRate)
|
||||
fmt.Printf("Current Tick: %d\n", response.CurrentTick)
|
||||
fmt.Printf("Next Tick: %s\n", response.NextTick)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue