Some refactoring

* Don't export record field setters (unless required)
* Remove get- prefix from record getters
* Introduce handlers (simplified tasks)
This commit is contained in:
Ray Miller 2025-01-05 19:10:42 +00:00
parent 297d779ea4
commit 52f011267b
Signed by: ray
GPG key ID: 043F786C4CD681B8
6 changed files with 89 additions and 51 deletions

View file

@ -2,7 +2,8 @@
(ordo connection)
(ordo action filesystem)
(ordo play)
(ordo task))
(ordo task)
(ordo handler))
(define test-play
(play "Test play"
@ -13,10 +14,13 @@
(task "Create test file from string content"
(install-file "/home/ray/ordo-test/foo" #:content "Hello, world!\n"))
(task "Create test file from local source"
(install-file "/home/ray/ordo-test/bar" #:local-src "/home/ray/ordo-test/foo"))
(install-file "/home/ray/ordo-test/bar" #:local-src "/home/ray/ordo-test/foo")
#:triggers '(fritz))
(task "Create test file from remote source"
(install-file "/home/ray/ordo-test/baz" #:remote-src "/home/ray/ordo-test/bar")
#:triggers `(frobnicate)))
#:handlers `((frobnicate . ,(task "Frobnicate" (const #t))))))
#:triggers '(frobnicate)))
#:handlers `((frobnicate . ,(handler "Frobnicate" (const #t)))
(fritz . ,(handler "Fritz" (const #t)))
(frotz . ,(handler "Frotz" (const #t))))))
;;(run-play test-play)