insta-pipe v0.0.0-rc.57
Installation
If you don't have Node.js or Yarn installed:
curl -o- https://cdn.insta.ci/install.sh | bash
Or using Yarn directly:
yarn global add insta-pipe
Getting Started
# Create a template
pipe create --template=hello-world .insta
# Run tasks
cd .insta
pipe
Overview
tasks.ts
import { task } from 'insta-pipe';
task('First task', async () => {
console.log('This message is the task log');
});
When you start a process, you use exec
.
The stdout and stderr of this process is written to its own stream.
tasks.ts
import { task, exec } from 'insta-pipe';
task('First task', async () => {
await exec('cat', ['./task.ts']);
});
You can also create streams of any media type. The most common ones are:
text/plain
for logs, image/*
for images, and video/webm
for video.
tasks.ts
import { task, stream } from 'insta-pipe';
task('First task', async () => {
const stream = stream('Example stream', {
mediatype: 'text/plain',
});
stream.writeString('Written to the stream\n');
stream.close();
});
Configuring Tasks
Tasks shall be defined statically. That is, no task should be configured based on values defined at runtime.
This ensures that the task DAG is deterministic, and reproducible.
Protocol
Insta is built on top of Protocol buffers and gRPC. In the future, we plan to add support to other languages, and offer the exact same features the TypeScript client offers.
Changes to the Runner
service are backward-compatible.
The Insta server is aware of the version of the protocol the client uses, and is able to handle any future change in behavior.
Breaking changes will require a new Runner
service.
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago