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.
26 27 28 29 30 |
# File 'elasticgraph-proto_ingestion/lib/elastic_graph/proto_ingestion/schema_definition/results_extension.rb', line 26 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.
19 20 21 |
# File 'elasticgraph-proto_ingestion/lib/elastic_graph/proto_ingestion/schema_definition/results_extension.rb', line 19 def proto_schema @proto_schema ||= protobuf_schema_generator.to_proto end |