mirror of
https://github.com/dragonheim/gagent.git
synced 2025-01-18 03:46:27 -08:00
fix: updating the examples to reflect the desired format.
This commit is contained in:
parent
aa0e396e35
commit
17b097b1b7
5 changed files with 51 additions and 25 deletions
21
.drone.yml
21
.drone.yml
|
@ -7,10 +7,10 @@ platform:
|
|||
os: linux
|
||||
arch: amd64
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
exclude:
|
||||
- main
|
||||
# trigger:
|
||||
# branch:
|
||||
# exclude:
|
||||
# - main
|
||||
|
||||
clone:
|
||||
depth: 1
|
||||
|
@ -39,3 +39,16 @@ steps:
|
|||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_auth
|
||||
|
||||
- name: Send Status To Datadog
|
||||
image: masci/drone-datadog
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: Datadog
|
||||
events:
|
||||
- title: "Build failure"
|
||||
text: "Build ${DRONE_BUILD_NUMBER}"
|
||||
alert_type: "error"
|
||||
when:
|
||||
status:
|
||||
- failure
|
28
README.md
28
README.md
|
@ -10,18 +10,18 @@ Imagine, for a moment, that you are on Mars and need to perform a search for dat
|
|||
|
||||
## Example Agent
|
||||
```tcl
|
||||
1 : ###################
|
||||
2 : ### Hello Earth ###
|
||||
3 : ###################
|
||||
4 : # HINT START
|
||||
5 : # - console
|
||||
6 : # - gravity measurements
|
||||
7 : # - gravity fluctuations
|
||||
8 : # HINT END
|
||||
9 : function hello_world() {
|
||||
10: console.log("Hello Earth, does tempurature various alter specific gravity?")
|
||||
11: }
|
||||
12: console.log(hello_world())
|
||||
1 : ###################
|
||||
2 : ### Hello Earth ###
|
||||
3 : ###################
|
||||
4 : # HINT START
|
||||
5 : # - console
|
||||
6 : # - gravity measurements
|
||||
7 : # - gravity fluctuations
|
||||
8 : # HINT END
|
||||
9 : proc hello_earth {} {
|
||||
10 : puts "Hello Earth, does tempurature variations alter specific gravity?"
|
||||
11 : }
|
||||
12 : hello_earth
|
||||
```
|
||||
Lines 1 - 3 are simple comments
|
||||
|
||||
|
@ -29,9 +29,9 @@ Line 4 Tells the G'Agent router that this is the start of the hints to route fo
|
|||
|
||||
Lines 5 - 7 are a list of hints that the router will use to determine which router(s) may have domain specific information.
|
||||
|
||||
Lines 9 - 11 are a tcl function that will be executed on the worker before sending the results back to the client.
|
||||
Lines 9 - 11 are a tcl procedure that will be executed on the worker before sending the results back to the client.
|
||||
|
||||
Line 12 executes the function defined above.
|
||||
Line 12 executes the procedure defined above.
|
||||
|
||||
## History
|
||||
More information can be found in the original [documentation](http://www.cs.dartmouth.edu/~dfk/agents/pub/agents/doc.5.1.ps.gz), and in the project's [wiki](https://git.dragonheim.net/dragonheim/gagent/wiki/_pages).
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#!/usr/bin/env tcl
|
||||
#
|
||||
#
|
||||
#####################
|
||||
### Add 2 numbers ###
|
||||
#####################
|
||||
# HINT START
|
||||
# - math
|
||||
# - addition
|
||||
# HINT END
|
||||
set val1 1
|
||||
set val2 2
|
||||
|
||||
|
|
13
examples/hello-earth.tcl
Normal file
13
examples/hello-earth.tcl
Normal file
|
@ -0,0 +1,13 @@
|
|||
###################
|
||||
### Hello Earth ###
|
||||
###################
|
||||
# HINT START
|
||||
# - console
|
||||
# - gravity measurements
|
||||
# - gravity fluctuations
|
||||
# HINT END
|
||||
proc hello_earth {} {
|
||||
puts "Hello Earth, does tempurature variations alter specific gravity?"
|
||||
}
|
||||
|
||||
hello_earth
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env tcl
|
||||
#
|
||||
#
|
||||
puts {hello, world}
|
Loading…
Add table
Reference in a new issue