Back

ReadPort (clj)

(source)

protocol

Examples

Zetawar/zetawar
(ns zetawar.system.spec
  (:require
   [cljs.core.async :as async]
   [cljs.core.async.impl.protocols :as async.protocols]
   [clojure.spec :as s]
   [clojure.spec.impl.gen :as gen]
   [clojure.test.check]
   [datascript.core :as d]))

;; Router
(s/def :zetawar.system.router/ev-chan
  (s/with-gen
    (s/and #(satisfies? async.protocols/ReadPort %)
           #(satisfies? async.protocols/WritePort %))
    #(gen/return (async/chan))))
brianium/patroclus
(ns patroclus.main.sniffer-spec
  (:require [cljs.spec.alpha :as s]
            [cljs.core.async.impl.protocols :as proto]
            [cap :refer [Cap]]))

(s/def ::channel #(satisfies? proto/ReadPort %))
brianium/patroclus
(ns patroclus.main.notifier-spec
  (:require [cljs.spec.alpha :as s]
            [cljs.core.async.impl.protocols :as proto]))

(s/def ::notifier #(satisfies? proto/ReadPort %))
brianium/patroclus
(ns patroclus.main.address-spec
  (:require [cljs.spec.alpha :as s]
            [cljs.core.async.impl.protocols :as proto]))

(s/def ::input #(satisfies? proto/ReadPort %))