AASeq files use node-based case-insensitive AASeq Document Language with .aaseq extension. While reading the documentation is always beneficial, it’s intuitive enough to be understandable from examples.
For the overview, we can look at the basic ping example:
@CloudFlare Ping {
Host 1.1.1.1
}
@Google Ping {
Host 8.8.8.8
}
Send >CloudFlare
Reply <CloudFlare {
Status Success
RoundtripTime 0.02 /op=le
}
Send >Google
Reply <Google {
Status Success
}
Wait 0.5s
In this example, we define two endpoints, one named “CloudFlare” and other named “Google”. Both using “Ping” protocol. Endpoints can be recognized by the use of @ prefix followed by their name, whitespace, and then protocol plugin name. Any configuration data may follow in children nodes.
You can also use variables
Next follows one or more flow actions. Each flow action is of the following:
Outgoing message starts with message name, followed by > characted and an endpoint name. If any additional data is needed, it can be specified in children nodes. In this example, we have two messages going out (one for “CloudFlare” and other for “Google” endpoint). Neither has any additional data specified.
Incoming message starts with message name, followed by < character and an endpoint name. Once real message is received, it will be compared against provided data (in children nodes). Any message that doesn’t match will be considered failed. In this case we expect “Success” response from both of our endpoints. However, for “CloudFlare” endpoint we also expect response to be less or equal to 0.02s (i.e., 20ms).
Any non-message is considered to be a command with either single value (if there is only one argument) or with data in children nodes. In example above, we wait half a second in order as not to ping too often.