views

package
v2.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterruptData

type InterruptData exitData

func (InterruptData) Log

func (d InterruptData) Log(logger *slog.Logger)

type MaxIterationsReachedData

type MaxIterationsReachedData exitData

func (MaxIterationsReachedData) Log

func (d MaxIterationsReachedData) Log(logger *slog.Logger)

type ProgressData

type ProgressData struct {
	SuccessfulIterationDurationsForPeriod progress.IterationDurationsSnapshot
	Duration                              time.Duration
	SuccessfulIterationCount              uint64
	DroppedIterationCount                 uint64
	FailedIterationCount                  uint64
	Period                                time.Duration
}

func (ProgressData) Log

func (d ProgressData) Log(logger *slog.Logger)

type ResultData

type ResultData struct {
	Error                        error
	LogFilePath                  string
	SuccessfulIterationDurations progress.IterationDurationsSnapshot
	FailedIterationDurations     progress.IterationDurationsSnapshot
	IterationsStarted            uint64
	Duration                     time.Duration
	SuccessfulIterationCount     uint64
	Iterations                   uint64
	FailedIterationCount         uint64
	DroppedIterationCount        uint64
	Failed                       bool
}

func (ResultData) Log

func (d ResultData) Log(logger *slog.Logger)

type SetupData

type SetupData stageData

func (SetupData) Log

func (d SetupData) Log(logger *slog.Logger)

type StartData

type StartData struct {
	Scenario        string
	RateDescription string
	MaxIterations   uint64
	MaxDuration     time.Duration
}

func (StartData) Log

func (c StartData) Log(logger *slog.Logger)

type TeardownData

type TeardownData stageData

func (TeardownData) Log

func (d TeardownData) Log(logger *slog.Logger)

type TimeoutData

type TimeoutData exitData

func (TimeoutData) Log

func (d TimeoutData) Log(logger *slog.Logger)

type View

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

func (*View) Template

func (v *View) Template() *template.Template

type ViewContext

type ViewContext[T log.Loggable] struct {
	// contains filtered or unexported fields
}

func (*ViewContext[T]) Log

func (vc *ViewContext[T]) Log(logger *slog.Logger)

func (*ViewContext[T]) Print

func (vc *ViewContext[T]) Print(printer *ui.Printer)

func (*ViewContext[T]) Render

func (vc *ViewContext[T]) Render() string

type Views

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

func New

func New() *Views

func (*Views) Interrupt

func (v *Views) Interrupt(data InterruptData) *ViewContext[InterruptData]

func (*Views) MaxIterationsReached

func (v *Views) MaxIterationsReached(data MaxIterationsReachedData) *ViewContext[MaxIterationsReachedData]

func (*Views) Progress

func (v *Views) Progress(data ProgressData) *ViewContext[ProgressData]

func (*Views) Result

func (v *Views) Result(data ResultData) *ViewContext[ResultData]

func (*Views) Setup

func (v *Views) Setup(data SetupData) *ViewContext[SetupData]

func (*Views) Start

func (v *Views) Start(data StartData) *ViewContext[StartData]

func (*Views) Teardown

func (v *Views) Teardown(data TeardownData) *ViewContext[TeardownData]

func (*Views) Timeout

func (v *Views) Timeout(data TimeoutData) *ViewContext[TimeoutData]

Jump to

Keyboard shortcuts

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