Stubborn is a framework that's written in Go for clients that uses duplex protocols such as WebSocket.
The Stubborn framework provides a complete and tested persistent connection for the duplex protocols using various types of clients.
go get github.com/filinvadim/stubborn
- Agnostic to any clients by
DuplexConnector interface
. - Therefore, it's fully testable using mock that implements three methods:
Close() error ReadMessage() (messageType int, p []byte, err error) WriteMessage(messageType int, data []byte) error
- Persistence. Stubborn framework won't stop fetching data even if
panic()
occurs (that's useful if for example Gorilla WebSocket was used as client). - Fairly configurable for any API requirements.
- No external dependencies whatsoever.
- Framework wasn't benchmark tested but expected average speed.