testdatasource

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCsvContent

func LoadCsvContent(ioReader io.Reader, name string) (*data.Frame, error)

LoadCsvContent should be moved to the SDK

func RandomWalk

func RandomWalk(query backend.DataQuery, model JSONModel, index int) *data.Frame

Types

type JSONModel

type JSONModel struct {
	ScenarioID         string    `json:"scenarioId"`
	SeriesCount        int       `json:"seriesCount"`
	StringInput        string    `json:"stringInput"`
	Lines              int64     `json:"lines"`
	IncludeLevelColumn bool      `json:"includeLevelColumn"`
	StartValue         float64   `json:"startValue"`
	Spread             float64   `json:"spread"`
	Noise              float64   `json:"noise"`
	Drop               float64   `json:"drop"`
	Min                *float64  `json:"min,omitempty"`
	Max                *float64  `json:"max,omitempty"`
	Labels             string    `json:"labels"`
	WithNil            bool      `json:"withNil"`
	PulseWave          pulseWave `json:"pulseWave"`
	Alias              string    `json:"alias"`
	// Cannot specify a type for csvWave since legacy queries
	// does not follow the same format as the new ones (and there is no migration).
	CSVWave     interface{} `json:"csvWave"`
	CSVContent  string      `json:"csvContent"`
	CSVFileName string      `json:"csvFileName"`
	DropPercent float64     `json:"dropPercent"`
}

type Scenario

type Scenario struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	StringInput string `json:"stringInput"`
	Description string `json:"description"`
	// contains filtered or unexported fields
}

type Service

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

func ProvideService

func ProvideService() *Service

func (*Service) CallResource

func (*Service) PublishStream

func (*Service) QueryData

func (*Service) RunStream

func (s *Service) RunStream(ctx context.Context, request *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*Service) SubscribeStream

Directories

Path Synopsis
kinds

Jump to

Keyboard shortcuts

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