Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated reflection service code #1659

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

stefanadranca
Copy link
Collaborator

Motivation:

In order to develop the Reflection Service, the specific proto file should be included in the module and the service code generated from it.

Modifications:

Created the module for the Reflection Service, added the proto file, updated the Package.swift to include the module, updated the Makefile to inlude targets for generating the server code, created the ReflectionProvider.

Result:

The Reflection Service can now be implemented.

Motivation:

In order to develop the Reflection Service, the specific proto file should be included in the module and
the service code generated from it.

Modifications:

Created the module for the Reflection Service, added the proto file, updated the Package.swift
to include the module, updated the Makefile to inlude targets for generating the server code,
created the ReflectionProvider.

Result:

The Reflection Service can now be implemented.
Package.swift Outdated
@@ -89,6 +89,7 @@ extension Target.Dependency {
static let interopTestModels: Self = .target(name: "GRPCInteroperabilityTestModels")
static let interopTestImplementation: Self =
.target(name: "GRPCInteroperabilityTestsImplementation")
static let reflectionService: Self = .target(name: "ReflectionService")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
static let reflectionService: Self = .target(name: "ReflectionService")
static let reflectionService: Self = .target(name: "GRPCReflectionService")

Package.swift Outdated
@@ -428,6 +429,19 @@ extension Target {
"README.md",
]
)

static let reflectionService: Target = .target(
name: "ReflectionService",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: "ReflectionService",
name: "GRPCReflectionService",

@@ -0,0 +1,141 @@
// Copyright 2023 The gRPC Authors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,29 @@
/*
* Copyright 2019, gRPC Authors All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's 2023

import GRPC

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
final class ReflectionProvider: Reflection_ServerReflectionAsyncProvider {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
final class ReflectionProvider: Reflection_ServerReflectionAsyncProvider {
final class ReflectionService: Reflection_ServerReflectionAsyncProvider {

Comment on lines 23 to 25
requestStream: GRPC.GRPCAsyncRequestStream<Reflection_ServerReflectionRequest>,
responseStream: GRPC.GRPCAsyncResponseStreamWriter<Reflection_ServerReflectionResponse>,
context: GRPC.GRPCAsyncServerCallContext
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
requestStream: GRPC.GRPCAsyncRequestStream<Reflection_ServerReflectionRequest>,
responseStream: GRPC.GRPCAsyncResponseStreamWriter<Reflection_ServerReflectionResponse>,
context: GRPC.GRPCAsyncServerCallContext
requestStream: GRPCAsyncRequestStream<Reflection_ServerReflectionRequest>,
responseStream: GRPCAsyncResponseStreamWriter<Reflection_ServerReflectionResponse>,
context: GRPCAsyncServerCallContext

@glbrntt glbrntt added the semver/patch No public API change. label Oct 3, 2023
@glbrntt glbrntt enabled auto-merge (squash) October 3, 2023 13:43
@glbrntt glbrntt merged commit 62882cc into grpc:main Oct 3, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants