<commit_before>syntax = "proto3";

option go_package = "github.com/zachmandeville/tester-prototype/adapter/adapter";

package adapter;

message Endpoints {
  message Endpoint {
    string name = 1;
  }
  repeated Endpoint items = 1;
}

message Clusters {
  message Cluster {
    string name = 1;
    map<string,int32> connect_timeout = 2;
  }
  repeated Cluster items = 1;
}

message Routes {
  message Route {
    string name = 1;
  }
  repeated Route items = 1;
}

message Listeners {
  message Listener {
    string name = 1;
    string address = 2;
  }
  repeated Listener items = 1;
}

message Runtimes {
  message Runtime {
    string name = 1;
  }
  repeated Runtime items = 1;
}

message Secrets {
  message Secret {
    string name = 1;
  }
  repeated Secret items = 1;
}

message Snapshot {
  string node = 1;
  string version = 2;
  Endpoints endpoints = 3;
  Clusters clusters = 4;
  Routes routes = 5;
  Listeners listeners = 6;
  Runtimes runtimes = 7;
  Secrets secrets = 8;
}

message SetStateResponse {
  string message = 1;
}

message UpdateStateResponse {
  string message = 1;
}

message clearRequest {
  string node = 1;
}

message clearResponse {
  string response = 1;
}

service Adapter {
  rpc SetState(Snapshot) returns (SetStateResponse){}
  rpc UpdateState(Snapshot) returns (UpdateStateResponse){}
  rpc ClearState(clearRequest) returns (clearResponse) {}
}
<commit_msg>separate singular types from their collections<commit_after>syntax = "proto3";

option go_package = "github.com/zachmandeville/tester-prototype/adapter/adapter";

package adapter;

message Endpoint {
  string name    = 1;
  string cluster = 2;
  string address = 3;
}

message Cluster {
  string name                       = 1;
  map<string,int32> connect_timeout = 2;
}
message Route {
  string name = 1;
}
message Listener {
  string name    = 1;
  string address = 2;
}
message Runtime {
  string name = 1;
}

message Secret {
  string name = 1;
}

message Endpoints {
  repeated Endpoint items = 1;
}

message Clusters {
  repeated Cluster items = 1;
}

message Routes {
  repeated Route items = 1;
}

message Listeners {
  repeated Listener items = 1;
}

message Runtimes {
  repeated Runtime items = 1;
}

message Secrets {
  repeated Secret items = 1;
}

message Snapshot {
  string node = 1;
  string version = 2;
  Endpoints endpoints = 3;
  Clusters clusters = 4;
  Routes routes = 5;
  Listeners listeners = 6;
  Runtimes runtimes = 7;
  Secrets secrets = 8;
}

message SetStateResponse {
  string message = 1;
}

message UpdateStateResponse {
  string message = 1;
}

message clearRequest {
  string node = 1;
}

message clearResponse {
  string response = 1;
}

service Adapter {
  rpc SetState(Snapshot) returns (SetStateResponse){}
  rpc UpdateState(Snapshot) returns (UpdateStateResponse){}
  rpc ClearState(clearRequest) returns (clearResponse) {}
}

{'fraction_non_alphanumeric': 0.09002093510118632, 'fraction_numerical': 0.0209351011863224, 'mean_word_length': 3.3905053598774884, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7215817', 'n_tokens_mistral': 980, 'n_tokens_neox': 918, 'n_words': 289}