go.ligato.io/vpp-agent/v3@v3.5.0/proto/ligato/generic/meta.proto (about) 1 syntax = "proto3"; 2 3 package ligato.generic; 4 5 option go_package = "go.ligato.io/vpp-agent/v3/proto/ligato/generic"; 6 7 import "google/protobuf/descriptor.proto"; 8 import "ligato/generic/model.proto"; 9 10 // MetaService defines the RPC methods for managing generic models. 11 service MetaService { 12 13 // KnownModels returns information about service capabilities 14 // including list of models supported by the server. 15 rpc KnownModels (KnownModelsRequest) returns (KnownModelsResponse); 16 17 // ProtoFileDescriptor returns proto file descriptor for proto file identified by full name. 18 // The proto file descriptor is in form of proto messages (file descriptor proto and 19 // proto of its imports) so there are needed additional steps to join them into protoreflect.FileDescriptor 20 // ("google.golang.org/protobuf/reflect/protodesc".NewFile(...)). 21 // 22 // This rpc can be used together with knownModels rpc to retrieve additional model information. 23 // Message descriptor can be retrieved from file descriptor corresponding to knownModel message 24 // and used with proto reflecting to get all kinds of information about the known model. 25 // 26 // Due to nature of data retrieval, it is expected that at least one message from that proto file 27 // is registered as known model. 28 rpc ProtoFileDescriptor (ProtoFileDescriptorRequest) returns (ProtoFileDescriptorResponse); 29 } 30 31 message KnownModelsRequest { 32 string class = 1; 33 } 34 35 message ProtoFileDescriptorRequest { 36 // full_proto_file_name is full name of proto file that is needed to identify it. It has the form 37 // "<proto package name ('.' replaced with '/')>/<simple file name>" (i.e. for this proto model 38 // it is "ligato/generic/meta.proto"). 39 // If you are using rpc ProtoFileDescriptor for additional information retrieve for known models from 40 // rpc KnownModels call, you can use usually present ModelDetail's generic.ModelDetail_Option for 41 // key "protoFile" that is containing full proto file name in correct format. 42 string full_proto_file_name = 1; 43 } 44 45 message KnownModelsResponse { 46 repeated generic.ModelDetail known_models = 1; 47 repeated string active_modules = 2; 48 } 49 50 message ProtoFileDescriptorResponse { 51 // file_descriptor is proto message representing proto file descriptor 52 google.protobuf.FileDescriptorProto file_descriptor = 1; 53 // file_import_descriptors is set of file descriptors that the file_descriptor is using as import. This 54 // is needed when converting file descriptor proto to protoreflect.FileDescriptor (using 55 // "google.golang.org/protobuf/reflect/protodesc".NewFile(...) ) 56 google.protobuf.FileDescriptorSet file_import_descriptors = 2; 57 }