Module: ElasticGraph::ProtoIngestion::SchemaDefinition::ResultsExtension
- Defined in:
- elasticgraph-proto_ingestion/lib/elastic_graph/proto_ingestion/schema_definition/results_extension.rb
Overview
Extension module for SchemaDefinition::Results that adds proto schema generation support.
Instance Method Summary collapse
-
#proto_field_number_mappings ⇒ Hash<String, Object>
Returns proto field-number mappings suitable for artifact storage.
-
#proto_schema ⇒ String
Returns the generated proto schema.
Instance Method Details
#proto_field_number_mappings ⇒ Hash<String, Object>
Returns proto field-number mappings suitable for artifact storage.
28 29 30 31 32 |
# File 'elasticgraph-proto_ingestion/lib/elastic_graph/proto_ingestion/schema_definition/results_extension.rb', line 28 def proto_field_number_mappings # Numbers get assigned as `schema.proto` renders, so we must render before reading them. proto_schema protobuf_schema_generator.field_number_mappings_for_artifact end |
#proto_schema ⇒ String
Returns the generated proto schema.
21 22 23 |
# File 'elasticgraph-proto_ingestion/lib/elastic_graph/proto_ingestion/schema_definition/results_extension.rb', line 21 def proto_schema @proto_schema ||= protobuf_schema_generator.to_proto end |