Package namespace.cloud.compute.v1beta
Class ComputeServiceGrpc
java.lang.Object
namespace.cloud.compute.v1beta.ComputeServiceGrpc
ComputeService allows the creation, and management of compute instances.
Compute instances are micro-vm backed environments which boot very quickly
and are optimized to run containers.
See https://namespace.so/docs/architecture/compute for an overview.
## Access
ComputeService is segregated into isolated regions for fault tolerance.
Each of the regional API endpoints offers a view into the compute instances
running at that location. Reach out to Namespace team at support@namespace.so
for a list of available regions.
```
https://{region}.compute.namespaceapis.com:443
# E.g.:
https://eu.compute.namespaceapis.com:443
https://us.compute.namespaceapis.com:443
```
See [the overview](https://buf.build/namespace/cloud) for examples accessing
the API from the console.
## SDKs and Examples
**Go SDK**: [namespacelabs.dev/integrations](https://github.com/namespacelabs/integrations) —
provides ready-to-use gRPC clients and authentication helpers.
**TypeScript SDK**: [@namespacelabs/sdk](https://github.com/namespacelabs/typescript-sdk) —
provides typed clients, authentication, and token management for Node.js.
**Examples** (Go, TypeScript, Python):
[createinstance](https://github.com/namespacelabs/examples/tree/master/go/createinstance),
[kubernetes-demo](https://github.com/namespacelabs/examples/tree/master/typescript/kubernetes-demo),
[containers-demo](https://github.com/namespacelabs/examples/tree/master/typescript/containers-demo),
[ingress](https://github.com/namespacelabs/examples/tree/master/go/ingress),
and [more](https://github.com/namespacelabs/examples).
## Authentication
Calls to the ComputeService require a *tenant token* or a *workload token*
passed as a Bearer token as part of each call. These are always required.
A *tenant token* identifies both the workspace that the call operates on, but
may also constrain the set of actions that the caller may do.
A *workload token* identifies a running instance, and the workspace it is
running in. Each running instance has a workload token, which is
automatically made available to services running inside the instance.
A *tenant token* can be obtained using the
[IAM API](https://buf.build/namespace/cloud/docs/main:namespace.cloud.iam.v1beta).
## Guest services
Managed guest services such as docker that are deployed and managed by
Namespace are reachable using the corresponding standard APIs, through the
public internet.
Because these services typically don't support Namespace-based encapsulation,
a client-side proxy is used to transport the application-specific protocol
over the Namespace's public ingress, into the instance.
To facilitate communication, the main underlying mechanism to transport the
application-specific protocol is WebSockets over HTTPS.
### Example: using the Docker API
To call the Docker API remotely, first obtain the Docker public endpoint by
querying the set of running Services, using the DescribeInstance call.
Iterate over `metadata.services` until finding an entry with `name=docker`.
Establish an HTTPS connection to the contained `endpoint`, and upgrade it to
a WebSocket. To authenticate your request include an authentication token
(see Authentication) in the `x-nsc-ingress-auth` header.
If connecting using a browser, where setting headers is not possible, you can
instead construct a URL using the base endpoint, and passing
`x-nsc-ingress-auth` as a query string argument.
After the WebSocket is established, any frames received or sent of type
BinaryMessage carry application-specific payload.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceComputeService allows the creation, and management of compute instances.static final classA stub to allow clients to do limited synchronous rpc calls to service ComputeService.static final classA stub to allow clients to do synchronous rpc calls to service ComputeService.static final classA stub to allow clients to do ListenableFuture-style rpc calls to service ComputeService.static classBase class for the server implementation of the service ComputeService.static final classA stub to allow clients to do asynchronous rpc calls to service ComputeService. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic final io.grpc.ServerServiceDefinitionstatic io.grpc.MethodDescriptor<Compute.CreateIngressRequest, Compute.CreateIngressResponse> static io.grpc.MethodDescriptor<Compute.CreateInstanceRequest, Compute.DescribeInstanceResponse> static io.grpc.MethodDescriptor<Compute.DescribeInstanceRequest, Compute.DescribeInstanceResponse> static io.grpc.MethodDescriptor<Compute.DestroyInstanceRequest, com.google.protobuf.Empty> static io.grpc.MethodDescriptor<Compute.ExtendInstanceRequest, Compute.ExtendInstanceResponse> static io.grpc.MethodDescriptor<Compute.GetInstanceMetricsRequest, Compute.GetInstanceMetricsResponse> static io.grpc.MethodDescriptor<Compute.GetKubernetesConfigRequest, Compute.GetKubernetesConfigResponse> static io.grpc.MethodDescriptor<Compute.GetNetworkConfigurationRequest, Compute.GetNetworkConfigurationResponse> static io.grpc.MethodDescriptor<Compute.GetSSHConfigRequest, Compute.GetSSHConfigResponse> static io.grpc.MethodDescriptor<Compute.GetVNCConfigRequest, Compute.GetVNCConfigResponse> static io.grpc.MethodDescriptor<Compute.ListIngressesRequest, Compute.ListIngressesResponse> static io.grpc.MethodDescriptor<Compute.ListInstanceNotificationsRequest, Compute.ListInstanceNotificationsResponse> static io.grpc.MethodDescriptor<Compute.ListInstancesRequest, Compute.ListInstancesResponse> static io.grpc.MethodDescriptor<Compute.OptimizeImageRequest, Compute.OptimizeImageProgress> static io.grpc.MethodDescriptor<Compute.ReleaseUniqueTagRequest, Compute.ReleaseUniqueTagResponse> static io.grpc.ServiceDescriptorstatic io.grpc.MethodDescriptor<Compute.StartContainersRequest, Compute.StartContainersResponse> static io.grpc.MethodDescriptor<Compute.SuspendInstanceRequest, com.google.protobuf.Empty> static io.grpc.MethodDescriptor<Compute.WaitInstanceRequest, Compute.WaitInstanceResponse> static io.grpc.MethodDescriptor<Compute.WaitInstanceRequest, Compute.WaitInstanceResponse> static io.grpc.MethodDescriptor<Compute.WakeInstanceRequest, com.google.protobuf.Empty> newBlockingStub(io.grpc.Channel channel) Creates a new blocking-style stub that supports unary and streaming output calls on the servicenewBlockingV2Stub(io.grpc.Channel channel) Creates a new blocking-style stub that supports all types of calls on the servicenewFutureStub(io.grpc.Channel channel) Creates a new ListenableFuture-style stub that supports unary calls on the servicenewStub(io.grpc.Channel channel) Creates a new async stub that supports all call types for the service
-
Field Details
-
SERVICE_NAME
- See Also:
-
-
Method Details
-
getCreateInstanceMethod
public static io.grpc.MethodDescriptor<Compute.CreateInstanceRequest,Compute.DescribeInstanceResponse> getCreateInstanceMethod() -
getWaitInstanceMethod
public static io.grpc.MethodDescriptor<Compute.WaitInstanceRequest,Compute.WaitInstanceResponse> getWaitInstanceMethod() -
getWaitInstanceSyncMethod
public static io.grpc.MethodDescriptor<Compute.WaitInstanceRequest,Compute.WaitInstanceResponse> getWaitInstanceSyncMethod() -
getExtendInstanceMethod
public static io.grpc.MethodDescriptor<Compute.ExtendInstanceRequest,Compute.ExtendInstanceResponse> getExtendInstanceMethod() -
getStartContainersMethod
public static io.grpc.MethodDescriptor<Compute.StartContainersRequest,Compute.StartContainersResponse> getStartContainersMethod() -
getDescribeInstanceMethod
public static io.grpc.MethodDescriptor<Compute.DescribeInstanceRequest,Compute.DescribeInstanceResponse> getDescribeInstanceMethod() -
getDestroyInstanceMethod
public static io.grpc.MethodDescriptor<Compute.DestroyInstanceRequest,com.google.protobuf.Empty> getDestroyInstanceMethod() -
getListInstancesMethod
public static io.grpc.MethodDescriptor<Compute.ListInstancesRequest,Compute.ListInstancesResponse> getListInstancesMethod() -
getSuspendInstanceMethod
public static io.grpc.MethodDescriptor<Compute.SuspendInstanceRequest,com.google.protobuf.Empty> getSuspendInstanceMethod() -
getWakeInstanceMethod
public static io.grpc.MethodDescriptor<Compute.WakeInstanceRequest,com.google.protobuf.Empty> getWakeInstanceMethod() -
getCreateIngressMethod
public static io.grpc.MethodDescriptor<Compute.CreateIngressRequest,Compute.CreateIngressResponse> getCreateIngressMethod() -
getListIngressesMethod
public static io.grpc.MethodDescriptor<Compute.ListIngressesRequest,Compute.ListIngressesResponse> getListIngressesMethod() -
getGetKubernetesConfigMethod
public static io.grpc.MethodDescriptor<Compute.GetKubernetesConfigRequest,Compute.GetKubernetesConfigResponse> getGetKubernetesConfigMethod() -
getGetInstanceMetricsMethod
public static io.grpc.MethodDescriptor<Compute.GetInstanceMetricsRequest,Compute.GetInstanceMetricsResponse> getGetInstanceMetricsMethod() -
getGetNetworkConfigurationMethod
public static io.grpc.MethodDescriptor<Compute.GetNetworkConfigurationRequest,Compute.GetNetworkConfigurationResponse> getGetNetworkConfigurationMethod() -
getGetSSHConfigMethod
public static io.grpc.MethodDescriptor<Compute.GetSSHConfigRequest,Compute.GetSSHConfigResponse> getGetSSHConfigMethod() -
getGetVNCConfigMethod
public static io.grpc.MethodDescriptor<Compute.GetVNCConfigRequest,Compute.GetVNCConfigResponse> getGetVNCConfigMethod() -
getReleaseUniqueTagMethod
public static io.grpc.MethodDescriptor<Compute.ReleaseUniqueTagRequest,Compute.ReleaseUniqueTagResponse> getReleaseUniqueTagMethod() -
getOptimizeImageMethod
public static io.grpc.MethodDescriptor<Compute.OptimizeImageRequest,Compute.OptimizeImageProgress> getOptimizeImageMethod() -
getListInstanceNotificationsMethod
public static io.grpc.MethodDescriptor<Compute.ListInstanceNotificationsRequest,Compute.ListInstanceNotificationsResponse> getListInstanceNotificationsMethod() -
newStub
Creates a new async stub that supports all call types for the service -
newBlockingV2Stub
public static ComputeServiceGrpc.ComputeServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) Creates a new blocking-style stub that supports all types of calls on the service -
newBlockingStub
public static ComputeServiceGrpc.ComputeServiceBlockingStub newBlockingStub(io.grpc.Channel channel) Creates a new blocking-style stub that supports unary and streaming output calls on the service -
newFutureStub
Creates a new ListenableFuture-style stub that supports unary calls on the service -
bindService
public static final io.grpc.ServerServiceDefinition bindService(ComputeServiceGrpc.AsyncService service) -
getServiceDescriptor
public static io.grpc.ServiceDescriptor getServiceDescriptor()
-