rally

package
v0.0.0-...-424d171 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package rally outputs logs to ndjson suitable for use by https://github.com/elastic/rally

Configuration file supports either writing to a file or a directory with random names.

output:
  type: rally
  filename: "/var/tmp/rally.ndjson"

or

output:
  type: rally
  directory: "/var/tmp"
  pattern: "rally_*"

directory and pattern are used in os.CreateTemp call

Index

Constants

View Source
const Name = "rally"

Name is the name of the output in the configuration file and registry

Variables

This section is empty.

Functions

func New

func New(cfg *ucfg.Config) (output.Output, error)

New is the Factory for creating a new rally output. Calling this results in a file handle being opened to write the data to.

Types

type Output

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

RallyOutput stores pointer to an io.WriteCloser. This is where the log entries will be written.

func (*Output) Close

func (r *Output) Close() error

Close closes the io.WriteCloser. Writes after this will fail.

func (*Output) NewInterval

func (o *Output) NewInterval() error

func (*Output) Write

func (r *Output) Write(b []byte) (int, error)

Write formats the log for rally and writes the data to the file handle that was opened with New

Jump to

Keyboard shortcuts

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