26 lines
808 B
Racket
26 lines
808 B
Racket
#lang syndicate/actor
|
|
|
|
(require "private/util.rkt")
|
|
(require "protocol.rkt")
|
|
|
|
(require/activate "config.rkt")
|
|
(require/activate "hub/static-content.rkt")
|
|
(require/activate "hub/topic-demand.rkt")
|
|
(require/activate "hub/local-topic.rkt")
|
|
(require/activate "hub/subscription.rkt")
|
|
|
|
;; Spawn configuration in parallel:
|
|
(spawn-configuration "defaults.rktd")
|
|
;;
|
|
;; ... or assert the required configuration directly:
|
|
;; (actor (assert (config (list 'canonical-host "localhost" 7827))))
|
|
|
|
(actor #:name 'main
|
|
(during (config (list 'canonical-host $h $p))
|
|
(assert (canonical-local-host h p))
|
|
(assert (local-host h p)))
|
|
(during (config (list 'accepted-host $h $p))
|
|
(assert (local-host h p)))
|
|
(during (local-host $host-name $port)
|
|
(assert (vh host-name port))))
|