internalpbconnect

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 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 = "/internal.v1.RemotingService/RemoteAsk"
	// RemotingServiceRemoteTellProcedure is the fully-qualified name of the RemotingService's
	// RemoteTell RPC.
	RemotingServiceRemoteTellProcedure = "/internal.v1.RemotingService/RemoteTell"
	// RemotingServiceRemoteLookupProcedure is the fully-qualified name of the RemotingService's
	// RemoteLookup RPC.
	RemotingServiceRemoteLookupProcedure = "/internal.v1.RemotingService/RemoteLookup"
	// RemotingServiceRemoteBatchTellProcedure is the fully-qualified name of the RemotingService's
	// RemoteBatchTell RPC.
	RemotingServiceRemoteBatchTellProcedure = "/internal.v1.RemotingService/RemoteBatchTell"
	// RemotingServiceRemoteBatchAskProcedure is the fully-qualified name of the RemotingService's
	// RemoteBatchAsk RPC.
	RemotingServiceRemoteBatchAskProcedure = "/internal.v1.RemotingService/RemoteBatchAsk"
)

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 = "internal.v1.RemotingService"
)

Variables

This section is empty.

Functions

func NewRemotingServiceHandler added in v0.8.1

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 added in v0.8.1

type RemotingServiceClient interface {
	// RemoteAsk is used to send a message to an actor remotely and expect a response immediately.
	RemoteAsk(context.Context, *connect.Request[v1.RemoteAskRequest]) (*connect.Response[v1.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.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)
	// RemoteBatchTell is used to send a bulk of messages to a remote actor
	RemoteBatchTell(context.Context, *connect.Request[v1.RemoteBatchTellRequest]) (*connect.Response[v1.RemoteBatchTellResponse], error)
	// RemoteBatchAsk is used to send a bulk messages to a remote actor with replies.
	// The replies are sent in the same order as the messages
	RemoteBatchAsk(context.Context, *connect.Request[v1.RemoteBatchAskRequest]) (*connect.Response[v1.RemoteBatchAskResponse], error)
}

RemotingServiceClient is a client for the internal.v1.RemotingService service.

func NewRemotingServiceClient added in v0.8.1

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

NewRemotingServiceClient constructs a client for the internal.v1.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 added in v0.8.1

type RemotingServiceHandler interface {
	// RemoteAsk is used to send a message to an actor remotely and expect a response immediately.
	RemoteAsk(context.Context, *connect.Request[v1.RemoteAskRequest]) (*connect.Response[v1.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.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)
	// RemoteBatchTell is used to send a bulk of messages to a remote actor
	RemoteBatchTell(context.Context, *connect.Request[v1.RemoteBatchTellRequest]) (*connect.Response[v1.RemoteBatchTellResponse], error)
	// RemoteBatchAsk is used to send a bulk messages to a remote actor with replies.
	// The replies are sent in the same order as the messages
	RemoteBatchAsk(context.Context, *connect.Request[v1.RemoteBatchAskRequest]) (*connect.Response[v1.RemoteBatchAskResponse], error)
}

RemotingServiceHandler is an implementation of the internal.v1.RemotingService service.

type UnimplementedRemotingServiceHandler added in v0.8.1

type UnimplementedRemotingServiceHandler struct{}

UnimplementedRemotingServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedRemotingServiceHandler) RemoteAsk added in v0.8.1

func (UnimplementedRemotingServiceHandler) RemoteBatchAsk added in v1.3.4

func (UnimplementedRemotingServiceHandler) RemoteBatchTell added in v1.3.4

func (UnimplementedRemotingServiceHandler) RemoteLookup added in v0.8.1

func (UnimplementedRemotingServiceHandler) RemoteTell added in v0.8.1

Jump to

Keyboard shortcuts

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