package
1.4.11
Repository: https://github.com/hyperledger/firefly-common.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
GenerateTLSCertificates creates a key pair for server and client auth.
InitConfig ensures the config is initialized for HTTP too, as WS and HTTP can share the same tree of configuration (and all the HTTP options apply to the initial upgrade).
No description provided by the author
NewTestTLSWSServer creates a little test server for packages (including wsclient itself) to use in unit tests and secured with mTLS by passing in a key pair.
NewTestWSServer creates a little test server for packages (including wsclient itself) to use in unit tests.
No description provided by the author

# Constants

WSConnectionTimeout is the amount of time to wait while attempting to establish a connection (or automatic reconnection).
WSConfigKeyHeartbeatInterval is the frequency of ping/pong requests, and also used for the timeout to receive a response to the heartbeat.
WSConfigKeyInitialConnectAttempts sets how many times the websocket should attempt to connect on startup, before failing (after initial connection, retry is indefinite).
WSConfigKeyPath if set will define the path to connect to - allows sharing of the same URL between HTTP and WebSocket connection info.
WSConfigKeyReadBufferSize is the read buffer size.
WSConfigKeyWriteBufferSize is the write buffer size.
WSConfigURL if set will be a completely separate URL for WebSockets (must be a ws: or wss: scheme).
WSSpecificConfPrefix is the named sub-section of the http config options that contains websocket specific config.

# Structs

No description provided by the author
WSPayload allows API consumers of this package to stream data, and inspect the message type, rather than just being passed the bytes directly.

# Interfaces

No description provided by the author

# Type aliases

WSPostConnectHandler will be called after every connect/reconnect.
WSPreConnectHandler will be called before every connect/reconnect.