v1alpha1

package
v0.0.0-...-58d9a08 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=chaosmeta.io

Index

Constants

View Source
const (
	TimeFormat    = "2006-01-02 15:04:05"
	FinalizerName = "chaosmeta/flow"

	HostArgsKey   = "host"
	PortArgsKey   = "port"
	MethodArgsKey = "method"
	HeaderArgsKey = "header"
	PathArgsKey   = "path"
	BodyArgsKey   = "body"

	MethodPOST = "POST"
	MethodGET  = "GET"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "chaosmeta.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	JmeterConfigStr string
	JobYamlStr      string
)

Functions

func ConvertDuration

func ConvertDuration(d string) (int, error)

func GetArgsMap

func GetArgsMap(args []FlowArgs) map[string]string

func GetHeaderMap

func GetHeaderMap(headerStr string) (map[string]string, error)

Types

type Argument

type Argument struct {
	XMLName        xml.Name       `xml:"elementProp"`
	Name           string         `xml:"name,attr"`
	ElementType    string         `xml:"elementType,attr"`
	CollectionProp CollectionProp `xml:"collectionProp"`
	StringProp     StringProp     `xml:"stringProp"`
}

func (*Argument) DeepCopy

func (in *Argument) DeepCopy() *Argument

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Argument.

func (*Argument) DeepCopyInto

func (in *Argument) DeepCopyInto(out *Argument)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BoolProp

type BoolProp struct {
	XMLName xml.Name `xml:"boolProp"`
	Name    string   `xml:"name,attr"`
	Value   bool     `xml:",chardata"`
}

func (*BoolProp) DeepCopy

func (in *BoolProp) DeepCopy() *BoolProp

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BoolProp.

func (*BoolProp) DeepCopyInto

func (in *BoolProp) DeepCopyInto(out *BoolProp)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CollectionProp

type CollectionProp struct {
	XMLName   xml.Name   `xml:"collectionProp"`
	Name      string     `xml:"name,attr"`
	Arguments []Argument `xml:"elementProp"`
}

func (*CollectionProp) DeepCopy

func (in *CollectionProp) DeepCopy() *CollectionProp

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CollectionProp.

func (*CollectionProp) DeepCopyInto

func (in *CollectionProp) DeepCopyInto(out *CollectionProp)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ElementProp

type ElementProp struct {
	XMLName        xml.Name       `xml:"elementProp"`
	Name           string         `xml:"name,attr"`
	ElementType    string         `xml:"elementType,attr"`
	GuiClass       string         `xml:"guiclass,attr"`
	TestClass      string         `xml:"testclass,attr"`
	TestName       string         `xml:"testname,attr"`
	CollectionProp CollectionProp `xml:"collectionProp"`
}

func (*ElementProp) DeepCopy

func (in *ElementProp) DeepCopy() *ElementProp

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElementProp.

func (*ElementProp) DeepCopyInto

func (in *ElementProp) DeepCopyInto(out *ElementProp)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FlowArgs

type FlowArgs struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

func (*FlowArgs) DeepCopy

func (in *FlowArgs) DeepCopy() *FlowArgs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlowArgs.

func (*FlowArgs) DeepCopyInto

func (in *FlowArgs) DeepCopyInto(out *FlowArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FlowType

type FlowType string
const (
	HTTPFlowType FlowType = "http"
)

type HTTPArgument

type HTTPArgument struct {
	XMLName     xml.Name     `xml:"elementProp"`
	Name        string       `xml:"name,attr"`
	ElementType string       `xml:"elementType,attr"`
	StringProps []StringProp `xml:"stringProp"`
}

func (*HTTPArgument) DeepCopy

func (in *HTTPArgument) DeepCopy() *HTTPArgument

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPArgument.

func (*HTTPArgument) DeepCopyInto

func (in *HTTPArgument) DeepCopyInto(out *HTTPArgument)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPSamplerProxy

type HTTPSamplerProxy struct {
	XMLName     xml.Name     `xml:"HTTPSamplerProxy"`
	GuiClass    string       `xml:"guiclass,attr"`
	TestClass   string       `xml:"testclass,attr"`
	TestName    string       `xml:"testname,attr"`
	BoolProps   []BoolProp   `xml:"boolProp"`
	ElementProp ElementProp  `xml:"elementProp"`
	StringProps []StringProp `xml:"stringProp"`
}

func (*HTTPSamplerProxy) DeepCopy

func (in *HTTPSamplerProxy) DeepCopy() *HTTPSamplerProxy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPSamplerProxy.

func (*HTTPSamplerProxy) DeepCopyInto

func (in *HTTPSamplerProxy) DeepCopyInto(out *HTTPSamplerProxy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HashTree

type HashTree struct {
	XMLName          xml.Name         `xml:"hashTree"`
	TestPlan         TestPlan         `xml:"TestPlan"`
	ThreadGroup      ThreadGroup      `xml:"ThreadGroup"`
	HeaderManager    HeaderManager    `xml:"HeaderManager"`
	HTTPSamplerProxy HTTPSamplerProxy `xml:"HTTPSamplerProxy"`
	HashTree         *HashTree        `xml:"hashTree"`
}

func (*HashTree) DeepCopy

func (in *HashTree) DeepCopy() *HashTree

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HashTree.

func (*HashTree) DeepCopyInto

func (in *HashTree) DeepCopyInto(out *HashTree)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Header struct {
	XMLName     xml.Name     `xml:"elementProp"`
	Name        string       `xml:"name,attr"`
	ElementType string       `xml:"elementType,attr"`
	StringProps []StringProp `xml:"stringProp"`
}

func (*Header) DeepCopy

func (in *Header) DeepCopy() *Header

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Header.

func (*Header) DeepCopyInto

func (in *Header) DeepCopyInto(out *Header)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HeaderManager

type HeaderManager struct {
	XMLName        xml.Name       `xml:"HeaderManager"`
	GuiClass       string         `xml:"guiclass,attr"`
	TestClass      string         `xml:"testclass,attr"`
	TestName       string         `xml:"testname,attr"`
	CollectionProp CollectionProp `xml:"collectionProp"`
}

func (*HeaderManager) DeepCopy

func (in *HeaderManager) DeepCopy() *HeaderManager

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderManager.

func (*HeaderManager) DeepCopyInto

func (in *HeaderManager) DeepCopyInto(out *HeaderManager)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JMeterTestPlan

type JMeterTestPlan struct {
	XMLName    xml.Name `xml:"jmeterTestPlan"`
	Version    string   `xml:"version,attr"`
	Properties string   `xml:"properties,attr"`
	JMeter     string   `xml:"jmeter,attr"`
	HashTree   HashTree `xml:"hashTree"`
}

func (*JMeterTestPlan) DeepCopy

func (in *JMeterTestPlan) DeepCopy() *JMeterTestPlan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JMeterTestPlan.

func (*JMeterTestPlan) DeepCopyInto

func (in *JMeterTestPlan) DeepCopyInto(out *JMeterTestPlan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoadTest

type LoadTest struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   LoadTestSpec   `json:"spec,omitempty"`
	Status LoadTestStatus `json:"status,omitempty"`
}

LoadTest is the Schema for the loadtests API

func (*LoadTest) DeepCopy

func (in *LoadTest) DeepCopy() *LoadTest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadTest.

func (*LoadTest) DeepCopyInto

func (in *LoadTest) DeepCopyInto(out *LoadTest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LoadTest) DeepCopyObject

func (in *LoadTest) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*LoadTest) Default

func (r *LoadTest) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*LoadTest) SetupWebhookWithManager

func (r *LoadTest) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*LoadTest) ValidateCreate

func (r *LoadTest) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*LoadTest) ValidateDelete

func (r *LoadTest) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*LoadTest) ValidateUpdate

func (r *LoadTest) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type LoadTestList

type LoadTestList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []LoadTest `json:"items"`
}

LoadTestList contains a list of LoadTest

func (*LoadTestList) DeepCopy

func (in *LoadTestList) DeepCopy() *LoadTestList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadTestList.

func (*LoadTestList) DeepCopyInto

func (in *LoadTestList) DeepCopyInto(out *LoadTestList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LoadTestList) DeepCopyObject

func (in *LoadTestList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LoadTestSpec

type LoadTestSpec struct {
	FlowType    FlowType   `json:"flowType"`
	Duration    string     `json:"duration"`
	Parallelism int        `json:"parallelism"`
	Source      int        `json:"source"`
	Stopped     bool       `json:"stopped"`
	Args        []FlowArgs `json:"args"`
}

LoadTestSpec defines the desired state of LoadTest

func (*LoadTestSpec) DeepCopy

func (in *LoadTestSpec) DeepCopy() *LoadTestSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadTestSpec.

func (*LoadTestSpec) DeepCopyInto

func (in *LoadTestSpec) DeepCopyInto(out *LoadTestSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoadTestStatus

type LoadTestStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	Status       StatusType `json:"status"`
	Message      string     `json:"message"`
	SuccessCount int        `json:"successCount"`
	TotalCount   int        `json:"totalCount"`
	AvgRPS       int        `json:"avgRPS"`
	CreateTime   string     `json:"createTime"`
	UpdateTime   string     `json:"updateTime"`
}

LoadTestStatus defines the observed state of LoadTest

func (*LoadTestStatus) DeepCopy

func (in *LoadTestStatus) DeepCopy() *LoadTestStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadTestStatus.

func (*LoadTestStatus) DeepCopyInto

func (in *LoadTestStatus) DeepCopyInto(out *LoadTestStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StatusType

type StatusType string
const (
	CreatedStatus StatusType = "created"
	RunningStatus StatusType = "running"
	SuccessStatus StatusType = "success"
	FailedStatus  StatusType = "failed"
)

type StringProp

type StringProp struct {
	XMLName xml.Name `xml:"stringProp"`
	Name    string   `xml:"name,attr"`
	Value   string   `xml:",chardata"`
}

func (*StringProp) DeepCopy

func (in *StringProp) DeepCopy() *StringProp

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringProp.

func (*StringProp) DeepCopyInto

func (in *StringProp) DeepCopyInto(out *StringProp)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TestPlan

type TestPlan struct {
	XMLName     xml.Name    `xml:"TestPlan"`
	GuiClass    string      `xml:"guiclass,attr"`
	TestClass   string      `xml:"testclass,attr"`
	TestName    string      `xml:"testname,attr"`
	ElementProp ElementProp `xml:"elementProp"`
}

func (*TestPlan) DeepCopy

func (in *TestPlan) DeepCopy() *TestPlan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestPlan.

func (*TestPlan) DeepCopyInto

func (in *TestPlan) DeepCopyInto(out *TestPlan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThreadGroup

type ThreadGroup struct {
	XMLName     xml.Name     `xml:"ThreadGroup"`
	GuiClass    string       `xml:"guiclass,attr"`
	TestClass   string       `xml:"testclass,attr"`
	TestName    string       `xml:"testname,attr"`
	ElementProp ElementProp  `xml:"elementProp"`
	StringProps []StringProp `xml:"stringProp"`
	BoolProps   []BoolProp   `xml:"boolProp"`
}

func (*ThreadGroup) DeepCopy

func (in *ThreadGroup) DeepCopy() *ThreadGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThreadGroup.

func (*ThreadGroup) DeepCopyInto

func (in *ThreadGroup) DeepCopyInto(out *ThreadGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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