Skip to content

Commit

Permalink
nio to @_implementationOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLucasMarcal committed Jun 22, 2023
1 parent 2453b90 commit 3b36ac7
Show file tree
Hide file tree
Showing 166 changed files with 314 additions and 314 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Source: google/cloud/language/v1/language_service.proto
//
import GRPC
import NIO
import NIOConcurrencyHelpers
@_implementationOnly import NIO
@_implementationOnly import NIOConcurrencyHelpers
import SwiftProtobuf


Expand Down
8 changes: 4 additions & 4 deletions Examples/Google/NaturalLanguage/Sources/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
import Dispatch
import Foundation
import GRPC
import NIO
import NIOHPACK
import NIOHTTP1
import NIOSSL
@_implementationOnly import NIO
@_implementationOnly import NIOHPACK
@_implementationOnly import NIOHTTP1
@_implementationOnly import NIOSSL
import OAuth2

/// Create a client and return a future to provide its value.
Expand Down
2 changes: 1 addition & 1 deletion FuzzTesting/Sources/ServerFuzzerLib/ServerFuzzer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import EchoImplementation
import GRPC
import NIO
@_implementationOnly import NIO

@_cdecl("ServerFuzzer")
public func test(_ start: UnsafeRawPointer, _ count: Int) -> CInt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import Foundation
import GRPC
import NIOCore
@_implementationOnly import NIOCore

/// Implementation of asynchronous service for benchmarking.
final class AsyncBenchmarkServiceImpl: Grpc_Testing_BenchmarkServiceAsyncProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import GRPC
import NIOCore
@_implementationOnly import NIOCore

/// Protocol which async clients must implement.
protocol AsyncQPSClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Atomics
import Foundation
import GRPC
import Logging
import NIOCore
@_implementationOnly import NIOCore

/// Makes streaming requests and listens to responses ping-pong style.
/// Iterations can be limited by config.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import BenchmarkUtils
import Foundation
import GRPC
import Logging
import NIOConcurrencyHelpers
import NIOCore
import NIOPosix
@_implementationOnly import NIOConcurrencyHelpers
@_implementationOnly import NIOCore
@_implementationOnly import NIOPosix

/// Client to make a series of asynchronous calls.
final class AsyncQPSClientImpl<RequestMakerType: AsyncRequestMaker>: AsyncQPSClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import Foundation
import GRPC
import Logging
import NIOCore
import NIOPosix
@_implementationOnly import NIOCore
@_implementationOnly import NIOPosix

/// Server setup for asynchronous requests.
final class AsyncQPSServerImpl: AsyncQPSServer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import GRPC
import NIOCore
@_implementationOnly import NIOCore

/// Interface server types must implement when using async APIs.
protocol AsyncQPSServer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import GRPC
import Logging
import NIOCore
@_implementationOnly import NIOCore

/// Makes unary requests to the server and records performance statistics.
final class AsyncUnaryRequestMaker: AsyncRequestMaker {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/
import GRPC
import NIOCore
@_implementationOnly import NIOCore

// Implementation of the control service for communication with the driver process.
actor AsyncWorkerServiceImpl: Grpc_Testing_WorkerServiceAsyncProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import GRPC
import NIOCore
@_implementationOnly import NIOCore

extension Grpc_Testing_ClientConfig {
/// Work out how many theads to use - defaulting to core count if not specified.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import Foundation
import GRPC
import NIOCore
@_implementationOnly import NIOCore

/// Implementation of asynchronous service for benchmarking.
final class NIOBenchmarkServiceImpl: Grpc_Testing_BenchmarkServiceProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import GRPC
import NIOCore
@_implementationOnly import NIOCore

/// Protocol which clients must implement.
protocol NIOQPSClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import Foundation
import GRPC
import Logging
import NIOCore
@_implementationOnly import NIOCore

/// Makes streaming requests and listens to responses ping-pong style.
/// Iterations can be limited by config.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import BenchmarkUtils
import Foundation
import GRPC
import Logging
import NIOConcurrencyHelpers
import NIOCore
import NIOPosix
@_implementationOnly import NIOConcurrencyHelpers
@_implementationOnly import NIOCore
@_implementationOnly import NIOPosix

/// Client to make a series of asynchronous calls.
final class NIOQPSClientImpl<RequestMakerType: NIORequestMaker>: NIOQPSClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import Foundation
import GRPC
import Logging
import NIOCore
import NIOPosix
@_implementationOnly import NIOCore
@_implementationOnly import NIOPosix

/// Server setup for asynchronous requests (using EventLoopFutures).
final class NIOQPSServerImpl: NIOQPSServer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import GRPC
import Logging
import NIOCore
@_implementationOnly import NIOCore

/// Implement to provide a method of making requests to a server from a client.
protocol NIORequestMaker {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import GRPC
import NIOCore
@_implementationOnly import NIOCore

/// Interface server types must implement when using NIO.
protocol NIOQPSServer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import GRPC
import Logging
import NIOCore
@_implementationOnly import NIOCore

/// Makes unary requests to the server and records performance statistics.
final class NIOUnaryRequestMaker: NIORequestMaker {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import GRPC
import NIOCore
@_implementationOnly import NIOCore

// Implementation of the control service for communication with the driver process.
class NIOWorkerServiceImpl: Grpc_Testing_WorkerServiceProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import GRPC
import Logging
import NIOCore
import NIOPosix
@_implementationOnly import NIOCore
@_implementationOnly import NIOPosix

/// Sets up and runs a worker service which listens for instructions on what tests to run.
/// Currently doesn't understand TLS for communication with the driver.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import BenchmarkUtils
import NIOConcurrencyHelpers
@_implementationOnly import NIOConcurrencyHelpers

/// Convenience holder for collected statistics.
struct Stats {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Examples/Echo/Implementation/EchoProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import EchoModel
import GRPC
import NIOCore
@_implementationOnly import NIOCore
import SwiftProtobuf

public class EchoProvider: Echo_EchoProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import NIOHPACK
@_implementationOnly import NIOHPACK

func prettify(_ headers: HPACKHeaders) -> String {
return "[" + headers.map { name, value, _ in
Expand Down
2 changes: 1 addition & 1 deletion Sources/Examples/Echo/Implementation/Interceptors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import EchoModel
import GRPC
import NIOCore
@_implementationOnly import NIOCore

// All client interceptors derive from the 'ClientInterceptor' base class. We know the request and
// response types for all Echo RPCs are the same: so we'll use them concretely here, allowing us
Expand Down
4 changes: 2 additions & 2 deletions Sources/Examples/Echo/Model/echo.grpc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Source: echo.proto
//
import GRPC
import NIO
import NIOConcurrencyHelpers
@_implementationOnly import NIO
@_implementationOnly import NIOConcurrencyHelpers
import SwiftProtobuf


Expand Down
6 changes: 3 additions & 3 deletions Sources/Examples/Echo/Runtime/Echo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import EchoImplementation
import EchoModel
import GRPC
import GRPCSampleData
import NIOCore
import NIOPosix
@_implementationOnly import NIOCore
@_implementationOnly import NIOPosix
#if canImport(NIOSSL)
import NIOSSL
@_implementationOnly import NIOSSL
#endif

// MARK: - Argument parsing
Expand Down
4 changes: 2 additions & 2 deletions Sources/Examples/HelloWorld/Client/HelloWorldClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import ArgumentParser
import GRPC
import HelloWorldModel
import NIOCore
import NIOPosix
@_implementationOnly import NIOCore
@_implementationOnly import NIOPosix

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
@main
Expand Down
4 changes: 2 additions & 2 deletions Sources/Examples/HelloWorld/Model/helloworld.grpc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Source: helloworld.proto
//
import GRPC
import NIO
import NIOConcurrencyHelpers
@_implementationOnly import NIO
@_implementationOnly import NIOConcurrencyHelpers
import SwiftProtobuf


Expand Down
2 changes: 1 addition & 1 deletion Sources/Examples/HelloWorld/Server/GreeterProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import GRPC
import HelloWorldModel
import NIOCore
@_implementationOnly import NIOCore

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
final class GreeterProvider: Helloworld_GreeterAsyncProvider {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Examples/HelloWorld/Server/HelloWorldServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import ArgumentParser
import GRPC
import HelloWorldModel
import NIOCore
import NIOPosix
@_implementationOnly import NIOCore
@_implementationOnly import NIOPosix

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
@main
Expand Down
6 changes: 3 additions & 3 deletions Sources/Examples/PacketCapture/PacketCapture.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import ArgumentParser
import EchoModel
import GRPC
import NIOCore
import NIOExtras
import NIOPosix
@_implementationOnly import NIOCore
@_implementationOnly import NIOExtras
@_implementationOnly import NIOPosix

@main
@available(macOS 10.15, *)
Expand Down
4 changes: 2 additions & 2 deletions Sources/Examples/RouteGuide/Client/RouteGuideClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import ArgumentParser
import Foundation
import GRPC
import NIOCore
import NIOPosix
@_implementationOnly import NIOCore
@_implementationOnly import NIOPosix
import RouteGuideModel

/// Loads the features from `route_guide_db.json`, assumed to be in the directory above this file.
Expand Down
4 changes: 2 additions & 2 deletions Sources/Examples/RouteGuide/Model/route_guide.grpc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Source: route_guide.proto
//
import GRPC
import NIO
import NIOConcurrencyHelpers
@_implementationOnly import NIO
@_implementationOnly import NIOConcurrencyHelpers
import SwiftProtobuf


Expand Down
4 changes: 2 additions & 2 deletions Sources/Examples/RouteGuide/Server/RouteGuideProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
import Foundation
import GRPC
import NIOConcurrencyHelpers
import NIOCore
@_implementationOnly import NIOConcurrencyHelpers
@_implementationOnly import NIOCore
import RouteGuideModel

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
Expand Down
4 changes: 2 additions & 2 deletions Sources/Examples/RouteGuide/Server/RouteGuideServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import ArgumentParser
import struct Foundation.Data
import struct Foundation.URL
import GRPC
import NIOCore
import NIOPosix
@_implementationOnly import NIOCore
@_implementationOnly import NIOPosix
import RouteGuideModel

/// Loads the features from `route_guide_db.json`, assumed to be in the directory above this file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import NIOHPACK
@_implementationOnly import NIOHPACK

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension ServerHandlerStateMachine {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import NIOHPACK
@_implementationOnly import NIOHPACK

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension ServerHandlerStateMachine {
Expand Down
Loading

0 comments on commit 3b36ac7

Please sign in to comment.