service

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 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"
	Name               = "name"
	ServerName         = "vald-benchmark-job"
	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)
	GetScenarioStatus() map[v1.ValdBenchmarkScenarioStatus]int64
	GetBenchmarkJobStatus() map[v1.BenchmarkJobStatus]int64
}

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 WithConfigMapName added in v1.7.13

func WithConfigMapName(cm string) Option

func WithErrGroup

func WithErrGroup(eg errgroup.Group) Option

WithErrGroup sets the error group to scenario.

func WithJobImagePullPolicy

func WithJobImagePullPolicy(p string) Option

WithJobImagePullPolicy sets the benchmark job docker image pullPolicy.

func WithJobImageRepository added in v1.7.13

func WithJobImageRepository(repo string) Option

WithJobImageRepository sets the benchmark job docker image info.

func WithJobImageTag added in v1.7.13

func WithJobImageTag(tag string) Option

WithJobImageTag sets the benchmark job docker image tag.

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