internalpbconnect

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RemotingServiceRemoteAskProcedure is the fully-qualified name of the RemotingService's RemoteAsk
	// RPC.
	RemotingServiceRemoteAskProcedure = "/internalpb.RemotingService/RemoteAsk"
	// RemotingServiceRemoteTellProcedure is the fully-qualified name of the RemotingService's
	// RemoteTell RPC.
	RemotingServiceRemoteTellProcedure = "/internalpb.RemotingService/RemoteTell"
	// RemotingServiceRemoteLookupProcedure is the fully-qualified name of the RemotingService's
	// RemoteLookup RPC.
	RemotingServiceRemoteLookupProcedure = "/internalpb.RemotingService/RemoteLookup"
	// RemotingServiceRemoteReSpawnProcedure is the fully-qualified name of the RemotingService's
	// RemoteReSpawn RPC.
	RemotingServiceRemoteReSpawnProcedure = "/internalpb.RemotingService/RemoteReSpawn"
	// RemotingServiceRemoteStopProcedure is the fully-qualified name of the RemotingService's
	// RemoteStop RPC.
	RemotingServiceRemoteStopProcedure = "/internalpb.RemotingService/RemoteStop"
	// RemotingServiceRemoteSpawnProcedure is the fully-qualified name of the RemotingService's
	// RemoteSpawn RPC.
	RemotingServiceRemoteSpawnProcedure = "/internalpb.RemotingService/RemoteSpawn"
)

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 (
	// RemotingServiceName is the fully-qualified name of the RemotingService service.
	RemotingServiceName = "internalpb.RemotingService"
)

Variables

This section is empty.

Functions

func NewRemotingServiceHandler

func NewRemotingServiceHandler(svc RemotingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewRemotingServiceHandler 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 RemotingServiceClient

type RemotingServiceClient interface {
	// RemoteAsk is used to send a message to an actor remotely and expect a response immediately.
	RemoteAsk(context.Context) *connect.BidiStreamForClient[internalpb.RemoteAskRequest, internalpb.RemoteAskResponse]
	// RemoteTell is used to send a message to a remote actor
	// The actor on the other line can reply to the sender by using the Sender in the message
	RemoteTell(context.Context) *connect.ClientStreamForClient[internalpb.RemoteTellRequest, internalpb.RemoteTellResponse]
	// Lookup for an actor on a remote host.
	RemoteLookup(context.Context, *connect.Request[internalpb.RemoteLookupRequest]) (*connect.Response[internalpb.RemoteLookupResponse], error)
	// RemoteReSpawn restarts an actor on a remote machine
	RemoteReSpawn(context.Context, *connect.Request[internalpb.RemoteReSpawnRequest]) (*connect.Response[internalpb.RemoteReSpawnResponse], error)
	// RemoteStop stops an actor on a remote machine
	RemoteStop(context.Context, *connect.Request[internalpb.RemoteStopRequest]) (*connect.Response[internalpb.RemoteStopResponse], error)
	// RemoteSpawn starts an actor on a remote machine
	RemoteSpawn(context.Context, *connect.Request[internalpb.RemoteSpawnRequest]) (*connect.Response[internalpb.RemoteSpawnResponse], error)
}

RemotingServiceClient is a client for the internalpb.RemotingService service.

func NewRemotingServiceClient

func NewRemotingServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RemotingServiceClient

NewRemotingServiceClient constructs a client for the internalpb.RemotingService 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 RemotingServiceHandler

type RemotingServiceHandler interface {
	// RemoteAsk is used to send a message to an actor remotely and expect a response immediately.
	RemoteAsk(context.Context, *connect.BidiStream[internalpb.RemoteAskRequest, internalpb.RemoteAskResponse]) error
	// RemoteTell is used to send a message to a remote actor
	// The actor on the other line can reply to the sender by using the Sender in the message
	RemoteTell(context.Context, *connect.ClientStream[internalpb.RemoteTellRequest]) (*connect.Response[internalpb.RemoteTellResponse], error)
	// Lookup for an actor on a remote host.
	RemoteLookup(context.Context, *connect.Request[internalpb.RemoteLookupRequest]) (*connect.Response[internalpb.RemoteLookupResponse], error)
	// RemoteReSpawn restarts an actor on a remote machine
	RemoteReSpawn(context.Context, *connect.Request[internalpb.RemoteReSpawnRequest]) (*connect.Response[internalpb.RemoteReSpawnResponse], error)
	// RemoteStop stops an actor on a remote machine
	RemoteStop(context.Context, *connect.Request[internalpb.RemoteStopRequest]) (*connect.Response[internalpb.RemoteStopResponse], error)
	// RemoteSpawn starts an actor on a remote machine
	RemoteSpawn(context.Context, *connect.Request[internalpb.RemoteSpawnRequest]) (*connect.Response[internalpb.RemoteSpawnResponse], error)
}

RemotingServiceHandler is an implementation of the internalpb.RemotingService service.

type UnimplementedRemotingServiceHandler

type UnimplementedRemotingServiceHandler struct{}

UnimplementedRemotingServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedRemotingServiceHandler) RemoteSpawn added in v1.6.0

func (UnimplementedRemotingServiceHandler) RemoteStop added in v1.5.1

Jump to

Keyboard shortcuts

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