close_idle_conn

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 4 Imported by: 0

README

xk6-close-idle-connections

k6 extension to close TCP connections at a defined interval

Build

xk6 build v0.53.0 --with github.com/mohitk05/xk6-close-idle-connections@latest

Usage

import * as closeIdleConnections from 'k6/x/close_idle_conn';

export default function () {
  closeIdleConnections.start(10); // Will only init once for a VU, subsequent calls will return immediately
  // Your test script
}

export function teardown() {
  closeIdleConnections.stop();
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseIdleConn

type CloseIdleConn struct {
	// contains filtered or unexported fields
}

func (*CloseIdleConn) End

func (cic *CloseIdleConn) End()

func (*CloseIdleConn) Start

func (cic *CloseIdleConn) Start(intervalSeconds int)

type ModuleInstance

type ModuleInstance struct {
	// contains filtered or unexported fields
}

ModuleInstance represents an instance of the JS module.

func (*ModuleInstance) Exports

func (mi *ModuleInstance) Exports() modules.Exports

type RootModule

type RootModule struct{}

RootModule is the global module instance that will create module instances for each VU.

func New

func New() *RootModule

New returns a pointer to a new RootModule instance.

func (*RootModule) NewModuleInstance

func (*RootModule) NewModuleInstance(vu modules.VU) modules.Instance

NewModuleInstance implements the modules.Module interface returning a new instance for each VU.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL