Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Client)
Option represents a functional option of a Client.
func WithDialer ¶ added in v0.8.0
WithDialer sets the underlying Gorilla WebSocket Dialer (see https://pkg.go.dev/github.com/gorilla/websocket#Dialer), should one want to customize things like the handshake timeout or TLS configuration. If this is not set, it'll use the provided DefaultDialer (see https://pkg.go.dev/github.com/gorilla/websocket#pkg-variables).
func WithLogger ¶ added in v0.7.1
WithLogger sets the logger to use for debug logging. Providing a logger implicitly turns debug logging on, unless debug logging is explicitly disabled.
func WithRequestHeader ¶ added in v0.8.0
WithRequestHeader sets custom headers our client can send when trying to connect to the WebSockets server, allowing us specify the origin, subprotocols, or the user agent.
func WithResponseTimeout ¶ added in v0.8.0
WithResponseTimeout sets the time we're willing to wait to receive a response from the server for any request, before responding with an error. It's in milliseconds. The default timeout is 10 seconds.
Directories ¶
Path | Synopsis |
---|---|
api
|
|
typedefs
Package typedefs defines both generated structs as specified under the [Typedefs section](https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#typedefs) of the protocol, and also manually defined "common" structs used across several events and requests.
|
Package typedefs defines both generated structs as specified under the [Typedefs section](https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#typedefs) of the protocol, and also manually defined "common" structs used across several events and requests. |
examples
|
|
internal
module
|
|
sample
Module
|