scn

package
v0.0.0-...-9e745d5 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//GetResponseAllData - struct for return information if scenarios and hosts.
	GetResponseAllData = GetResponse{}
	//GetState - struct for return state of scenario
	GetState = []scenario.State{}
	//LastRunsParams - sync map for last runs param from scenario
	LastRunsParams sync.Map
	//RunsGenerators - sync map for used generator
	RunsGenerators sync.Map
	//HostsAndUsers - sync map users from remote host
	HostsAndUsers sync.Map
	//PgClient - postgres client from service
	PgClient *postgres.PGClient
)

Functions

func CheckRunsGen

func CheckRunsGen()

CheckRunsGen - func for chack state generators and change state

func FloatToString

func FloatToString(i float64) string

FloatToString - convert type float to type string

func InitData

func InitData() (err error)

InitData - func to init GetRes

func SetState

func SetState(s bool, id int64, name string, scenarioType string, d int64, gun string, generators []hosts.Host)

SetState - init state struct for ws

func StartScenario

func StartScenario(runid int64, host string, pathScript string, fileName string, str string) (err error)

StartScenario - func for start test scenario and update state after the finish test

func StopScenario

func StopScenario(runid int64, host string, str string) (err error)

StopScenario - func for stop test scenario and update state

func СheckRun

func СheckRun() (res bool)

СheckRun - fucn for check state scenario

Types

type GeneratorState

type GeneratorState struct {
	Host  string `json:"name"`
	State string `json:"state"`
}

GeneratorState - struct for generator state

func CheckGen

func CheckGen(g []hosts.Host) (res []GeneratorState, err error)

CheckGen - func fo check state generators

type GetResponse

type GetResponse struct {
	Generators []hosts.Host
	Scenarios  []scenario.Scenario
}

GetResponse - struct for response

type PreParseResponce

type PreParseResponce struct {
	ThreadGroupName string   `json:"ThreadGroupName"`
	FailedParams    []string `json:"FailedParams"`
}

type ScriptCache

type ScriptCache struct {
	ScriptFile  []byte
	ParseParams []jmxparser.JMXParserResponse
}

type StartRequest

type StartRequest struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Gun        string `json:"gun"`
	Projects   string `json:"project"`
	Generators []hosts.Host
	Params     []scenario.ThreadGroup
}

StartRequest - struct request for start scenario

func (*StartRequest) Start

func (s *StartRequest) Start() error

Start - func for the run scenario

type StopRequest

type StopRequest struct {
	RunID      int64  `json:"runid"`
	Gun        string `json:"gun"`
	Generators []hosts.Host
}

StopRequest - struct request for stop scenario

func (*StopRequest) Stop

func (s *StopRequest) Stop() error

Stop - func for the stop scenario

Jump to

Keyboard shortcuts

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