Skip to content

Commit

Permalink
Refactor locale and timezone setting
Browse files Browse the repository at this point in the history
Change locale and timezone to be signalled from admin to agent after registration.

Signed-off-by: Santtu Lakkala <[email protected]>
  • Loading branch information
slakkala committed Oct 1, 2024
1 parent 3a051fb commit 99f7d0b
Show file tree
Hide file tree
Showing 16 changed files with 804 additions and 168 deletions.
19 changes: 10 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ http = "0.2"
http-body = "0.4.2"
hyper = "0.14"
prost = "0.12"
regex = "1.11"
tokio = {version = "1.0", features = ["rt-multi-thread", "time", "macros", "fs"]}
tokio-stream = "0.1"
tokio-vsock = "0.5"
Expand Down
204 changes: 98 additions & 106 deletions api/admin/admin.pb.go

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions api/admin/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ message RegistryRequest {
}

message RegistryResponse {
string Timezone = 1;
string Locale = 2;
optional string Error = 1;
}

message ApplicationRequest {
Expand Down
271 changes: 271 additions & 0 deletions api/locale/locale.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions api/locale/locale.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2024 TII (SSRC) and the Ghaf contributors
// SPDX-License-Identifier: Apache-2.0
syntax = "proto3";
option go_package = "./locale";
package locale;

message LocaleMessage {
string Locale = 1;
}

message TimezoneMessage {
string Timezone = 1;
}

message Empty {
}

service LocaleClient {
rpc LocaleSet(LocaleMessage) returns (Empty) {}
rpc TimezoneSet(TimezoneMessage) returns (Empty) {}
}
Loading

0 comments on commit 99f7d0b

Please sign in to comment.