proto

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Default_ProbeConf_NpxPath                   = string("npx")
	Default_ProbeConf_SaveScreenshotsForSuccess = bool(false)
	Default_ProbeConf_SaveTrace                 = SaveOption_NEVER
	Default_ProbeConf_Retries                   = int32(0)
	Default_ProbeConf_RequestsPerProbe          = int32(1)
	Default_ProbeConf_RequestsIntervalMsec      = int32(0)
)

Default values for ProbeConf fields.

Variables

View Source
var (
	SaveOption_name = map[int32]string{
		0: "NEVER",
		1: "ALWAYS",
		2: "ON_FIRST_RETRY",
		3: "ON_ALL_RETRIES",
		4: "RETAIN_ON_FAILURE",
	}
	SaveOption_value = map[string]int32{
		"NEVER":             0,
		"ALWAYS":            1,
		"ON_FIRST_RETRY":    2,
		"ON_ALL_RETRIES":    3,
		"RETAIN_ON_FAILURE": 4,
	}
)

Enum value maps for SaveOption.

View Source
var File_github_com_cloudprober_cloudprober_probes_browser_proto_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ProbeConf

type ProbeConf struct {

	// Playwright test specs to run.
	//
	// Each entry in test_spec is interpreted as follows:
	//   - If it contains one of the following regex characters:
	//     ^,$,*,|,?,+,(),[],{}, it is treated as a regex pattern and passed
	//     directly to Playwright.
	//   - Otherwise, it is treated as a filename (relative to test_dir or as
	//     an absolute path if specified), and will be wrapped as a regex
	//     matching the full path to that file.
	//
	// Examples:
	//
	//	test_spec: "test_login.ts" // runs tests in file {test_dir}/test_login.ts
	//	test_spec: "sm*.ts"        // runs tests in files matching {test_dir}/sm*.ts
	//
	// If test_spec is not set, all test files in test_dir (default: config
	// file directory) are executed.
	TestSpec []string `protobuf:"bytes,1,rep,name=test_spec,json=testSpec" json:"test_spec,omitempty"`
	// Test directory. This is the directory where test specs are located.
	// Default test_dir is config file directory ("{{configDir}}").
	TestDir *string `protobuf:"bytes,2,opt,name=test_dir,json=testDir" json:"test_dir,omitempty"`
	// Test spec filter. This field corresponds to the grep functionality of
	// playwright.
	//
	// Example:
	//
	//	{
	//	  include: "web|ui"  // include tests with "web" or "ui" in title
	//	  exclude: "@draft"  // exclude tests with @draft tag
	//	}
	TestSpecFilter *TestSpecFilter `protobuf:"bytes,3,opt,name=test_spec_filter,json=testSpecFilter" json:"test_spec_filter,omitempty"`
	// Path to the working directory for this probe. It has no impact on the
	// test execution except for the fact that this directory should be
	// writable. If left unset (recommended), we try to create a temporary
	// directory.
	//
	// You can set this field to a persistent location, e.g. a persistent
	// volume, and configure a large max_age in workdir_cleanup_options to
	// retain workdir files for a long time (default is 1 hour), but it's
	// recommended to use artifacts_options to store artifacts for longer
	// term access.
	Workdir *string `protobuf:"bytes,4,opt,name=workdir" json:"workdir,omitempty"`
	// Path to the playwright installation. We execute tests from this location.
	// If not specified, we'll use the value of environment variable
	// $PLAYWRIGHT_DIR, which is automatically set by the official cloudprober
	// playwright image (tag: "<version>-pw").
	PlaywrightDir *string `protobuf:"bytes,5,opt,name=playwright_dir,json=playwrightDir" json:"playwright_dir,omitempty"`
	// NPX path. Default is to assume npx is in the PATH.
	NpxPath *string `protobuf:"bytes,6,opt,name=npx_path,json=npxPath,def=npx" json:"npx_path,omitempty"`
	// Whether to enable screenshots for successful tests as well.
	// Note that screenshots are always enabled for failed tests, and you can
	// always save screenshots explicitly in the test spec.
	SaveScreenshotsForSuccess *bool `` /* 140-byte string literal not displayed */
	// Traces are expensive and can slow down the test. We recommend to enable
	// this only when needed.
	// Note save_traces is deprecated. Use save_trace instead.
	//
	// Deprecated: Marked as deprecated in github.com/cloudprober/cloudprober/probes/browser/proto/config.proto.
	SaveTraces *bool       `protobuf:"varint,8,opt,name=save_traces,json=saveTraces" json:"save_traces,omitempty"`
	SaveTrace  *SaveOption `` /* 131-byte string literal not displayed */
	// Number of retries to run for each test.
	Retries *int32 `protobuf:"varint,10,opt,name=retries,def=0" json:"retries,omitempty"`
	// By default, we export all test metrica as counters. You can change how
	// metrics are exported by setting the following options.
	TestMetricsOptions *TestMetricsOptions `protobuf:"bytes,11,opt,name=test_metrics_options,json=testMetricsOptions" json:"test_metrics_options,omitempty"`
	// Artifacts options. If probe level artifacts options are not specified,
	// we use global artifacts options if available. Note: it typically makes
	// more sense to specify artifacts options at the global level.
	ArtifactsOptions *proto.ArtifactsOptions `protobuf:"bytes,12,opt,name=artifacts_options,json=artifactsOptions" json:"artifacts_options,omitempty"`
	// Workdir cleanup options.
	// If left unspecified, we clean up workdir every hour.
	WorkdirCleanupOptions *proto.CleanupOptions `protobuf:"bytes,13,opt,name=workdir_cleanup_options,json=workdirCleanupOptions" json:"workdir_cleanup_options,omitempty"`
	// Environment variables. These are passed/set before probing starts.
	EnvVar map[string]string `` /* 147-byte string literal not displayed */
	// Requests per probe.
	// Number of DNS requests per probe. Requests are executed concurrently and
	// each DNS request contributes to probe results. For example, if you run two
	// requests per probe, "total" counter will be incremented by 2.
	RequestsPerProbe *int32 `protobuf:"varint,98,opt,name=requests_per_probe,json=requestsPerProbe,def=1" json:"requests_per_probe,omitempty"`
	// How long to wait between two requests to the same target. Only relevant
	// if requests_per_probe is also configured.
	//
	// This value should be less than (interval - timeout) / requests_per_probe.
	// This is to ensure that all requests are executed within one probe interval
	// and all of them get sufficient time. For example, if probe interval is 2s,
	// timeout is 1s, and requests_per_probe is 10,  requests_interval_msec
	// should be less than 10ms.
	RequestsIntervalMsec *int32 `protobuf:"varint,99,opt,name=requests_interval_msec,json=requestsIntervalMsec,def=0" json:"requests_interval_msec,omitempty"`
	// contains filtered or unexported fields
}

func (*ProbeConf) Descriptor deprecated

func (*ProbeConf) Descriptor() ([]byte, []int)

Deprecated: Use ProbeConf.ProtoReflect.Descriptor instead.

func (*ProbeConf) GetArtifactsOptions

func (x *ProbeConf) GetArtifactsOptions() *proto.ArtifactsOptions

func (*ProbeConf) GetEnvVar

func (x *ProbeConf) GetEnvVar() map[string]string

func (*ProbeConf) GetNpxPath

func (x *ProbeConf) GetNpxPath() string

func (*ProbeConf) GetPlaywrightDir

func (x *ProbeConf) GetPlaywrightDir() string

func (*ProbeConf) GetRequestsIntervalMsec

func (x *ProbeConf) GetRequestsIntervalMsec() int32

func (*ProbeConf) GetRequestsPerProbe

func (x *ProbeConf) GetRequestsPerProbe() int32

func (*ProbeConf) GetRetries added in v0.14.1

func (x *ProbeConf) GetRetries() int32

func (*ProbeConf) GetSaveScreenshotsForSuccess

func (x *ProbeConf) GetSaveScreenshotsForSuccess() bool

func (*ProbeConf) GetSaveTrace added in v0.14.1

func (x *ProbeConf) GetSaveTrace() SaveOption

func (*ProbeConf) GetSaveTraces deprecated

func (x *ProbeConf) GetSaveTraces() bool

Deprecated: Marked as deprecated in github.com/cloudprober/cloudprober/probes/browser/proto/config.proto.

func (*ProbeConf) GetTestDir

func (x *ProbeConf) GetTestDir() string

func (*ProbeConf) GetTestMetricsOptions

func (x *ProbeConf) GetTestMetricsOptions() *TestMetricsOptions

func (*ProbeConf) GetTestSpec

func (x *ProbeConf) GetTestSpec() []string

func (*ProbeConf) GetTestSpecFilter added in v0.14.1

func (x *ProbeConf) GetTestSpecFilter() *TestSpecFilter

func (*ProbeConf) GetWorkdir

func (x *ProbeConf) GetWorkdir() string

func (*ProbeConf) GetWorkdirCleanupOptions

func (x *ProbeConf) GetWorkdirCleanupOptions() *proto.CleanupOptions

func (*ProbeConf) ProtoMessage

func (*ProbeConf) ProtoMessage()

func (*ProbeConf) ProtoReflect

func (x *ProbeConf) ProtoReflect() protoreflect.Message

func (*ProbeConf) Reset

func (x *ProbeConf) Reset()

func (*ProbeConf) String

func (x *ProbeConf) String() string

type SaveOption added in v0.14.1

type SaveOption int32
const (
	SaveOption_NEVER             SaveOption = 0
	SaveOption_ALWAYS            SaveOption = 1
	SaveOption_ON_FIRST_RETRY    SaveOption = 2
	SaveOption_ON_ALL_RETRIES    SaveOption = 3
	SaveOption_RETAIN_ON_FAILURE SaveOption = 4
)

func (SaveOption) Descriptor added in v0.14.1

func (SaveOption) Descriptor() protoreflect.EnumDescriptor

func (SaveOption) Enum added in v0.14.1

func (x SaveOption) Enum() *SaveOption

func (SaveOption) EnumDescriptor deprecated added in v0.14.1

func (SaveOption) EnumDescriptor() ([]byte, []int)

Deprecated: Use SaveOption.Descriptor instead.

func (SaveOption) Number added in v0.14.1

func (x SaveOption) Number() protoreflect.EnumNumber

func (SaveOption) String added in v0.14.1

func (x SaveOption) String() string

func (SaveOption) Type added in v0.14.1

func (*SaveOption) UnmarshalJSON deprecated added in v0.14.1

func (x *SaveOption) UnmarshalJSON(b []byte) error

Deprecated: Do not use.

type TestMetricsOptions

type TestMetricsOptions struct {
	DisableTestMetrics *bool `protobuf:"varint,1,opt,name=disable_test_metrics,json=disableTestMetrics" json:"disable_test_metrics,omitempty"`
	DisableAggregation *bool `protobuf:"varint,2,opt,name=disable_aggregation,json=disableAggregation" json:"disable_aggregation,omitempty"`
	EnableStepMetrics  *bool `protobuf:"varint,3,opt,name=enable_step_metrics,json=enableStepMetrics" json:"enable_step_metrics,omitempty"`
	// contains filtered or unexported fields
}

func (*TestMetricsOptions) Descriptor deprecated

func (*TestMetricsOptions) Descriptor() ([]byte, []int)

Deprecated: Use TestMetricsOptions.ProtoReflect.Descriptor instead.

func (*TestMetricsOptions) GetDisableAggregation

func (x *TestMetricsOptions) GetDisableAggregation() bool

func (*TestMetricsOptions) GetDisableTestMetrics

func (x *TestMetricsOptions) GetDisableTestMetrics() bool

func (*TestMetricsOptions) GetEnableStepMetrics

func (x *TestMetricsOptions) GetEnableStepMetrics() bool

func (*TestMetricsOptions) ProtoMessage

func (*TestMetricsOptions) ProtoMessage()

func (*TestMetricsOptions) ProtoReflect

func (x *TestMetricsOptions) ProtoReflect() protoreflect.Message

func (*TestMetricsOptions) Reset

func (x *TestMetricsOptions) Reset()

func (*TestMetricsOptions) String

func (x *TestMetricsOptions) String() string

type TestSpecFilter added in v0.14.1

type TestSpecFilter struct {

	// Tests to include. Default is to include all tests matched by test spec.
	// This corresponds to the playwright --grep flag.
	//
	// Example:
	// include: "login|logout"  // include tests with login or logout in title
	// include: "@smoke"        // include tests with @smoke tag
	Include *string `protobuf:"bytes,1,opt,name=include" json:"include,omitempty"`
	// Tests to exclude.
	// This corresponds to the playwright --grep-invert flag.
	//
	// Example:
	// exclude: "@draft|@debug"  // exclude tests with @draft or @debug tag
	Exclude *string `protobuf:"bytes,2,opt,name=exclude" json:"exclude,omitempty"`
	// contains filtered or unexported fields
}

func (*TestSpecFilter) Descriptor deprecated added in v0.14.1

func (*TestSpecFilter) Descriptor() ([]byte, []int)

Deprecated: Use TestSpecFilter.ProtoReflect.Descriptor instead.

func (*TestSpecFilter) GetExclude added in v0.14.1

func (x *TestSpecFilter) GetExclude() string

func (*TestSpecFilter) GetInclude added in v0.14.1

func (x *TestSpecFilter) GetInclude() string

func (*TestSpecFilter) ProtoMessage added in v0.14.1

func (*TestSpecFilter) ProtoMessage()

func (*TestSpecFilter) ProtoReflect added in v0.14.1

func (x *TestSpecFilter) ProtoReflect() protoreflect.Message

func (*TestSpecFilter) Reset added in v0.14.1

func (x *TestSpecFilter) Reset()

func (*TestSpecFilter) String added in v0.14.1

func (x *TestSpecFilter) String() string

Jump to

Keyboard shortcuts

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