diff --git a/projects/isolate_proto/src/isolate_proto/controller.proto b/projects/isolate_proto/src/isolate_proto/controller.proto index e7332b72..711a6302 100644 --- a/projects/isolate_proto/src/isolate_proto/controller.proto +++ b/projects/isolate_proto/src/isolate_proto/controller.proto @@ -24,6 +24,10 @@ service IsolateController { rpc RegisterApplication (RegisterApplicationRequest) returns (stream RegisterApplicationResult) {}; // Update configuration of an existing application. rpc UpdateApplication (UpdateApplicationRequest) returns (UpdateApplicationResult) {}; + // Set alias to point to an existing application. + rpc SetAlias (SetAliasRequest) returns (SetAliasResult) {}; + // Delete an alias. + rpc DeleteAlias (DeleteAliasRequest) returns (DeleteAliasResult) {}; // List aliased registered functions rpc ListAliases (ListAliasesRequest) returns (ListAliasesResult) {}; // Sets a user secret. @@ -189,6 +193,24 @@ message UpdateApplicationResult { AliasInfo alias_info = 1; } +message SetAliasRequest { + string alias = 1; + string revision = 2; + ApplicationAuthMode auth_mode = 3; +} + +message SetAliasResult { + // Empty. For future use. +} + +message DeleteAliasRequest { + string alias = 1; +} + +message DeleteAliasResult { + string revision = 1; +} + message ListAliasesRequest { // Empty. For future use. } diff --git a/projects/isolate_proto/src/isolate_proto/controller_pb2.py b/projects/isolate_proto/src/isolate_proto/controller_pb2.py index 48d5e63c..7e543bfc 100644 --- a/projects/isolate_proto/src/isolate_proto/controller_pb2.py +++ b/projects/isolate_proto/src/isolate_proto/controller_pb2.py @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\x10\x63ontroller.proto\x12\ncontroller\x1a\x0c\x63ommon.proto\x1a\x0cserver.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto"\xde\x01\n\tHostedMap\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12!\n\x06inputs\x18\x04 \x03(\x0b\x32\x11.SerializedObjectB\x17\n\x15_machine_requirements"\xf6\x01\n\tHostedRun\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12*\n\nsetup_func\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x42\x17\n\x15_machine_requirementsB\r\n\x0b_setup_func"\x88\x01\n\x14\x43reateUserKeyRequest\x12\x35\n\x05scope\x18\x01 \x01(\x0e\x32&.controller.CreateUserKeyRequest.Scope\x12\x12\n\x05\x61lias\x18\x02 \x01(\tH\x00\x88\x01\x01"\x1b\n\x05Scope\x12\t\n\x05\x41\x44MIN\x10\x00\x12\x07\n\x03\x41PI\x10\x01\x42\x08\n\x06_alias";\n\x15\x43reateUserKeyResponse\x12\x12\n\nkey_secret\x18\x01 \x01(\t\x12\x0e\n\x06key_id\x18\x02 \x01(\t"\x15\n\x13ListUserKeysRequest"B\n\x14ListUserKeysResponse\x12*\n\tuser_keys\x18\x01 \x03(\x0b\x32\x17.controller.UserKeyInfo"&\n\x14RevokeUserKeyRequest\x12\x0e\n\x06key_id\x18\x01 \x01(\t"\x17\n\x15RevokeUserKeyResponse"\x93\x01\n\x0bUserKeyInfo\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x05scope\x18\x03 \x01(\x0e\x32&.controller.CreateUserKeyRequest.Scope\x12\r\n\x05\x61lias\x18\x04 \x01(\t"\xb1\x01\n\x0fHostedRunResult\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x30\n\x06status\x18\x02 \x01(\x0b\x32\x1b.controller.HostedRunStatusH\x00\x88\x01\x01\x12\x12\n\x04logs\x18\x03 \x03(\x0b\x32\x04.Log\x12,\n\x0creturn_value\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x42\t\n\x07_statusB\x0f\n\r_return_value"\x80\x01\n\x0fHostedRunStatus\x12\x30\n\x05state\x18\x01 \x01(\x0e\x32!.controller.HostedRunStatus.State";\n\x05State\x12\x0f\n\x0bIN_PROGRESS\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\x14\n\x10INTERNAL_FAILURE\x10\x02"\x82\x03\n\x13MachineRequirements\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x17\n\nkeep_alive\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\nbase_image\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x19\n\x0c\x65xposed_port\x18\x04 \x01(\x05H\x02\x88\x01\x01\x12\x16\n\tscheduler\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\x37\n\x11scheduler_options\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructH\x04\x88\x01\x01\x12\x1d\n\x10max_multiplexing\x18\x06 \x01(\x05H\x05\x88\x01\x01\x12\x1c\n\x0fmax_concurrency\x18\t \x01(\x05H\x06\x88\x01\x01\x42\r\n\x0b_keep_aliveB\r\n\x0b_base_imageB\x0f\n\r_exposed_portB\x0c\n\n_schedulerB\x14\n\x12_scheduler_optionsB\x13\n\x11_max_multiplexingB\x12\n\x10_max_concurrency"\xf5\x03\n\x1aRegisterApplicationRequest\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12*\n\nsetup_func\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x12\x1d\n\x10\x61pplication_name\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x37\n\tauth_mode\x18\x06 \x01(\x0e\x32\x1f.controller.ApplicationAuthModeH\x03\x88\x01\x01\x12 \n\x0fmax_concurrency\x18\x07 \x01(\x05\x42\x02\x18\x01H\x04\x88\x01\x01\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructH\x05\x88\x01\x01\x42\x17\n\x15_machine_requirementsB\r\n\x0b_setup_funcB\x13\n\x11_application_nameB\x0c\n\n_auth_modeB\x12\n\x10_max_concurrencyB\x0b\n\t_metadata"7\n\x1dRegisterApplicationResultType\x12\x16\n\x0e\x61pplication_id\x18\x01 \x01(\t"z\n\x19RegisterApplicationResult\x12\x12\n\x04logs\x18\x01 \x03(\x0b\x32\x04.Log\x12>\n\x06result\x18\x02 \x01(\x0b\x32).controller.RegisterApplicationResultTypeH\x00\x88\x01\x01\x42\t\n\x07_result"\xc2\x01\n\x18UpdateApplicationRequest\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x17\n\nkeep_alive\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_multiplexing\x18\x03 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0fmax_concurrency\x18\x04 \x01(\x05H\x02\x88\x01\x01\x42\r\n\x0b_keep_aliveB\x13\n\x11_max_multiplexingB\x12\n\x10_max_concurrency"D\n\x17UpdateApplicationResult\x12)\n\nalias_info\x18\x01 \x01(\x0b\x32\x15.controller.AliasInfo"\x14\n\x12ListAliasesRequest";\n\x11ListAliasesResult\x12&\n\x07\x61liases\x18\x01 \x03(\x0b\x32\x15.controller.AliasInfo"\xa7\x01\n\tAliasInfo\x12\r\n\x05\x61lias\x18\x01 \x01(\t\x12\x10\n\x08revision\x18\x02 \x01(\t\x12\x32\n\tauth_mode\x18\x03 \x01(\x0e\x32\x1f.controller.ApplicationAuthMode\x12\x17\n\x0fmax_concurrency\x18\x04 \x01(\x05\x12\x18\n\x10max_multiplexing\x18\x05 \x01(\x05\x12\x12\n\nkeep_alive\x18\x06 \x01(\x05">\n\x10SetSecretRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\x05value\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value"\x13\n\x11SetSecretResponse"\x14\n\x12ListSecretsRequest"^\n\x06Secret\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x0c\x63reated_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0f\n\r_created_time":\n\x13ListSecretsResponse\x12#\n\x07secrets\x18\x01 \x03(\x0b\x32\x12.controller.Secret*:\n\x13\x41pplicationAuthMode\x12\x0b\n\x07PRIVATE\x10\x00\x12\n\n\x06PUBLIC\x10\x01\x12\n\n\x06SHARED\x10\x02\x32\xd0\x06\n\x11IsolateController\x12=\n\x03Run\x12\x15.controller.HostedRun\x1a\x1b.controller.HostedRunResult"\x00\x30\x01\x12=\n\x03Map\x12\x15.controller.HostedMap\x1a\x1b.controller.HostedRunResult"\x00\x30\x01\x12V\n\rCreateUserKey\x12 .controller.CreateUserKeyRequest\x1a!.controller.CreateUserKeyResponse"\x00\x12S\n\x0cListUserKeys\x12\x1f.controller.ListUserKeysRequest\x1a .controller.ListUserKeysResponse"\x00\x12V\n\rRevokeUserKey\x12 .controller.RevokeUserKeyRequest\x1a!.controller.RevokeUserKeyResponse"\x00\x12h\n\x13RegisterApplication\x12&.controller.RegisterApplicationRequest\x1a%.controller.RegisterApplicationResult"\x00\x30\x01\x12`\n\x11UpdateApplication\x12$.controller.UpdateApplicationRequest\x1a#.controller.UpdateApplicationResult"\x00\x12N\n\x0bListAliases\x12\x1e.controller.ListAliasesRequest\x1a\x1d.controller.ListAliasesResult"\x00\x12J\n\tSetSecret\x12\x1c.controller.SetSecretRequest\x1a\x1d.controller.SetSecretResponse"\x00\x12P\n\x0bListSecrets\x12\x1e.controller.ListSecretsRequest\x1a\x1f.controller.ListSecretsResponse"\x00\x62\x06proto3' + b'\n\x10\x63ontroller.proto\x12\ncontroller\x1a\x0c\x63ommon.proto\x1a\x0cserver.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto"\xde\x01\n\tHostedMap\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12!\n\x06inputs\x18\x04 \x03(\x0b\x32\x11.SerializedObjectB\x17\n\x15_machine_requirements"\xf6\x01\n\tHostedRun\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12*\n\nsetup_func\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x42\x17\n\x15_machine_requirementsB\r\n\x0b_setup_func"\x88\x01\n\x14\x43reateUserKeyRequest\x12\x35\n\x05scope\x18\x01 \x01(\x0e\x32&.controller.CreateUserKeyRequest.Scope\x12\x12\n\x05\x61lias\x18\x02 \x01(\tH\x00\x88\x01\x01"\x1b\n\x05Scope\x12\t\n\x05\x41\x44MIN\x10\x00\x12\x07\n\x03\x41PI\x10\x01\x42\x08\n\x06_alias";\n\x15\x43reateUserKeyResponse\x12\x12\n\nkey_secret\x18\x01 \x01(\t\x12\x0e\n\x06key_id\x18\x02 \x01(\t"\x15\n\x13ListUserKeysRequest"B\n\x14ListUserKeysResponse\x12*\n\tuser_keys\x18\x01 \x03(\x0b\x32\x17.controller.UserKeyInfo"&\n\x14RevokeUserKeyRequest\x12\x0e\n\x06key_id\x18\x01 \x01(\t"\x17\n\x15RevokeUserKeyResponse"\x93\x01\n\x0bUserKeyInfo\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x05scope\x18\x03 \x01(\x0e\x32&.controller.CreateUserKeyRequest.Scope\x12\r\n\x05\x61lias\x18\x04 \x01(\t"\xb1\x01\n\x0fHostedRunResult\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x30\n\x06status\x18\x02 \x01(\x0b\x32\x1b.controller.HostedRunStatusH\x00\x88\x01\x01\x12\x12\n\x04logs\x18\x03 \x03(\x0b\x32\x04.Log\x12,\n\x0creturn_value\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x42\t\n\x07_statusB\x0f\n\r_return_value"\x80\x01\n\x0fHostedRunStatus\x12\x30\n\x05state\x18\x01 \x01(\x0e\x32!.controller.HostedRunStatus.State";\n\x05State\x12\x0f\n\x0bIN_PROGRESS\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\x14\n\x10INTERNAL_FAILURE\x10\x02"\x82\x03\n\x13MachineRequirements\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x17\n\nkeep_alive\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\nbase_image\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x19\n\x0c\x65xposed_port\x18\x04 \x01(\x05H\x02\x88\x01\x01\x12\x16\n\tscheduler\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\x37\n\x11scheduler_options\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructH\x04\x88\x01\x01\x12\x1d\n\x10max_multiplexing\x18\x06 \x01(\x05H\x05\x88\x01\x01\x12\x1c\n\x0fmax_concurrency\x18\t \x01(\x05H\x06\x88\x01\x01\x42\r\n\x0b_keep_aliveB\r\n\x0b_base_imageB\x0f\n\r_exposed_portB\x0c\n\n_schedulerB\x14\n\x12_scheduler_optionsB\x13\n\x11_max_multiplexingB\x12\n\x10_max_concurrency"\xf5\x03\n\x1aRegisterApplicationRequest\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12*\n\nsetup_func\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x12\x1d\n\x10\x61pplication_name\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x37\n\tauth_mode\x18\x06 \x01(\x0e\x32\x1f.controller.ApplicationAuthModeH\x03\x88\x01\x01\x12 \n\x0fmax_concurrency\x18\x07 \x01(\x05\x42\x02\x18\x01H\x04\x88\x01\x01\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructH\x05\x88\x01\x01\x42\x17\n\x15_machine_requirementsB\r\n\x0b_setup_funcB\x13\n\x11_application_nameB\x0c\n\n_auth_modeB\x12\n\x10_max_concurrencyB\x0b\n\t_metadata"7\n\x1dRegisterApplicationResultType\x12\x16\n\x0e\x61pplication_id\x18\x01 \x01(\t"z\n\x19RegisterApplicationResult\x12\x12\n\x04logs\x18\x01 \x03(\x0b\x32\x04.Log\x12>\n\x06result\x18\x02 \x01(\x0b\x32).controller.RegisterApplicationResultTypeH\x00\x88\x01\x01\x42\t\n\x07_result"\xc2\x01\n\x18UpdateApplicationRequest\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x17\n\nkeep_alive\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_multiplexing\x18\x03 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0fmax_concurrency\x18\x04 \x01(\x05H\x02\x88\x01\x01\x42\r\n\x0b_keep_aliveB\x13\n\x11_max_multiplexingB\x12\n\x10_max_concurrency"D\n\x17UpdateApplicationResult\x12)\n\nalias_info\x18\x01 \x01(\x0b\x32\x15.controller.AliasInfo"f\n\x0fSetAliasRequest\x12\r\n\x05\x61lias\x18\x01 \x01(\t\x12\x10\n\x08revision\x18\x02 \x01(\t\x12\x32\n\tauth_mode\x18\x03 \x01(\x0e\x32\x1f.controller.ApplicationAuthMode"\x10\n\x0eSetAliasResult"#\n\x12\x44\x65leteAliasRequest\x12\r\n\x05\x61lias\x18\x01 \x01(\t"%\n\x11\x44\x65leteAliasResult\x12\x10\n\x08revision\x18\x01 \x01(\t"\x14\n\x12ListAliasesRequest";\n\x11ListAliasesResult\x12&\n\x07\x61liases\x18\x01 \x03(\x0b\x32\x15.controller.AliasInfo"\xa7\x01\n\tAliasInfo\x12\r\n\x05\x61lias\x18\x01 \x01(\t\x12\x10\n\x08revision\x18\x02 \x01(\t\x12\x32\n\tauth_mode\x18\x03 \x01(\x0e\x32\x1f.controller.ApplicationAuthMode\x12\x17\n\x0fmax_concurrency\x18\x04 \x01(\x05\x12\x18\n\x10max_multiplexing\x18\x05 \x01(\x05\x12\x12\n\nkeep_alive\x18\x06 \x01(\x05">\n\x10SetSecretRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\x05value\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value"\x13\n\x11SetSecretResponse"\x14\n\x12ListSecretsRequest"^\n\x06Secret\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x0c\x63reated_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0f\n\r_created_time":\n\x13ListSecretsResponse\x12#\n\x07secrets\x18\x01 \x03(\x0b\x32\x12.controller.Secret*:\n\x13\x41pplicationAuthMode\x12\x0b\n\x07PRIVATE\x10\x00\x12\n\n\x06PUBLIC\x10\x01\x12\n\n\x06SHARED\x10\x02\x32\xe7\x07\n\x11IsolateController\x12=\n\x03Run\x12\x15.controller.HostedRun\x1a\x1b.controller.HostedRunResult"\x00\x30\x01\x12=\n\x03Map\x12\x15.controller.HostedMap\x1a\x1b.controller.HostedRunResult"\x00\x30\x01\x12V\n\rCreateUserKey\x12 .controller.CreateUserKeyRequest\x1a!.controller.CreateUserKeyResponse"\x00\x12S\n\x0cListUserKeys\x12\x1f.controller.ListUserKeysRequest\x1a .controller.ListUserKeysResponse"\x00\x12V\n\rRevokeUserKey\x12 .controller.RevokeUserKeyRequest\x1a!.controller.RevokeUserKeyResponse"\x00\x12h\n\x13RegisterApplication\x12&.controller.RegisterApplicationRequest\x1a%.controller.RegisterApplicationResult"\x00\x30\x01\x12`\n\x11UpdateApplication\x12$.controller.UpdateApplicationRequest\x1a#.controller.UpdateApplicationResult"\x00\x12\x45\n\x08SetAlias\x12\x1b.controller.SetAliasRequest\x1a\x1a.controller.SetAliasResult"\x00\x12N\n\x0b\x44\x65leteAlias\x12\x1e.controller.DeleteAliasRequest\x1a\x1d.controller.DeleteAliasResult"\x00\x12N\n\x0bListAliases\x12\x1e.controller.ListAliasesRequest\x1a\x1d.controller.ListAliasesResult"\x00\x12J\n\tSetSecret\x12\x1c.controller.SetSecretRequest\x1a\x1d.controller.SetSecretResponse"\x00\x12P\n\x0bListSecrets\x12\x1e.controller.ListSecretsRequest\x1a\x1f.controller.ListSecretsResponse"\x00\x62\x06proto3' ) _globals = globals() @@ -33,8 +33,8 @@ _REGISTERAPPLICATIONREQUEST.fields_by_name[ "max_concurrency" ]._serialized_options = b"\030\001" - _globals["_APPLICATIONAUTHMODE"]._serialized_start = 3303 - _globals["_APPLICATIONAUTHMODE"]._serialized_end = 3361 + _globals["_APPLICATIONAUTHMODE"]._serialized_start = 3501 + _globals["_APPLICATIONAUTHMODE"]._serialized_end = 3559 _globals["_HOSTEDMAP"]._serialized_start = 156 _globals["_HOSTEDMAP"]._serialized_end = 378 _globals["_HOSTEDRUN"]._serialized_start = 381 @@ -73,22 +73,30 @@ _globals["_UPDATEAPPLICATIONREQUEST"]._serialized_end = 2715 _globals["_UPDATEAPPLICATIONRESULT"]._serialized_start = 2717 _globals["_UPDATEAPPLICATIONRESULT"]._serialized_end = 2785 - _globals["_LISTALIASESREQUEST"]._serialized_start = 2787 - _globals["_LISTALIASESREQUEST"]._serialized_end = 2807 - _globals["_LISTALIASESRESULT"]._serialized_start = 2809 - _globals["_LISTALIASESRESULT"]._serialized_end = 2868 - _globals["_ALIASINFO"]._serialized_start = 2871 - _globals["_ALIASINFO"]._serialized_end = 3038 - _globals["_SETSECRETREQUEST"]._serialized_start = 3040 - _globals["_SETSECRETREQUEST"]._serialized_end = 3102 - _globals["_SETSECRETRESPONSE"]._serialized_start = 3104 - _globals["_SETSECRETRESPONSE"]._serialized_end = 3123 - _globals["_LISTSECRETSREQUEST"]._serialized_start = 3125 - _globals["_LISTSECRETSREQUEST"]._serialized_end = 3145 - _globals["_SECRET"]._serialized_start = 3147 - _globals["_SECRET"]._serialized_end = 3241 - _globals["_LISTSECRETSRESPONSE"]._serialized_start = 3243 - _globals["_LISTSECRETSRESPONSE"]._serialized_end = 3301 - _globals["_ISOLATECONTROLLER"]._serialized_start = 3364 - _globals["_ISOLATECONTROLLER"]._serialized_end = 4212 + _globals["_SETALIASREQUEST"]._serialized_start = 2787 + _globals["_SETALIASREQUEST"]._serialized_end = 2889 + _globals["_SETALIASRESULT"]._serialized_start = 2891 + _globals["_SETALIASRESULT"]._serialized_end = 2907 + _globals["_DELETEALIASREQUEST"]._serialized_start = 2909 + _globals["_DELETEALIASREQUEST"]._serialized_end = 2944 + _globals["_DELETEALIASRESULT"]._serialized_start = 2946 + _globals["_DELETEALIASRESULT"]._serialized_end = 2983 + _globals["_LISTALIASESREQUEST"]._serialized_start = 2985 + _globals["_LISTALIASESREQUEST"]._serialized_end = 3005 + _globals["_LISTALIASESRESULT"]._serialized_start = 3007 + _globals["_LISTALIASESRESULT"]._serialized_end = 3066 + _globals["_ALIASINFO"]._serialized_start = 3069 + _globals["_ALIASINFO"]._serialized_end = 3236 + _globals["_SETSECRETREQUEST"]._serialized_start = 3238 + _globals["_SETSECRETREQUEST"]._serialized_end = 3300 + _globals["_SETSECRETRESPONSE"]._serialized_start = 3302 + _globals["_SETSECRETRESPONSE"]._serialized_end = 3321 + _globals["_LISTSECRETSREQUEST"]._serialized_start = 3323 + _globals["_LISTSECRETSREQUEST"]._serialized_end = 3343 + _globals["_SECRET"]._serialized_start = 3345 + _globals["_SECRET"]._serialized_end = 3439 + _globals["_LISTSECRETSRESPONSE"]._serialized_start = 3441 + _globals["_LISTSECRETSRESPONSE"]._serialized_end = 3499 + _globals["_ISOLATECONTROLLER"]._serialized_start = 3562 + _globals["_ISOLATECONTROLLER"]._serialized_end = 4561 # @@protoc_insertion_point(module_scope) diff --git a/projects/isolate_proto/src/isolate_proto/controller_pb2.pyi b/projects/isolate_proto/src/isolate_proto/controller_pb2.pyi index bd43317c..298b7b68 100644 --- a/projects/isolate_proto/src/isolate_proto/controller_pb2.pyi +++ b/projects/isolate_proto/src/isolate_proto/controller_pb2.pyi @@ -940,6 +940,78 @@ class UpdateApplicationResult(google.protobuf.message.Message): global___UpdateApplicationResult = UpdateApplicationResult +@typing_extensions.final +class SetAliasRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ALIAS_FIELD_NUMBER: builtins.int + REVISION_FIELD_NUMBER: builtins.int + AUTH_MODE_FIELD_NUMBER: builtins.int + alias: builtins.str + revision: builtins.str + auth_mode: global___ApplicationAuthMode.ValueType + def __init__( + self, + *, + alias: builtins.str = ..., + revision: builtins.str = ..., + auth_mode: global___ApplicationAuthMode.ValueType = ..., + ) -> None: ... + def ClearField( + self, + field_name: typing_extensions.Literal[ + "alias", b"alias", "auth_mode", b"auth_mode", "revision", b"revision" + ], + ) -> None: ... + +global___SetAliasRequest = SetAliasRequest + +@typing_extensions.final +class SetAliasResult(google.protobuf.message.Message): + """Empty. For future use.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___SetAliasResult = SetAliasResult + +@typing_extensions.final +class DeleteAliasRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ALIAS_FIELD_NUMBER: builtins.int + alias: builtins.str + def __init__( + self, + *, + alias: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing_extensions.Literal["alias", b"alias"] + ) -> None: ... + +global___DeleteAliasRequest = DeleteAliasRequest + +@typing_extensions.final +class DeleteAliasResult(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REVISION_FIELD_NUMBER: builtins.int + revision: builtins.str + def __init__( + self, + *, + revision: builtins.str = ..., + ) -> None: ... + def ClearField( + self, field_name: typing_extensions.Literal["revision", b"revision"] + ) -> None: ... + +global___DeleteAliasResult = DeleteAliasResult + @typing_extensions.final class ListAliasesRequest(google.protobuf.message.Message): """Empty. For future use.""" diff --git a/projects/isolate_proto/src/isolate_proto/controller_pb2_grpc.py b/projects/isolate_proto/src/isolate_proto/controller_pb2_grpc.py index 1d8a575b..0a8f7bb2 100644 --- a/projects/isolate_proto/src/isolate_proto/controller_pb2_grpc.py +++ b/projects/isolate_proto/src/isolate_proto/controller_pb2_grpc.py @@ -49,6 +49,16 @@ def __init__(self, channel): request_serializer=controller__pb2.UpdateApplicationRequest.SerializeToString, response_deserializer=controller__pb2.UpdateApplicationResult.FromString, ) + self.SetAlias = channel.unary_unary( + "/controller.IsolateController/SetAlias", + request_serializer=controller__pb2.SetAliasRequest.SerializeToString, + response_deserializer=controller__pb2.SetAliasResult.FromString, + ) + self.DeleteAlias = channel.unary_unary( + "/controller.IsolateController/DeleteAlias", + request_serializer=controller__pb2.DeleteAliasRequest.SerializeToString, + response_deserializer=controller__pb2.DeleteAliasResult.FromString, + ) self.ListAliases = channel.unary_unary( "/controller.IsolateController/ListAliases", request_serializer=controller__pb2.ListAliasesRequest.SerializeToString, @@ -113,6 +123,18 @@ def UpdateApplication(self, request, context): context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") + def SetAlias(self, request, context): + """Set alias to point to an existing application.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def DeleteAlias(self, request, context): + """Delete an alias.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def ListAliases(self, request, context): """List aliased registered functions""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -169,6 +191,16 @@ def add_IsolateControllerServicer_to_server(servicer, server): request_deserializer=controller__pb2.UpdateApplicationRequest.FromString, response_serializer=controller__pb2.UpdateApplicationResult.SerializeToString, ), + "SetAlias": grpc.unary_unary_rpc_method_handler( + servicer.SetAlias, + request_deserializer=controller__pb2.SetAliasRequest.FromString, + response_serializer=controller__pb2.SetAliasResult.SerializeToString, + ), + "DeleteAlias": grpc.unary_unary_rpc_method_handler( + servicer.DeleteAlias, + request_deserializer=controller__pb2.DeleteAliasRequest.FromString, + response_serializer=controller__pb2.DeleteAliasResult.SerializeToString, + ), "ListAliases": grpc.unary_unary_rpc_method_handler( servicer.ListAliases, request_deserializer=controller__pb2.ListAliasesRequest.FromString, @@ -398,6 +430,64 @@ def UpdateApplication( metadata, ) + @staticmethod + def SetAlias( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/controller.IsolateController/SetAlias", + controller__pb2.SetAliasRequest.SerializeToString, + controller__pb2.SetAliasResult.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteAlias( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/controller.IsolateController/DeleteAlias", + controller__pb2.DeleteAliasRequest.SerializeToString, + controller__pb2.DeleteAliasResult.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + @staticmethod def ListAliases( request,