service

package
v1.7.12 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package service manages the main logic of benchmark job.

Package service manages the main logic of benchmark job.

Package service manages the main logic of benchmark job.

Index

Constants

View Source
const (
	Scenario           = "scenario"
	ScenarioKind       = "ValdBenchmarkScenario"
	BenchmarkName      = "benchmark-name"
	BeforeJobName      = "before-job-name"
	BeforeJobNamespace = "before-job-namespace"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Operator

type Operator interface {
	PreStart(context.Context) error
	Start(context.Context) (<-chan error, error)
}

func New

func New(opts ...Option) (Operator, error)

New creates the new scenario struct to handle vald benchmark job scenario. When the input options are invalid, the error will be returned.

type Option

type Option func(o *operator) error

Option represents the functional option for scenario struct.

func WithErrGroup

func WithErrGroup(eg errgroup.Group) Option

WithErrGroup sets the error group to scenario.

func WithJobImage

func WithJobImage(image string) Option

WithJobImage sets the benchmark job docker image info.

func WithJobImagePullPolicy

func WithJobImagePullPolicy(p string) Option

WithJobImagePullPolicy sets the benchmark job docker image pullPolicy.

func WithJobNamespace

func WithJobNamespace(ns string) Option

WithJobNamespace sets the namespace for running benchmark job.

func WithReconcileCheckDuration

func WithReconcileCheckDuration(ts string) Option

WithReconcileCheckDuration sets the reconcile check duration from input string.

Jump to

Keyboard shortcuts

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