Protocols
The following protocols are available globally.
-
Base protocol for a Grebe call to a gRPC service.
gRPC lets you define four kinds of service method:
- Unary RPCs (
GUnaryCall
) - Server streaming RPCs (
GServerStreamingCall
) - Client streaming RPCs (
GClientStreamingCall
) - Bidirectional streaming RPCs (
GBidirectionalStreamingCall
)
To run an instance of
See moreICall
, call theexecute
method of the specific call.Declaration
Swift
public protocol ICall
- Unary RPCs (
-
Classes conforming to this protocol can create a
See moreGRPCClient
using aClientConnection
andCallOptions
.Declaration
Swift
public protocol GRPCClientInitializable : GRPCClient
-
A Grebe client
This client encapsulates a
GRPCClient
that conforms toGRPCClientInitializable
. TheGRPCClient
is created at initialization. To hide the complexity of aGRPCClient
the initializer takes aConnectionTarget
andCallOptions
as only parameters.Example Usage
See morelet client = GClient<EchoServiceServiceClient>(target: .hostAndPort("localhost", 62801))
Declaration
Swift
public protocol IGClient