mllp

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 11 Imported by: 0

README

xk6-mllp

Simple MLLP sender for K6

Build

To build a k6 binary with this extension, first ensure you have the prerequisites:

$ go get -u github.com/k6io/xk6/cmd/xk6
$ xk6 build --with github.com/gjergjsheldija/xk6-mllp=. 
$ ./k6 run --vus 60 --duration 1m test.js   

Docker

docker run -i gjergjsheldija/xk6-mllp:latest --vus 60 --duration 1m run - < test.js

Example

import mllp from 'k6/x/mllp';

const client = new mllp.Client({
    host: '127.0.0.1',
    port: '5000'
});

export default function () {
    client.send('./sample.hl7');
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WriterWrites   = stats.New("mllp.bytes.sent", stats.Counter)
	WriterReceived = stats.New("mllp.bytes.received", stats.Counter)
)

Functions

This section is empty.

Types

type MLLP

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

func NewClient

func NewClient(opts *Options) *MLLP

func (*MLLP) Send

func (m *MLLP) Send(ctx context.Context, file string) error

Set the given key with the given value and expiration time.

func (*MLLP) XClient

func (m *MLLP) XClient(ctxPtr *context.Context, opts *Options) interface{}

type Options

type Options struct {
	Host string
	Port int
}

Jump to

Keyboard shortcuts

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