report

package
v0.0.0-...-6d10cd0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, cfg Config)

Init initialize reporter with config

func Register

func Register(ctx context.Context, name string, builder Builder)

Register register report builder in the catalog

Types

type Builder

type Builder func(config map[string]interface{}, id string, step int) Driver

Builder report driver builder

type Config

type Config struct {
	Driver string                 `yaml:"driver"`
	Config map[string]interface{} `yaml:"config"`
}

Config report configuration structure

type Driver

type Driver interface {
	// Type returns type of the driver
	Type() string
	// PushString pushes string to report
	PushString(ctx context.Context, report string)
	// PushReader pushes io.Reader to report to allow streaming of log to report
	PushReader(ctx context.Context, report io.Reader)
	// Close close the report
	Close(ctx context.Context)
}

Driver report driver interface

func Open

func Open(ctx context.Context, id string, step int) Driver

Open start the report

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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