snippets and event-patterns for Actyx Pond
A Visual Studio Code extension to define events from a high-level syntax for the Actyx Pond framework.
Features
This extension contributes four commands
Actyx: generate events
: convert the selected events to an event definition and create the emitter functions
Actyx: generate events with typed emitter
: convert the selected events to an event definition and create the emitter functions that consumes an emitter instand the pond. This emitter function in compatible to state effects as well.
Actyx: generate blocked events with typed emitter
: Same as Actyx: generate events with typed emitter, but consumes the event without the eventType
as parameter
AQL Syntax
This extension contributes syntax highlighting for AQL in TypeScript, JavaScript, Rust, C#, PHP, Java files.
As soon as a string starts with FROM
or FEATURES(
It turns into an AQL string.
Snippets
Name |
Prefix |
Description |
New tag |
tag |
create tag |
New twin section |
twins |
create twins section |
New no Props fish |
fishNoProps |
create twin without (singleton / registry) |
New entity fish |
fishOf |
create entity or singleton twin |
Demo
To access the shortcuts please press ctrl + ⇧ + P
on a linux or windows and ⌘+⇧+P
on a mac machine.
Actyx: create events
: Define events for the fish
An event is the communication channel for the distributed system to share information between the edge nodes. To build on a type save infrastructure, some type definitions are required. To reduce typing effort, the definitions can be generated by selecting the definitions and run Actyx: create events
or Alt + A
followed by E
.
The syntax:
// no parameters
eventName
// parameters
eventName(parameter: type)
eventName(parameter: type, para...)
eventName(
parameter: type,
para...
)
// nested parameter
eventName(
parameter: {
parameter: type,
param...,
}
)