cardano-rpc
Safe HaskellNone
LanguageHaskell2010

Cardano.Rpc.Server.Internal.Reflection.DescriptorTable

Description

The proto file descriptors served by the gRPC Server Reflection API, compiled into this binary, plus a package-qualified symbol index over their contents (services, methods, messages, fields, oneofs, enums and enum values).

Every proto file cardano-rpc serves is represented here by one FileEntry, keyed by the file name embedded in its own descriptor (e.g. "cardanorpcnode.proto"), which is also how dependent files refer to it in their own dependency list.

Synopsis

Documentation

data FileEntry Source #

One served proto file: its decoded descriptor, used to walk dependencies and resolve symbols, and the packed bytes of that same descriptor, sent verbatim in a FileDescriptorResponse.

Constructors

FileEntry 

Fields

descriptorTable :: DescriptorTable Source #

The descriptor table for every proto file this server's gRPC API is built from: the six services it registers, plus the well-known google.protobuf types and the reflection protos themselves.

fileNames :: DescriptorTable -> [Text] Source #

The name of every served proto file.

lookupFile :: DescriptorTable -> Text -> Maybe FileEntry Source #

Look up a file by name (e.g. "cardanorpcnode.proto").

lookupSymbol :: DescriptorTable -> Text -> Maybe Text Source #

Resolve a fully qualified symbol - a service, method, message, nested message, field, oneof, enum, or enum value name - to the file that declares it.

transitiveClosure :: DescriptorTable -> Text -> Maybe [FileEntry] Source #

The named file, plus every file it transitively depends on, in traversal order with the file itself first, deduplicated. Nothing if the file itself is not in the table; a dependency that is missing from the table (which should not happen - see the table's closure invariant) is silently skipped rather than failing the whole lookup.

fileSymbolNames :: FileDescriptorProto -> [Text] Source #

Every package-qualified symbol a file declares: its services (and their methods), top-level and nested messages (and their fields and oneofs), and top-level and nested enums (and their values).