sig/plugins/grpc.rbs in httpx-0.15.4 vs sig/plugins/grpc.rbs in httpx-0.16.0
- old
+ new
@@ -13,10 +13,12 @@
type grpc_message = String | _Each[String]
type grpc_request = untyped | _Each[untyped]
type grpc_response = untyped | _Each[untyped]
+ type credentials = Proc
+
class Call
attr_writer decoder: _Callable
def metadata: () -> headers
@@ -37,31 +39,26 @@
def self?.encode: (String bytes, ?deflater: Compression::_Deflater?) -> String
def self?.decode: (String message, encodings: Array[String], encoders: Compression::encodings_registry) -> String
| (String message, encodings: Array[String], encoders: Compression::encodings_registry) { (String) -> void } -> void
-
+
def self?.cancel: (Request) -> void
def self?.verify_status: (StreamResponse | response) -> void
end
interface _GRPCOptions
def grpc_service: () -> String?
- def grpc_service=: (string) -> String
def grpc_compression: () -> compression_option?
- def grpc_compression=: (compression_option) -> compression_option
def grpc_rpcs: () -> Hash[String, rpc_def]?
- def grpc_rpcs=: (Hash[String, rpc_def]) -> Hash[String, rpc_def]
def grpc_deadline: () -> Integer?
- def grpc_deadline=: (Integer) -> Integer
def call_credentials: () -> credentials?
- def call_credentials=: (credentials) -> credentials
end
def self.extra_options: (Options) -> (Options & _GRPCOptions)
def self.load_dependencies: (singleton(Session)) -> void
@@ -86,8 +83,8 @@
def build_grpc_request: (string rpc_method, grpc_message input, ?deadline: Integer, ?metadata?: headers_input, **untyped) -> Request
end
end
- type grpcSession = Session & Plugins::GRPC::InstanceMethods
+ type grpcSession = Session & GRPC::InstanceMethods
end
end