2019-03-18 15:34:14 +00:00
|
|
|
#lang imperative-syndicate
|
|
|
|
|
|
|
|
(provide (all-defined-out))
|
|
|
|
|
2019-05-09 10:17:37 +00:00
|
|
|
;; Addressing
|
|
|
|
(assertion-struct server-tcp-connection (host port scope))
|
|
|
|
(assertion-struct server-loopback-connection (scope))
|
|
|
|
|
|
|
|
(define (standard-localhost-server/tcp [scope "broker"])
|
|
|
|
(server-tcp-connection "localhost" 8001 scope))
|
|
|
|
|
2019-03-18 15:34:14 +00:00
|
|
|
;; Client protocol
|
2019-05-05 15:37:03 +00:00
|
|
|
(assertion-struct to-server (address assertion))
|
|
|
|
(assertion-struct from-server (address assertion))
|
|
|
|
(assertion-struct server-connection (address))
|
|
|
|
(assertion-struct server-connected (address))
|
|
|
|
(message-struct force-server-disconnect (address))
|
2019-05-09 10:17:37 +00:00
|
|
|
|
|
|
|
;; Federation configuration
|
|
|
|
;; e.g. (federated-uplink "broker" (server-tcp-connection "peer.example" 8001 "broker2"))
|
|
|
|
(assertion-struct federated-uplink (scope peer))
|
|
|
|
(assertion-struct federated-uplink-connected (link))
|