Skip to content

Commit

Permalink
Merge pull request grafana#228 from gbts/master
Browse files Browse the repository at this point in the history
Websocket implementation
  • Loading branch information
liclac authored Jun 12, 2017
2 parents b2e140c + 26fc0f2 commit 45a0a6b
Show file tree
Hide file tree
Showing 7 changed files with 833 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/common/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"net/http"

"github.com/loadimpact/k6/lib"
"github.com/loadimpact/k6/lib/netext"
"github.com/loadimpact/k6/stats"
log "github.com/sirupsen/logrus"
)
Expand All @@ -42,6 +43,9 @@ type State struct {
// Networking equipment.
HTTPTransport http.RoundTripper

// Also expose the underlying dialer
Dialer *netext.Dialer

// Sample buffer, emitted at the end of the iteration.
Samples []stats.Sample

Expand Down
2 changes: 2 additions & 0 deletions js/modules/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/loadimpact/k6/js/modules/k6/html"
"github.com/loadimpact/k6/js/modules/k6/http"
"github.com/loadimpact/k6/js/modules/k6/metrics"
"github.com/loadimpact/k6/js/modules/k6/ws"
)

// Index of module implementations.
Expand All @@ -35,4 +36,5 @@ var Index = map[string]interface{}{
"k6/http": &http.HTTP{},
"k6/metrics": &metrics.Metrics{},
"k6/html": &html.HTML{},
"k6/ws": &ws.WS{},
}
Loading

0 comments on commit 45a0a6b

Please sign in to comment.