internalpbconnect

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
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.

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL