Documentation ¶
Index ¶
- Constants
- func NewRemoteMessagingServiceHandler(svc RemoteMessagingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type RemoteMessagingServiceClient
- type RemoteMessagingServiceHandler
- type UnimplementedRemoteMessagingServiceHandler
- func (UnimplementedRemoteMessagingServiceHandler) RemoteAsk(context.Context, *connect.Request[v1.RemoteAskRequest]) (*connect.Response[v1.RemoteAskResponse], error)
- func (UnimplementedRemoteMessagingServiceHandler) RemoteLookup(context.Context, *connect.Request[v1.RemoteLookupRequest]) (*connect.Response[v1.RemoteLookupResponse], error)
- func (UnimplementedRemoteMessagingServiceHandler) RemoteTell(context.Context, *connect.Request[v1.RemoteTellRequest]) (*connect.Response[v1.RemoteTellResponse], error)
Constants ¶
const ( // RemoteMessagingServiceRemoteAskProcedure is the fully-qualified name of the // RemoteMessagingService's RemoteAsk RPC. RemoteMessagingServiceRemoteAskProcedure = "/internal.v1.RemoteMessagingService/RemoteAsk" // RemoteMessagingServiceRemoteTellProcedure is the fully-qualified name of the // RemoteMessagingService's RemoteTell RPC. RemoteMessagingServiceRemoteTellProcedure = "/internal.v1.RemoteMessagingService/RemoteTell" // RemoteMessagingServiceRemoteLookupProcedure is the fully-qualified name of the // RemoteMessagingService's RemoteLookup RPC. RemoteMessagingServiceRemoteLookupProcedure = "/internal.v1.RemoteMessagingService/RemoteLookup" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const (
// RemoteMessagingServiceName is the fully-qualified name of the RemoteMessagingService service.
RemoteMessagingServiceName = "internal.v1.RemoteMessagingService"
)
Variables ¶
This section is empty.
Functions ¶
func NewRemoteMessagingServiceHandler ¶
func NewRemoteMessagingServiceHandler(svc RemoteMessagingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewRemoteMessagingServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type RemoteMessagingServiceClient ¶
type RemoteMessagingServiceClient interface { // RemoteAsk is used to send a message to an actor remotely and expect a response // immediately. With this type of message the receiver cannot communicate back to Sender // except reply the message with a response. This one-way communication RemoteAsk(context.Context, *connect.Request[v1.RemoteAskRequest]) (*connect.Response[v1.RemoteAskResponse], error) // RemoteTell is used to send a message to an actor remotely by another actor // This is the only way remote actors can interact with each other. The actor on the // other line can reply to the sender by using the Sender in the message RemoteTell(context.Context, *connect.Request[v1.RemoteTellRequest]) (*connect.Response[v1.RemoteTellResponse], error) // Lookup for an actor on a remote host. RemoteLookup(context.Context, *connect.Request[v1.RemoteLookupRequest]) (*connect.Response[v1.RemoteLookupResponse], error) }
RemoteMessagingServiceClient is a client for the internal.v1.RemoteMessagingService service.
func NewRemoteMessagingServiceClient ¶
func NewRemoteMessagingServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RemoteMessagingServiceClient
NewRemoteMessagingServiceClient constructs a client for the internal.v1.RemoteMessagingService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type RemoteMessagingServiceHandler ¶
type RemoteMessagingServiceHandler interface { // RemoteAsk is used to send a message to an actor remotely and expect a response // immediately. With this type of message the receiver cannot communicate back to Sender // except reply the message with a response. This one-way communication RemoteAsk(context.Context, *connect.Request[v1.RemoteAskRequest]) (*connect.Response[v1.RemoteAskResponse], error) // RemoteTell is used to send a message to an actor remotely by another actor // This is the only way remote actors can interact with each other. The actor on the // other line can reply to the sender by using the Sender in the message RemoteTell(context.Context, *connect.Request[v1.RemoteTellRequest]) (*connect.Response[v1.RemoteTellResponse], error) // Lookup for an actor on a remote host. RemoteLookup(context.Context, *connect.Request[v1.RemoteLookupRequest]) (*connect.Response[v1.RemoteLookupResponse], error) }
RemoteMessagingServiceHandler is an implementation of the internal.v1.RemoteMessagingService service.
type UnimplementedRemoteMessagingServiceHandler ¶
type UnimplementedRemoteMessagingServiceHandler struct{}
UnimplementedRemoteMessagingServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedRemoteMessagingServiceHandler) RemoteAsk ¶
func (UnimplementedRemoteMessagingServiceHandler) RemoteAsk(context.Context, *connect.Request[v1.RemoteAskRequest]) (*connect.Response[v1.RemoteAskResponse], error)
func (UnimplementedRemoteMessagingServiceHandler) RemoteLookup ¶
func (UnimplementedRemoteMessagingServiceHandler) RemoteLookup(context.Context, *connect.Request[v1.RemoteLookupRequest]) (*connect.Response[v1.RemoteLookupResponse], error)
func (UnimplementedRemoteMessagingServiceHandler) RemoteTell ¶
func (UnimplementedRemoteMessagingServiceHandler) RemoteTell(context.Context, *connect.Request[v1.RemoteTellRequest]) (*connect.Response[v1.RemoteTellResponse], error)