Skip to content

Commit

Permalink
feat: add RoutingService
Browse files Browse the repository at this point in the history
This leverages the v2 SchemaService to manage its routing tables.
  • Loading branch information
alecthomas committed Nov 18, 2024
1 parent eb0a372 commit e2a669b
Show file tree
Hide file tree
Showing 21 changed files with 1,559 additions and 1,212 deletions.
1,855 changes: 887 additions & 968 deletions backend/protos/xyz/block/ftl/v1/schema/schema.pb.go

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions backend/protos/xyz/block/ftl/v1/schema/schema.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ message Array {
Type element = 2;
}

message Artefact {
bytes digest = 1;
string path = 2;
bool executable = 3;
}

message Bool {
optional Position pos = 1;
}
Expand Down Expand Up @@ -233,8 +227,7 @@ message ModuleRuntime {
optional string os = 4;
optional string arch = 5;
optional string image = 6;
repeated Artefact artefacts = 7;
optional string deployment = 8;
optional string endpoint = 7;
}

message Optional {
Expand Down
67 changes: 34 additions & 33 deletions backend/protos/xyz/block/ftl/v2alpha1/ftl.pb.go

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

12 changes: 9 additions & 3 deletions backend/protos/xyz/block/ftl/v2alpha1/ftl.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@ message DeleteModuleResponse {}

// SchemaService is the central source of truth for the FTL schema.
service SchemaService {
rpc Ping(v1.PingRequest) returns (v1.PingResponse); // For now we need to use the v1 types to comply with the interface.
rpc Ping(v1.PingRequest) returns (v1.PingResponse) { // For now we need to use the v1 types to comply with the interface.
option idempotency_level = NO_SIDE_EFFECTS;
}
// GetSchema returns the current full schema for the cluster.
rpc GetSchema(GetSchemaRequest) returns (GetSchemaResponse);
rpc GetSchema(GetSchemaRequest) returns (GetSchemaResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
// PullSchema returns a stream of module schema changes for the cluster.
rpc PullSchema(PullSchemaRequest) returns (stream PullSchemaResponse);
rpc PullSchema(PullSchemaRequest) returns (stream PullSchemaResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}

// UpsertModule creates or replaces a module in the schema.
rpc UpsertModule(UpsertModuleRequest) returns (UpsertModuleResponse);
Expand Down
91 changes: 91 additions & 0 deletions backend/protos/xyz/block/ftl/v2alpha1/routing.pb.go

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

16 changes: 16 additions & 0 deletions backend/protos/xyz/block/ftl/v2alpha1/routing.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";

package xyz.block.ftl.v2alpha1;

import "xyz/block/ftl/v1/ftl.proto";
import "xyz/block/ftl/v1/verb.proto";

option go_package = "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v2alpha1";
option java_multiple_files = true;

service RoutingService {
rpc Ping(v1.PingRequest) returns (v1.PingResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
rpc Call(v1.CallRequest) returns (v1.CallResponse);
}

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

Loading

0 comments on commit e2a669b

Please sign in to comment.