All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Change to using sobek instead of goja (@mstoykov)
- return error if no welcome message received. (@palkan)
-
Add
channel.ackDuration()
to get the number of milliseconds to wait for a subscription confirmation/rejection. (@palkan) -
Add
client.subscribeAsync
to issue asubscribe
command without waiting for the confirmation. (@palkan)
- Fix
k6
/ Logrus compatibility issue. (@palkan)
- Add JS helpers.
import { cableUrl, turboStreamSource } from 'https://anycable.io/xk6-cable/jslib/k6-rails/0.1.0/index.js'
export default function () {
let res = http.get("http://localhost:3000/home");
const html = res.html();
const wsUrl = cableUrl(html);
let client = cable.connect(wsUrl);
let { streamName, channelName } = turboStreamSource(html);
let channel = client.subscribe(channelName, {
signed_stream_name: streamName,
});
// ...
}
- Add
__timestamp__
field to incoming messages with the receive time (as UTC milliseconds). (@palkan)
This should be used to determine the actual time when the message was received (not when it reached JS runtime).
- Add
client.Loop
. (@palkan)
This makes it possible to use shared data along with onMessage
callbacks.
Without wrapping code into client.Loop
, JS runtime race conditions could occur.
- Add
channel.OnMessage
to process incoming messages asynchronously. (@SlayerDF)
0.3.0 - 2022-06-23
- Update k6 dependency to latest v0.38.3 release. (@skryukov)
0.2.0 - 2021-11-29
- Update k6 dependency to latest v0.35.0 release. (@skryukov)
0.1.0 - 2021-09-15
- Protobuf codec support. (@palkan)
- Fix setting logging level. (@palkan)
0.0.3 - 2021-09-12
- Ability to change logging level with
logLevel
option. (@palkan)
0.0.2 - 2021-09-10
-
New
channel.ignoreReads()
method, that allows skipping collecting incoming messages. (@palkan) -
More examples. (@palkan)
- Use buffered channels to receive messages. (@palkan)