types

package
v0.0.9-alpha-fork Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	ArchiveArgs string
	// k6-operator doesn't care for most values of CLI arguments to k6, with an exception of cloud output
	HasCloudOut bool
}

CLI is an innternal type to support k6 invocation in initialization stage. Not all k6 commands allow the same set of arguments so CLI is an object meant to contain only the ones fit for the archive call. Maybe revise this once crococonf is closer to integration?

func ParseCLI

func ParseCLI(spec *v1alpha1.K6Spec) *CLI

type Script

type Script struct {
	Name     string // name of ConfigMap or VolumeClaim or "LocalFile"
	Filename string
	Path     string
	Type     string // ConfigMap | VolumeClaim | LocalFile
}

Internal type created to support Spec.script options

func ParseScript

func ParseScript(spec *v1alpha1.K6Spec) (*Script, error)

ParseScript extracts Script data bits from K6 spec and performs basic validation

func (*Script) FullName

func (s *Script) FullName() string

func (*Script) UpdateCommand

func (s *Script) UpdateCommand(cmd []string) []string

UpdateCommand modifies command to check for script existence in case of LocalFile; otherwise, command remains unmodified

func (*Script) Volume

func (s *Script) Volume() []corev1.Volume

Volume creates a Volume spec for the script

func (*Script) VolumeMount

func (s *Script) VolumeMount() []corev1.VolumeMount

VolumeMount creates a VolumeMount spec for the script

Jump to

Keyboard shortcuts

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