Skip to content

Commit

Permalink
fixup! docs: use mkdocs for documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
belochub committed Feb 9, 2019
1 parent 6aa84f4 commit e1e373c
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 15 deletions.
8 changes: 6 additions & 2 deletions doc/api/client.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Client

## Object: jstp.Client
## Interface: jstp.Client

Client object is used to specify client-side connection behavior.

Expand Down Expand Up @@ -34,6 +34,9 @@ having the same signature.

Client-side application instance to be exposed over connection.

If this field is not set, an [`Application`][application] `jstp@1.0.0` with an
empty `api` is used.

### client.heartbeatInterval

- [`<number>`][number]
Expand All @@ -44,7 +47,8 @@ Setting this field enables heartbeat.

- [`<Session>`][session]

Setting this field leads to reconnection to the session.
Setting this field results in using the `'session'` authentication strategy
when connecting, which can be used to reconnect to the existing session.

### client.logger

Expand Down
2 changes: 1 addition & 1 deletion doc/api/connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ May be [`null`][null] if connection was established without logging in.
[application]: ./application.md#class-jstpapplication
[transport]: ./transport.md
[server]: ./server.md
[client]: ./client.md#object-jstpclient
[client]: ./client.md#interface-jstpclient
[session]: ./session.md
[remoteerror]: ./errors.md#class-jstpremoteerror
[remoteproxy]: ./remote-proxy.md
Expand Down
14 changes: 11 additions & 3 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
- `app` [`<string>`][string] | [`<Object>`][object] Application to connect to as
`'name'` or `'name@version'` or `{ name, version }`, where version must be a
valid semver range.
- `client` [`<Client>`][client]
- `client` [`<Client>`][client] | [`<null>`][null] Optional, when omitted, an
object with the default values for [`application`][clientapp],
[`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used.
- `...args` `<any>` Arguments passed directly to
[`net.connect()`][netconnect] (except for `connectListener`)
- `callback` [`<Function>`][function]
Expand All @@ -19,7 +21,9 @@
- `app` [`<string>`][string] | [`<Object>`][object] Application to connect to as
`'name'` or `'name@version'` or `{ name, version }`, where version must be a
valid semver range.
- `client` [`<Client>`][client]
- `client` [`<Client>`][client] | [`<null>`][null] Optional, when omitted, an
object with the default values for [`application`][clientapp],
[`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used.
- `interfaces` [`<string[]>`][string] Interface names to perform inspect on.
- `...args` `<any>` Arguments passed directly to
[`net.connect()`][netconnect] (except for `connectListener`).
Expand Down Expand Up @@ -89,7 +93,10 @@ options, using any other strategy will result in

[application]: ./application.md#class-jstpapplication
[authpolicy]: ./auth-policy.md
[client]: ./client.md#object-jstpclient
[client]: ./client.md#interface-jstpclient
[clientapp]: ./client.md#clientapplication
[clientcp]: ./client.md#clientconnectpolicyapplication-connection91-session93-callback
[clientreconnector]: ./client.md#clientreconnectorconnection-reconnectfn
[connection]: ./connection.md#class-jstpconnection
[createappindex]: ./application.md#jstpcreateappsindexapplications
[ssp]: ./session-storage-provider.md#interface-jstpsessionstorageprovider
Expand All @@ -106,3 +113,4 @@ options, using any other strategy will result in
[error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
[function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function
[map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
[null]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type
14 changes: 11 additions & 3 deletions doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
- `app` [`<string>`][string] | [`<Object>`][object] Application to connect to as
`'name'` or `'name@version'` or `{ name, version }`, where version must be a
valid semver range.
- `client` [`<Client>`][client]
- `client` [`<Client>`][client] | [`<null>`][null] Optional, when omitted, an
object with the default values for [`application`][clientapp],
[`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used.
- `...args` `<any>` Arguments passed directly to
[`tls.connect()`][tlsconnect] (except for `callback`)
- `callback` [`<Function>`][function]
Expand All @@ -19,7 +21,9 @@
- `app` [`<string>`][string] | [`<Object>`][object] Application to connect to as
`'name'` or `'name@version'` or `{ name, version }`, where version must be a
valid semver range.
- `client` [`<Client>`][client]
- `client` [`<Client>`][client] | [`<null>`][null] Optional, when omitted, an
object with the default values for [`application`][clientapp],
[`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used.
- `interfaces` [`<string[]>`][string] Interface names to perform inspect on.
- `...args` `<any>` Arguments passed directly to
[`tls.connect()`][tlsconnect] (except for `callback`)
Expand Down Expand Up @@ -70,7 +74,10 @@ For more details see [`jstp.net.createServer()`][jstpnetserver]

[application]: ./application.md#class-jstpapplication
[authpolicy]: ./auth-policy.md
[client]: ./client.md#object-jstpclient
[client]: ./client.md#interface-jstpclient
[clientapp]: ./client.md#clientapplication
[clientcp]: ./client.md#clientconnectpolicyapplication-connection91-session93-callback
[clientreconnector]: ./client.md#clientreconnectorconnection-reconnectfn
[connection]: ./connection.md#class-jstpconnection
[createappindex]: ./application.md#jstpcreateappsindexapplications
[ssp]: ./session-storage-provider.md#interface-jstpsessionstorageprovider
Expand All @@ -88,3 +95,4 @@ For more details see [`jstp.net.createServer()`][jstpnetserver]
[error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
[function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function
[map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
[null]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type
14 changes: 11 additions & 3 deletions doc/api/ws-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ browser.
- `app` [`<string>`][string] | [`<Object>`][object] Application to connect to as
`'name'` or `'name@version'` or `{ name, version }`, where version must be a
valid semver range.
- `client` [`<Client>`][client]
- `client` [`<Client>`][client] | [`<null>`][null] Optional, when omitted, an
object with the default values for [`application`][clientapp],
[`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used.
- `url` [`<string>`][string]
- `callback` [`<Function>`][function]
- `error`: [`<Error>`][error]
Expand All @@ -21,7 +23,9 @@ browser.
- `app` [`<string>`][string] | [`<Object>`][object] Application to connect to as
`'name'` or `'name@version'` or `{ name, version }`, where version must be a
valid semver range.
- `client` [`<Client>`][client]
- `client` [`<Client>`][client] | [`<null>`][null] Optional, when omitted, an
object with the default values for [`application`][clientapp],
[`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used.
- `interfaces` [`<string[]>`][string] Interface names to perform inspect on.
- `url` [`<string>`][string]
- `callback` [`<Function>`][function]
Expand All @@ -42,7 +46,10 @@ For more details see [`jstp.net.connectAndInspect()`][jstpnetconnectinspect].

For more details see [`jstp.net.reconnect()`][jstpnetreconnect].

[client]: ./client.md#object-jstpclient
[client]: ./client.md#interface-jstpclient
[clientapp]: ./client.md#clientapplication
[clientcp]: ./client.md#clientconnectpolicyapplication-connection91-session93-callback
[clientreconnector]: ./client.md#clientreconnectorconnection-reconnectfn
[connection]: ./connection.md#class-jstpconnection
[remoteproxy]: ./remote-proxy.md#class-jstpremoteproxy
[jstpnetconnectinspect]: ./net.md#jstpnetconnectandinspectapp-client-interfaces-args-callback
Expand All @@ -52,3 +59,4 @@ For more details see [`jstp.net.reconnect()`][jstpnetreconnect].
[object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
[error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
[function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function
[null]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type
14 changes: 11 additions & 3 deletions doc/api/ws.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
- `app` [`<string>`][string] | [`<Object>`][object] Application to connect to as
`'name'` or `'name@version'` or `{ name, version }`, where version must be a
valid semver range.
- `client` [`<Client>`][client]
- `client` [`<Client>`][client] | [`<null>`][null] Optional, when omitted, an
object with the default values for [`application`][clientapp],
[`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used.
- `webSocketConfig` [`<WebSocketClientConfig>`][wsclientconfig]
- `requestUrl` [`<string>`][string] | [`<URL>`][url]
- `callback` [`<Function>`][function]
Expand All @@ -19,7 +21,9 @@
- `app` [`<string>`][string] | [`<Object>`][object] Application to connect to as
`'name'` or `'name@version'` or `{ name, version }`, where version must be a
valid semver range.
- `client` [`<Client>`][client]
- `client` [`<Client>`][client] | [`<null>`][null] Optional, when omitted, an
object with the default values for [`application`][clientapp],
[`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used.
- `interfaces` [`<string[]>`][string] Interface names to perform inspect on.
- `webSocketConfig` [`<WebSocketClientConfig>`][wsclientconfig]
- `requestUrl` [`<string>`][string] | [`<URL>`][url]
Expand Down Expand Up @@ -73,7 +77,10 @@ For more details see [`jstp.net.createServer()`][jstpnetserver]

[application]: ./application.md#class-jstpapplication
[authpolicy]: ./auth-policy.md
[client]: ./client.md#object-jstpclient
[client]: ./client.md#interface-jstpclient
[clientapp]: ./client.md#clientapplication
[clientcp]: ./client.md#clientconnectpolicyapplication-connection91-session93-callback
[clientreconnector]: ./client.md#clientreconnectorconnection-reconnectfn
[connection]: ./connection.md#class-jstpconnection
[createappindex]: ./application.md#jstpcreateappsindexapplications
[ssp]: ./session-storage-provider.md#interface-jstpsessionstorageprovider
Expand All @@ -92,3 +99,4 @@ For more details see [`jstp.net.createServer()`][jstpnetserver]
[function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function
[map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
[wsclientconfig]: https://github.com/theturtle32/WebSocket-Node/blob/master/docs/WebSocketClient.md#client-config-options
[null]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type

0 comments on commit e1e373c

Please sign in to comment.