Services
Each service defined in your Raindrop build manifests maps to a serverless function. These services can be activated in one of three ways:
- HTTP-Activated Service (service): Triggered by HTTP requests.
- Queue-Activated Service (observer): Initiated by messages in a queue.
- Object-Activated Service (observer): Activated when an object-related event occurs.
The following sections will guide you on defining each activation mechanism in your Raindrop manifest.
HTTP-Activated Service
To create a new HTTP-activated service to your application add the following code to your manifest.
To configure your service’s domain:
- Replace
<UNIQUE-SERVICE-NAME>
with a name for your service - Replace
<ORG-ID>
with your organization ID (in lowercase)
You can find your organization ID in the Raindrop dashboard URL at liquidmetal.run. Your organization ID is added to the end of the URL e.g https://liquidmetal.run/o/org_<YOUR-ORG-ID>
Each HTTP-activated service must have a unique, fully qualified domain name (FQDN). To prevent conflicts, ensure that the service name is unique within your account. Once deployed, your new service will be accessible as a CRUD REST API.
Queue-Activated Service
Queue-activated services run when new messages arrive in a queue. Define your queue first - this becomes the trigger source for your observer.
Adding a queue observer to raindrop.manifest
automatically sets up the function code, queue configuration, and required service bindings after running raindrop build generate
.
Bucket-Activated Service
Bucket-activated services run when new objects appear in a bucket. Define your bucket first - this becomes the trigger source for your observer.
Adding a bucket observer to raindrop.manifest
automatically sets up the function code, bucket configuration, and required service bindings after running raindrop build generate
.