diff --git a/protect/control/v1/common.proto b/protect/control/v1/common.proto index 7d5db29..6543c63 100644 --- a/protect/control/v1/common.proto +++ b/protect/control/v1/common.proto @@ -224,6 +224,11 @@ message ZoneNetworkNeighborEntry { uint32 kind = 6; } +message ZoneServiceConfig { + string zone_id = 1; + string service = 2; +} + message ZoneNetworkConfig { repeated ZoneNetworkInterfaceConfig interfaces = 1; repeated ZoneNetworkRoute routes = 2; @@ -300,6 +305,11 @@ message NetworkReservation { string gateway_mac = 7; } +message ServiceEntry { + string zone_id = 1; + string service_name = 2; +} + message WorkloadSpec { string name = 1; string zone_id = 2; diff --git a/protect/control/v1/control.proto b/protect/control/v1/control.proto index ce92150..d729e9f 100644 --- a/protect/control/v1/control.proto +++ b/protect/control/v1/control.proto @@ -27,10 +27,14 @@ service ControlService { rpc ResolveZoneIds(ResolveZoneIdsRequest) returns (ResolveZoneIdsReply); rpc GetZone(GetZoneRequest) returns (GetZoneReply); rpc ListZones(ListZonesRequest) returns (stream ListZonesReply); + rpc DiscoverServices(DiscoverServicesRequest) returns (stream DiscoverServicesReply); rpc UpdateZoneResources(UpdateZoneResourcesRequest) returns (UpdateZoneResourcesReply); rpc ConfigureZoneNetwork(ConfigureZoneNetworkRequest) returns (ConfigureZoneNetworkReply); + rpc AdvertiseZoneService(AdvertiseZoneServiceRequest) returns (AdvertiseZoneServiceReply); + rpc UnadvertiseZoneService(UnadvertiseZoneServiceRequest) returns (UnadvertiseZoneServiceReply); + rpc AttachZoneConsole(stream ZoneConsoleRequest) returns (stream ZoneConsoleReply); rpc ExecuteZoneCommand(stream ExecuteZoneCommandRequest) returns (stream ExecuteZoneCommandReply); rpc ReadZoneMetrics(ReadZoneMetricsRequest) returns (ReadZoneMetricsReply); @@ -327,6 +331,12 @@ message ZoneKernelEventParam { string param_type_pretty = 5; } +message DiscoverServicesRequest {} + +message DiscoverServicesReply { + repeated ServiceEntry service_entry = 1; +} + message ExecuteZoneCommandRequest { oneof request { ExecuteZoneCommandStart start = 1; @@ -394,6 +404,8 @@ message WatchEventsReply { oneof event { ZoneChangedEvent zone_changed = 1; WorkloadChangedEvent workload_changed = 2; + AdvertiseServiceEvent advertise_service = 3; + UnadvertiseServiceEvent unadvertise_service = 4; } } @@ -405,6 +417,14 @@ message WorkloadChangedEvent { Workload workload = 1; } +message AdvertiseServiceEvent { + ServiceEntry service_entry = 1; +} + +message UnadvertiseServiceEvent { + string uuid = 1; +} + message ReadZoneMetricsRequest { string zone_id = 1; } @@ -593,6 +613,19 @@ message ConfigureZoneNetworkRequest { message ConfigureZoneNetworkReply {} +message AdvertiseZoneServiceRequest { + string uuid = 1; + ZoneServiceConfig config = 2; +} + +message AdvertiseZoneServiceReply {} + +message UnadvertiseZoneServiceRequest { + ZoneServiceConfig config = 2; +} + +message UnadvertiseZoneServiceReply {} + message DialNetworkSocketRequest { oneof request { DialNetworkSocketStart start = 1;