Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type MessageHandler ¶
type MessageHandler func(Message)
type Nats ¶
type Nats struct {
// contains filtered or unexported fields
}
ModuleInstance represents an instance of the module for every VU.
func (*Nats) Exports ¶
Exports implements the modules.Instance interface and returns the exports of the JS module.
func (*Nats) Subscribe ¶
func (n *Nats) Subscribe(topic string, handler MessageHandler) (*Subscription, error)
type RootModule ¶
type RootModule struct{}
RootModule is the global module object type. It is instantiated once per test run and will be used to create k6/x/nats module instances for each VU.
func (*RootModule) NewModuleInstance ¶
func (r *RootModule) NewModuleInstance(vu modules.VU) modules.Instance
NewModuleInstance implements the modules.Module interface and returns a new instance for each VU.
type Subscription ¶
type Subscription struct {
Close func() error
}
Click to show internal directories.
Click to hide internal directories.