Skip to content

Commit

Permalink
make service functions private (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uunnamed authored Aug 24, 2020
1 parent c3443f4 commit ce3421d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/etaoin/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2866,7 +2866,7 @@
(format "http://%s:%s" host port))


(defn create-driver
(defn- -create-driver
"Creates a new driver instance.
Returns an atom that represents driver's state. Some functions, for
Expand Down Expand Up @@ -2921,7 +2921,7 @@
ssl (assoc :ssl ssl))))


(defn run-driver
(defn- -run-driver
"Runs a driver process locally.
Creates a UNIX process with a Webdriver HTTP server. Host and port
Expand All @@ -2930,7 +2930,7 @@
Arguments:
- `driver` is an atom created with `create-driver` function.
- `driver` is an atom created with `-create-driver` function.
- `opt` is an optional map with the following possible parameters:
Expand Down Expand Up @@ -3008,7 +3008,7 @@
:process process)
driver))

(defn connect-driver
(defn- -connect-driver
"Connects to a running Webdriver server.
Creates a new session on Webdriver HTTP server. Sets the session to
Expand Down Expand Up @@ -3130,15 +3130,15 @@
- `type` a keyword determines a driver type.
- `opt` a map of all possible parameters that `create-driver`,
`run-driver` and `connect-driver` may accept."
- `opt` a map of all possible parameters that `-create-driver`,
`-run-driver` and `-connect-driver` may accept."
([type]
(boot-driver type {}))
([type {:keys [host] :as opt}]
(cond-> type
true (create-driver opt)
(not host) (run-driver opt)
true (connect-driver opt))))
true (-create-driver opt)
(not host) (-run-driver opt)
true (-connect-driver opt))))

(defn quit
"Closes the current session and stops the driver."
Expand Down

0 comments on commit ce3421d

Please sign in to comment.