Cloud API Overview > @adpt/cloud
cloud package
Classes
Class | Description |
---|---|
Compute | (BETA) Abstract element to represent a computational resource |
Container | Abstract component representing a container. |
NetworkService | An abstract component that represents a network service. |
Service | An abstract component that represents a group of components that implements a service. Note that this is not necessarily a network service, but will often be. |
Enumerations
Enumeration | Description |
---|---|
NetworkScope | (BETA) Type for various network address scopes |
Functions
Function | Description |
---|---|
formatEnvVars(env) | Formats an Environment for printing in human-readable format. |
isContainerElement(el) | Function to check whether an @adpt/core#AdaptElement is an abstract Container. |
isNetworkServiceElement(el) | Type assertion that tests an element to see if it is a NetworkService |
lookupEnvVar(e, name) | Find the value of an environment variable in an Environment |
makeResourceName(invalidChars, maxLen, sep) | Creates a function for generating unique names for Adapt Elements. |
mergeEnvPairs(envs) | Combine multiple Environment objects into a single array of EnvPair objects. Returns undefined if there are no Environment objects provided. |
mergeEnvSimple(envs) | Combine multiple Environment objects into a single EnvSimple object. Returns undefined if there are no Environment objects provided. |
renameEnvVars(e, mapping) | Renames all variables in e based on mapping |
targetPort(elemOrProps) | Computes the target port that will be used for a NetworkService |
updateEnvVars(e, upd) | Updates the names and/or values of variables in an Environment |
useConnectTo(connectTo, xform) | Hook that will build an Environment object from components that comply with ConnectToInstance |
useConnectTo(connectTo, options) | Hook that will build an Environment object from components that comply with ConnectToInstance |
useLatestImageFrom(source) | (BETA) Hook function to translate an ImageId (which can be either a Handle or an image name string) into an image name string. |
Interfaces
Interface | Description |
---|---|
ComputeProps | (BETA) Props for a Compute element |
Config | Config for ContainerStatus |
ConnectToInstance | Components that provide a service, such as a database service or API service, can implement this interface in order to supply all the information required to connect to the service. |
ContainerLabels | Labels for a Container |
ContainerNetwork | Network for ContainerStatus |
ContainerNetworkSettings | NetworkSettings for ContainerStatus |
ContainerProps | Props for the Container component. |
ContainerState | State information for a Container. |
ContainerStatus | Status of a Container. |
EnvPair | A single environment variable for a Container, expressed as an object with name and value properties. |
EnvSimple | A set of environment variables for a Container, expressed as a single object with keys and associated values. |
HostConfigStatus | HostConfig for ContainerStatus |
Links | Network links to create for a Container. |
MountStatus | Mount information for ContainerStatus |
NetworkServiceInstance | (BETA) Interface for components that expose Network Services via hostname and port |
NetworkServiceProps | Props for the NetworkService element |
PortBinding | A set of ports to be bound for a Container. |
PortBindingsStatus | PortBindings for ContainerStatus |
PortBindingStatus | PortBinding information for ContainerStatus |
RestartPolicy | The behavior to apply when the container exits. |
RestartPolicyStatus | Restart policy status for ContainerStatus |
ServiceProps | Props for Service |
UseConnectToOptions | Options for useConnectTo |
Namespaces
Namespace | Description |
---|---|
action | Action library for implementing simple primitive components. |
aws | (BETA) AWS library for Adapt. |
docker | Docker library for Adapt. |
gcloud | Google Cloud Platform library for Adapt. |
http | Adapt components for HTTP |
k8s | Adapt components for Kubernetes |
mongodb | The library for MongoDB for Adapt. |
nginx | Various Adapt Components based on nginx |
nodejs | The library for Node.js for Adapt. |
postgres | The Postgres library for Adapt. |
redis | The Redis library for Adapt. |
Type Aliases
Type Alias | Description |
---|---|
Command | A command to be used when creating a Container. |
Environment | A set of environment variables for a Container. |
EnvPairs | A set of environment variables for a Container, expressed as an array of objects with name and value properties. |
ImageId | An image for a Container. |
NetworkServiceScope | Network service scope used by NetworkService |
PortDescription | Description of a network port for a Container. |
RestartPolicyName | Names for RestartPolicy |
ServicePort | Port for NetworkService |