on master help sign in
change eyre agent example to wire-based logic
d3e371ftinnus-napbus
arvo/eyre/examples.md+7−9
@@ -296,7 +296,7 @@ Note that this example does a lot of things manually for demonstrative purposes.
296 `this
296 `this
297 %- (slog leaf+"Attempting to bind /foo." ~)
297 %- (slog leaf+"Attempting to bind /foo." ~)
298 :_ this
298 :_ this
299− [%pass /eyre %arvo %e %connect `/'foo' %eyre-agent]~
299+ [%pass /bind-foo %arvo %e %connect `/'foo' %eyre-agent]~
300 ::
300 ::
301 %handle-http-request
301 %handle-http-request
302 =/ req !< (pair @ta inbound-request:eyre) vase
302 =/ req !< (pair @ta inbound-request:eyre) vase
@@ -353,16 +353,14 @@ Note that this example does a lot of things manually for demonstrative purposes.
353++ on-arvo
353++ on-arvo
354 |= [=wire =sign-arvo]
354 |= [=wire =sign-arvo]
355 ^- (quip card _this)
355 ^- (quip card _this)
356− ?+ sign-arvo
356+ ?. ?=([%bind-foo ~] wire)
357 (on-arvo:def [wire sign-arvo])
357 (on-arvo:def [wire sign-arvo])
358− ::
359− [%eyre %bound *]
358+ ?> ?=([%eyre %bound *] sign-arvo)
360− ?: accepted.sign-arvo
359+ ?: accepted.sign-arvo
361− %- (slog leaf+"/foo bound successfully!" ~)
360+ %- (slog leaf+"/foo bound successfully!" ~)
362− `this
363− %- (slog leaf+"Binding /foo failed!" ~)
364 `this
361 `this
365− ==
362+ %- (slog leaf+"Binding /foo failed!" ~)
363+ `this
366++ on-fail on-fail:def
364++ on-fail on-fail:def
367--
365--
368```
366```