瀏覽代碼

Make the `metadata`, `host` and `timeout` properties on `ServiceClient` writable.

Daniel Alm 7 年之前
父節點
當前提交
9124aeeb6f
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      Sources/SwiftGRPC/Runtime/ServiceClient.swift

+ 4 - 4
Sources/SwiftGRPC/Runtime/ServiceClient.swift

@@ -18,19 +18,19 @@ import Dispatch
 import Foundation
 import SwiftProtobuf
 
-public protocol ServiceClient {
+public protocol ServiceClient: class {
   var channel: Channel { get }
 
   /// This metadata will be sent with all requests.
-  var metadata: Metadata { get }
+  var metadata: Metadata { get set }
 
   /// This property allows the service host name to be overridden.
   /// For example, it can be used to make calls to "localhost:8080"
   /// appear to be to "example.com".
-  var host: String { get }
+  var host: String { get set }
 
   /// This property allows the service timeout to be overridden.
-  var timeout: TimeInterval { get }
+  var timeout: TimeInterval { get set }
 }
 
 open class ServiceClientBase: ServiceClient {