migrate

package
v3.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SampleV1V2

type SampleV1V2 struct {
	Name           string
	Description    string
	Tags           map[string]string
	Scenario       ScenarioV1V2
	ScrapeInterval time.Duration `yaml:"scrapeInterval"`
}

SampleV1V2 represent sample scenarios

func LoadSampleV1V2Config

func LoadSampleV1V2Config(data []byte) (*SampleV1V2, error)

LoadSampleV1V2Config loads from byte array.

func LoadSampleV1V2ConfigFromFile

func LoadSampleV1V2ConfigFromFile(path string) (*SampleV1V2, error)

LoadSampleV1V2ConfigFromFile loads from file.

func (*SampleV1V2) Migrate

func (s *SampleV1V2) Migrate() *config.SampleConfig

Migrate converts a v1-v2 sample to a v3 sample

type ScenarioV1V2

type ScenarioV1V2 struct {
	Kind             string
	Steps            []StepV1V2
	StepsDefinitions map[string]StepDefinitionV1V2
}

ScenarioV1V2 definition

type StepDefinitionV1V2

type StepDefinitionV1V2 struct {
	Name        string
	Description string
	Params      []StepParamV1V2
}

StepDefinitionV1V2 definition

type StepParamV1V2

type StepParamV1V2 struct {
	Name        string
	Description string
	Optional    bool
}

StepParamV1V2 returns the value of a step parameter

type StepV1V2

type StepV1V2 struct {
	Type    string
	Params  map[string]string
	Negate  bool
	Timeout time.Duration
}

StepV1V2 definition

Jump to

Keyboard shortcuts

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