25 lines
847 B
Racket
25 lines
847 B
Racket
#lang syndicate
|
|
|
|
(provide (all-defined-out))
|
|
|
|
;; 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))
|
|
|
|
;; Client protocol
|
|
(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))
|
|
|
|
;; Federation configuration
|
|
;; e.g. (federated-uplink "scope1" (server-tcp-connection "peer.example" 8001 "local") "scope2")
|
|
(assertion-struct federated-uplink (local-scope peer remote-scope))
|
|
(assertion-struct federated-uplink-connected (link))
|
|
|
|
(assertion-struct federation-management-scope (name))
|