internalpbconnect

package
v2.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ClusterServiceGetNodeMetricProcedure is the fully-qualified name of the ClusterService's
	// GetNodeMetric RPC.
	ClusterServiceGetNodeMetricProcedure = "/internalpb.ClusterService/GetNodeMetric"
	// ClusterServiceGetKindsProcedure is the fully-qualified name of the ClusterService's GetKinds RPC.
	ClusterServiceGetKindsProcedure = "/internalpb.ClusterService/GetKinds"
)

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

Variables

This section is empty.

Functions

func NewClusterServiceHandler added in v2.2.1

func NewClusterServiceHandler(svc ClusterServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewClusterServiceHandler 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.

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 ClusterServiceClient added in v2.2.1

type ClusterServiceClient interface {
	// GetNodeMetric returns the node metric
	GetNodeMetric(context.Context, *connect.Request[internalpb.GetNodeMetricRequest]) (*connect.Response[internalpb.GetNodeMetricResponse], error)
	// GetKinds returns the list of cluster kinds
	GetKinds(context.Context, *connect.Request[internalpb.GetKindsRequest]) (*connect.Response[internalpb.GetKindsResponse], error)
}

ClusterServiceClient is a client for the internalpb.ClusterService service.

func NewClusterServiceClient added in v2.2.1

func NewClusterServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ClusterServiceClient

NewClusterServiceClient constructs a client for the internalpb.ClusterService 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 ClusterServiceHandler added in v2.2.1

type ClusterServiceHandler interface {
	// GetNodeMetric returns the node metric
	GetNodeMetric(context.Context, *connect.Request[internalpb.GetNodeMetricRequest]) (*connect.Response[internalpb.GetNodeMetricResponse], error)
	// GetKinds returns the list of cluster kinds
	GetKinds(context.Context, *connect.Request[internalpb.GetKindsRequest]) (*connect.Response[internalpb.GetKindsResponse], error)
}

ClusterServiceHandler is an implementation of the internalpb.ClusterService service.

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 UnimplementedClusterServiceHandler added in v2.2.1

type UnimplementedClusterServiceHandler struct{}

UnimplementedClusterServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedClusterServiceHandler) GetKinds added in v2.2.1

type UnimplementedRemotingServiceHandler

type UnimplementedRemotingServiceHandler struct{}

UnimplementedRemotingServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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