mirror of
https://github.com/GayPizzaSpecifications/stable-diffusion-rpc.git
synced 2025-08-06 06:41:30 +00:00
update to latest versions
This commit is contained in:
@ -1,25 +1,10 @@
|
||||
//
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the protocol buffer compiler.
|
||||
// Source: jobs.proto
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright 2018, gRPC Authors All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import GRPC
|
||||
import NIO
|
||||
import NIOConcurrencyHelpers
|
||||
@ -114,10 +99,8 @@ extension SdJobServiceClientProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=5.6)
|
||||
@available(*, deprecated)
|
||||
extension SdJobServiceClient: @unchecked Sendable {}
|
||||
#endif // compiler(>=5.6)
|
||||
|
||||
@available(*, deprecated, renamed: "SdJobServiceNIOClient")
|
||||
public final class SdJobServiceClient: SdJobServiceClientProtocol {
|
||||
@ -173,7 +156,6 @@ public struct SdJobServiceNIOClient: SdJobServiceClientProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=5.6)
|
||||
///*
|
||||
/// The job service, for inspecting and monitoring the state of jobs executing on the service.
|
||||
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
|
||||
@ -300,9 +282,7 @@ public struct SdJobServiceAsyncClient: SdJobServiceAsyncClientProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
#endif // compiler(>=5.6)
|
||||
|
||||
public protocol SdJobServiceClientInterceptorFactoryProtocol: GRPCSendable {
|
||||
public protocol SdJobServiceClientInterceptorFactoryProtocol: Sendable {
|
||||
|
||||
/// - Returns: Interceptors to use when invoking 'getJob'.
|
||||
func makeGetJobInterceptors() -> [ClientInterceptor<SdGetJobRequest, SdGetJobResponse>]
|
||||
@ -405,28 +385,26 @@ extension SdJobServiceProvider {
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=5.6)
|
||||
|
||||
///*
|
||||
/// The job service, for inspecting and monitoring the state of jobs executing on the service.
|
||||
///
|
||||
/// To implement a server, implement an object which conforms to this protocol.
|
||||
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
|
||||
public protocol SdJobServiceAsyncProvider: CallHandlerProvider {
|
||||
public protocol SdJobServiceAsyncProvider: CallHandlerProvider, Sendable {
|
||||
static var serviceDescriptor: GRPCServiceDescriptor { get }
|
||||
var interceptors: SdJobServiceServerInterceptorFactoryProtocol? { get }
|
||||
|
||||
@Sendable func getJob(
|
||||
func getJob(
|
||||
request: SdGetJobRequest,
|
||||
context: GRPCAsyncServerCallContext
|
||||
) async throws -> SdGetJobResponse
|
||||
|
||||
@Sendable func cancelJob(
|
||||
func cancelJob(
|
||||
request: SdCancelJobRequest,
|
||||
context: GRPCAsyncServerCallContext
|
||||
) async throws -> SdCancelJobResponse
|
||||
|
||||
@Sendable func streamJobUpdates(
|
||||
func streamJobUpdates(
|
||||
request: SdStreamJobUpdatesRequest,
|
||||
responseStream: GRPCAsyncResponseStreamWriter<SdJobUpdate>,
|
||||
context: GRPCAsyncServerCallContext
|
||||
@ -458,7 +436,7 @@ extension SdJobServiceAsyncProvider {
|
||||
requestDeserializer: ProtobufDeserializer<SdGetJobRequest>(),
|
||||
responseSerializer: ProtobufSerializer<SdGetJobResponse>(),
|
||||
interceptors: self.interceptors?.makeGetJobInterceptors() ?? [],
|
||||
wrapping: self.getJob(request:context:)
|
||||
wrapping: { try await self.getJob(request: $0, context: $1) }
|
||||
)
|
||||
|
||||
case "CancelJob":
|
||||
@ -467,7 +445,7 @@ extension SdJobServiceAsyncProvider {
|
||||
requestDeserializer: ProtobufDeserializer<SdCancelJobRequest>(),
|
||||
responseSerializer: ProtobufSerializer<SdCancelJobResponse>(),
|
||||
interceptors: self.interceptors?.makeCancelJobInterceptors() ?? [],
|
||||
wrapping: self.cancelJob(request:context:)
|
||||
wrapping: { try await self.cancelJob(request: $0, context: $1) }
|
||||
)
|
||||
|
||||
case "StreamJobUpdates":
|
||||
@ -476,7 +454,7 @@ extension SdJobServiceAsyncProvider {
|
||||
requestDeserializer: ProtobufDeserializer<SdStreamJobUpdatesRequest>(),
|
||||
responseSerializer: ProtobufSerializer<SdJobUpdate>(),
|
||||
interceptors: self.interceptors?.makeStreamJobUpdatesInterceptors() ?? [],
|
||||
wrapping: self.streamJobUpdates(request:responseStream:context:)
|
||||
wrapping: { try await self.streamJobUpdates(request: $0, responseStream: $1, context: $2) }
|
||||
)
|
||||
|
||||
default:
|
||||
@ -485,9 +463,7 @@ extension SdJobServiceAsyncProvider {
|
||||
}
|
||||
}
|
||||
|
||||
#endif // compiler(>=5.6)
|
||||
|
||||
public protocol SdJobServiceServerInterceptorFactoryProtocol {
|
||||
public protocol SdJobServiceServerInterceptorFactoryProtocol: Sendable {
|
||||
|
||||
/// - Returns: Interceptors to use when handling 'getJob'.
|
||||
/// Defaults to calling `self.makeInterceptors()`.
|
||||
|
Reference in New Issue
Block a user