ext

package
v0.0.0-...-29e7bc9 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package ext contains the extension registry and all generic functionality for k6 extensions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(typ ExtensionType) map[string]*Extension

Get returns all extensions of the specified type.

func Register

func Register(name string, typ ExtensionType, mod interface{})

Register a new extension with the given name and type. This function will panic if an unsupported extension type is provided, or if an extension of the same type and name is already registered.

Types

type Extension

type Extension struct {
	Name, Path, Version string
	Type                ExtensionType
	Module              interface{}
}

Extension is a generic container for any k6 extension.

func GetAll

func GetAll() []*Extension

GetAll returns all extensions, sorted by their import path and name.

func (Extension) String

func (e Extension) String() string

type ExtensionType

type ExtensionType uint8

ExtensionType is the type of all supported k6 extensions.

const (
	JSExtension ExtensionType = iota + 1
	OutputExtension
)

All supported k6 extension types.

func (ExtensionType) String

func (e ExtensionType) String() string

Jump to

Keyboard shortcuts

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