Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make service functions private #306

Merged
merged 1 commit into from
Aug 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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