Back to godoc.org

Package configpb

v0.0.0-...-1557bcf
Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module: github.com/luci/luci-go

Index

Variables

var (
	RealmPermission_name = map[int32]string{
		0:  "REALM_PERMISSION_UNSPECIFIED",
		1:  "REALM_PERMISSION_POOLS_CREATE_TASK",
		4:  "REALM_PERMISSION_POOLS_LIST_TASKS",
		5:  "REALM_PERMISSION_POOLS_CANCEL_TASK",
		6:  "REALM_PERMISSION_POOLS_CREATE_BOT",
		7:  "REALM_PERMISSION_POOLS_LIST_BOTS",
		8:  "REALM_PERMISSION_POOLS_TERMINATE_BOT",
		9:  "REALM_PERMISSION_POOLS_DELETE_BOT",
		2:  "REALM_PERMISSION_TASKS_CREATE_IN_REALM",
		3:  "REALM_PERMISSION_TASKS_ACT_AS",
		10: "REALM_PERMISSION_TASKS_GET",
		11: "REALM_PERMISSION_TASKS_CANCEL",
	}
	RealmPermission_value = map[string]int32{
		"REALM_PERMISSION_UNSPECIFIED":           0,
		"REALM_PERMISSION_POOLS_CREATE_TASK":     1,
		"REALM_PERMISSION_POOLS_LIST_TASKS":      4,
		"REALM_PERMISSION_POOLS_CANCEL_TASK":     5,
		"REALM_PERMISSION_POOLS_CREATE_BOT":      6,
		"REALM_PERMISSION_POOLS_LIST_BOTS":       7,
		"REALM_PERMISSION_POOLS_TERMINATE_BOT":   8,
		"REALM_PERMISSION_POOLS_DELETE_BOT":      9,
		"REALM_PERMISSION_TASKS_CREATE_IN_REALM": 2,
		"REALM_PERMISSION_TASKS_ACT_AS":          3,
		"REALM_PERMISSION_TASKS_GET":             10,
		"REALM_PERMISSION_TASKS_CANCEL":          11,
	}
)

Enum value maps for RealmPermission.

var File_go_chromium_org_luci_swarming_proto_config_bots_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_swarming_proto_config_config_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_swarming_proto_config_pools_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_swarming_proto_config_realms_proto protoreflect.FileDescriptor

type AuthSettings

type AuthSettings struct {
	AdminsGroup string `protobuf:"bytes,1,opt,name=admins_group,json=adminsGroup,proto3" json:"admins_group,omitempty"`

	BotBootstrapGroup string `protobuf:"bytes,2,opt,name=bot_bootstrap_group,json=botBootstrapGroup,proto3" json:"bot_bootstrap_group,omitempty"`

	PrivilegedUsersGroup string `protobuf:"bytes,3,opt,name=privileged_users_group,json=privilegedUsersGroup,proto3" json:"privileged_users_group,omitempty"`

	UsersGroup string `protobuf:"bytes,4,opt,name=users_group,json=usersGroup,proto3" json:"users_group,omitempty"`

	ViewAllBotsGroup string `protobuf:"bytes,5,opt,name=view_all_bots_group,json=viewAllBotsGroup,proto3" json:"view_all_bots_group,omitempty"`

	ViewAllTasksGroup string `protobuf:"bytes,6,opt,name=view_all_tasks_group,json=viewAllTasksGroup,proto3" json:"view_all_tasks_group,omitempty"`

	EnforcedRealmPermissions []RealmPermission "" /* 180 byte string literal not displayed */

}

func (*AuthSettings) Descriptor

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

Deprecated: Use AuthSettings.ProtoReflect.Descriptor instead.

func (*AuthSettings) GetAdminsGroup

func (x *AuthSettings) GetAdminsGroup() string

func (*AuthSettings) GetBotBootstrapGroup

func (x *AuthSettings) GetBotBootstrapGroup() string

func (*AuthSettings) GetEnforcedRealmPermissions

func (x *AuthSettings) GetEnforcedRealmPermissions() []RealmPermission

func (*AuthSettings) GetPrivilegedUsersGroup

func (x *AuthSettings) GetPrivilegedUsersGroup() string

func (*AuthSettings) GetUsersGroup

func (x *AuthSettings) GetUsersGroup() string

func (*AuthSettings) GetViewAllBotsGroup

func (x *AuthSettings) GetViewAllBotsGroup() string

func (*AuthSettings) GetViewAllTasksGroup

func (x *AuthSettings) GetViewAllTasksGroup() string

func (*AuthSettings) ProtoMessage

func (*AuthSettings) ProtoMessage()

func (*AuthSettings) ProtoReflect

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

func (*AuthSettings) Reset

func (x *AuthSettings) Reset()

func (*AuthSettings) String

func (x *AuthSettings) String() string

type BotAuth

type BotAuth struct {
	LogIfFailed bool `protobuf:"varint,5,opt,name=log_if_failed,json=logIfFailed,proto3" json:"log_if_failed,omitempty"`

	RequireLuciMachineToken bool "" /* 135 byte string literal not displayed */

	RequireServiceAccount []string `protobuf:"bytes,2,rep,name=require_service_account,json=requireServiceAccount,proto3" json:"require_service_account,omitempty"`

	RequireGceVmToken *BotAuth_GCE `protobuf:"bytes,4,opt,name=require_gce_vm_token,json=requireGceVmToken,proto3" json:"require_gce_vm_token,omitempty"`

	IpWhitelist string `protobuf:"bytes,3,opt,name=ip_whitelist,json=ipWhitelist,proto3" json:"ip_whitelist,omitempty"`

}

Defines what kind of authentication to perform when handling requests from bots belonging to some bot group.

The following combinations are valid:

* Either one of require_* alone.
* IP whitelist alone.
* IP + require_luci_machine_token: requires both to pass.
* IP + require_service_account: requires both to pass.
* IP + require_gce_vm_token: requires both to pass.

Next ID: 6.

func (*BotAuth) Descriptor

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

Deprecated: Use BotAuth.ProtoReflect.Descriptor instead.

func (*BotAuth) GetIpWhitelist

func (x *BotAuth) GetIpWhitelist() string

func (*BotAuth) GetLogIfFailed

func (x *BotAuth) GetLogIfFailed() bool

func (*BotAuth) GetRequireGceVmToken

func (x *BotAuth) GetRequireGceVmToken() *BotAuth_GCE

func (*BotAuth) GetRequireLuciMachineToken

func (x *BotAuth) GetRequireLuciMachineToken() bool

func (*BotAuth) GetRequireServiceAccount

func (x *BotAuth) GetRequireServiceAccount() []string

func (*BotAuth) ProtoMessage

func (*BotAuth) ProtoMessage()

func (*BotAuth) ProtoReflect

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

func (*BotAuth) Reset

func (x *BotAuth) Reset()

func (*BotAuth) String

func (x *BotAuth) String() string

type BotAuth_GCE

type BotAuth_GCE struct {
	Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	// contains filtered or unexported fields
}

See require_gce_vm_token below.

func (*BotAuth_GCE) Descriptor

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

Deprecated: Use BotAuth_GCE.ProtoReflect.Descriptor instead.

func (*BotAuth_GCE) GetProject

func (x *BotAuth_GCE) GetProject() string

func (*BotAuth_GCE) ProtoMessage

func (*BotAuth_GCE) ProtoMessage()

func (*BotAuth_GCE) ProtoReflect

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

func (*BotAuth_GCE) Reset

func (x *BotAuth_GCE) Reset()

func (*BotAuth_GCE) String

func (x *BotAuth_GCE) String() string

type BotGroup

type BotGroup struct {
	BotId []string `protobuf:"bytes,1,rep,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"`

	BotIdPrefix []string `protobuf:"bytes,2,rep,name=bot_id_prefix,json=botIdPrefix,proto3" json:"bot_id_prefix,omitempty"`

	Auth []*BotAuth `protobuf:"bytes,20,rep,name=auth,proto3" json:"auth,omitempty"`

	Owners []string `protobuf:"bytes,21,rep,name=owners,proto3" json:"owners,omitempty"`

	Dimensions []string `protobuf:"bytes,22,rep,name=dimensions,proto3" json:"dimensions,omitempty"`

	BotConfigScript string `protobuf:"bytes,23,opt,name=bot_config_script,json=botConfigScript,proto3" json:"bot_config_script,omitempty"`

	BotConfigScriptContent []byte "" /* 132 byte string literal not displayed */

	SystemServiceAccount string `protobuf:"bytes,24,opt,name=system_service_account,json=systemServiceAccount,proto3" json:"system_service_account,omitempty"`

}

A group of bots that share authentication method, dimensions and owners.

Union of bot_id and bot_id_prefix define a set of bots that belong to this group. The rest of the fields define properties of this group.

If bot_id and bot_id_prefix are both missing, the group defines all bots that didn't fit into other groups. There can be only one such "default" group.

NOTE: Swarming allows 'derivative' bots where multiple bots run on the same host machine in some sort of container (such as Docker containers) and SHARE A SINGLE CREDENTIAL. These bots have hostnames such as 'hostmachine--001', where the "--001" suffix indicates which of the contained bots on 'hostmachine' it is. When Swarming checks the bot affiliation for this contained machine, it checks ONLY the 'hostmachine' portion. This means that if your contained bot is 'vm10-vlan2--001', it would match:

`bot_id: "vm10-vlan2`
`bot_id: "vm{0...100}-vlan2`
`bot_id_prefix: "vm10-vlan`

but would NOT match:

`bot_id: "vm10-vlan2--001`
`bot_id_prefix: "vm10-vlan2-`
`bot_id_prefix: "vm10-vlan2--`

TODO(vadimsh): Introduce explicit field "use_as_default" instead.

func (*BotGroup) Descriptor

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

Deprecated: Use BotGroup.ProtoReflect.Descriptor instead.

func (*BotGroup) GetAuth

func (x *BotGroup) GetAuth() []*BotAuth

func (*BotGroup) GetBotConfigScript

func (x *BotGroup) GetBotConfigScript() string

func (*BotGroup) GetBotConfigScriptContent

func (x *BotGroup) GetBotConfigScriptContent() []byte

func (*BotGroup) GetBotId

func (x *BotGroup) GetBotId() []string

func (*BotGroup) GetBotIdPrefix

func (x *BotGroup) GetBotIdPrefix() []string

func (*BotGroup) GetDimensions

func (x *BotGroup) GetDimensions() []string

func (*BotGroup) GetOwners

func (x *BotGroup) GetOwners() []string

func (*BotGroup) GetSystemServiceAccount

func (x *BotGroup) GetSystemServiceAccount() string

func (*BotGroup) ProtoMessage

func (*BotGroup) ProtoMessage()

func (*BotGroup) ProtoReflect

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

func (*BotGroup) Reset

func (x *BotGroup) Reset()

func (*BotGroup) String

func (x *BotGroup) String() string

type BotMonitoring

type BotMonitoring struct {

	// Name is used by Pool to describe how to monitor bots in this pool.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Dimension keys to be used to bucket the bots.
	//
	// The algorithm for a key with multiple values is:
	//   def simplify(values):
	//     values = sorted(values)
	//     return '|'.join(
	//         v for i, v in enumerate(values)
	//         if not any(v.startswith(value) for v in values[i+1:]))
	//
	// For example, if 'os' is specified and a bot has the values
	// ['Linux', 'Ubuntu', 'Ubuntu-16.04'], the bucket value used for this bot
	// will be 'Linux|Ubuntu-16.04'.
	//
	// Then whole algorithm then works for each key:
	//   def bucket(keys, bot_dimensions):
	//     return ';'.join(
	//         '%s:%s' % (key, simplify(bot_dimensions.get(values, []))
	//         for key in keys)
	//
	// so the end result may look like: 'os:Linux|Ubuntu-16.04;pool:Testers'.
	//
	// More precisely, when this is used, the other bot dimensions are ignored.
	// 'pool' is always implicit.
	DimensionKey []string `protobuf:"bytes,2,rep,name=dimension_key,json=dimensionKey,proto3" json:"dimension_key,omitempty"`
	// contains filtered or unexported fields
}

Defines about how to monitor bots.

func (*BotMonitoring) Descriptor

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

Deprecated: Use BotMonitoring.ProtoReflect.Descriptor instead.

func (*BotMonitoring) GetDimensionKey

func (x *BotMonitoring) GetDimensionKey() []string

func (*BotMonitoring) GetName

func (x *BotMonitoring) GetName() string

func (*BotMonitoring) ProtoMessage

func (*BotMonitoring) ProtoMessage()

func (*BotMonitoring) ProtoReflect

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

func (*BotMonitoring) Reset

func (x *BotMonitoring) Reset()

func (*BotMonitoring) String

func (x *BotMonitoring) String() string

type BotsCfg

type BotsCfg struct {

	// List of dimension names that are provided by the server.
	//
	// If bot attempts to set such dimension, it'll be ignored. Trusted dimensions
	// are defined through bot_group configs below. Swarming users can trust such
	// dimensions, since they are set by the server based on validated credentials
	// (unlike other dimensions that can be arbitrary defined by the bot itself).
	TrustedDimensions []string `protobuf:"bytes,1,rep,name=trusted_dimensions,json=trustedDimensions,proto3" json:"trusted_dimensions,omitempty"`
	// A list of groups of bots. Each group defines a bunch of bots that all
	// have same dimensions and authenticate in the same way.
	//
	// The order of entries here is irrelevant. The server uses the following
	// search algorithm when trying to pick a group for a bot with some bot_id:
	//    1) First it tries to find a direct match: a group that lists the bot in
	//       bot_id field.
	//    2) Next it tries to find a group with matching bot_id_prefix. The config
	//       validation process makes sure prefixes do not "intersect", so there
	//       will be at most one matching group.
	//    3) Finally, if there's a group with no defined bot_id or bot_id_prefix
	//       fields (the "default" group), the bot is categorized to that group.
	//       If there's no such group, the connection from the bot is rejected.
	//       Config validation process ensures there can be only one such group.
	BotGroup []*BotGroup `protobuf:"bytes,2,rep,name=bot_group,json=botGroup,proto3" json:"bot_group,omitempty"`
	// contains filtered or unexported fields
}

Schema for bots.cfg service config file in luci-config.

It defines a function bot_id => (required credentials, trusted_dimensions, config), where

* "bot_id" is identifier of a bot as sent by the bot itself (usually
  machine hostname, short one, not FQDN)
* "required credentials" describes how server should authenticate calls
  from the bot.
* "trusted_dimensions" is a set of dimension set by the server itself.
  Such dimensions can't be spoofed by the bot.
* "config" is any additional bot configuration.

Connections from bots that do not appear in this config are rejected.

The default config (used if bots.cfg is missing) represents IP-whitelist only authentication, as was used before bots.cfg was implemented:

bot_group {
  auth {
    ip_whitelist: "<swarming-app-id>-bots"
  }
}

func (*BotsCfg) Descriptor

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

Deprecated: Use BotsCfg.ProtoReflect.Descriptor instead.

func (*BotsCfg) GetBotGroup

func (x *BotsCfg) GetBotGroup() []*BotGroup

func (*BotsCfg) GetTrustedDimensions

func (x *BotsCfg) GetTrustedDimensions() []string

func (*BotsCfg) ProtoMessage

func (*BotsCfg) ProtoMessage()

func (*BotsCfg) ProtoReflect

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

func (*BotsCfg) Reset

func (x *BotsCfg) Reset()

func (*BotsCfg) String

func (x *BotsCfg) String() string

type CipdPackage

type CipdPackage struct {

	// A template of a full CIPD package name, e.g.
	// "infra/tools/cipd/${platform}"
	// See also cipd.ALL_PARAMS.
	PackageName string `protobuf:"bytes,1,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"`
	// Valid package version for all packages matched by package name.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

A CIPD package.

func (*CipdPackage) Descriptor

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

Deprecated: Use CipdPackage.ProtoReflect.Descriptor instead.

func (*CipdPackage) GetPackageName

func (x *CipdPackage) GetPackageName() string

func (*CipdPackage) GetVersion

func (x *CipdPackage) GetVersion() string

func (*CipdPackage) ProtoMessage

func (*CipdPackage) ProtoMessage()

func (*CipdPackage) ProtoReflect

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

func (*CipdPackage) Reset

func (x *CipdPackage) Reset()

func (*CipdPackage) String

func (x *CipdPackage) String() string

type CipdSettings

type CipdSettings struct {

	// URL of the default CIPD server to use if it is not specified in a task.
	// Must start with "https://" or "http://",
	// e.g. "https://chrome-infra-packages.appspot.com".
	DefaultServer string `protobuf:"bytes,1,opt,name=default_server,json=defaultServer,proto3" json:"default_server,omitempty"`
	// Package of the default CIPD client to use if it is not specified in a
	// task.
	DefaultClientPackage *CipdPackage `protobuf:"bytes,2,opt,name=default_client_package,json=defaultClientPackage,proto3" json:"default_client_package,omitempty"`
	// contains filtered or unexported fields
}

Settings for Swarming-CIPD integration.

func (*CipdSettings) Descriptor

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

Deprecated: Use CipdSettings.ProtoReflect.Descriptor instead.

func (*CipdSettings) GetDefaultClientPackage

func (x *CipdSettings) GetDefaultClientPackage() *CipdPackage

func (*CipdSettings) GetDefaultServer

func (x *CipdSettings) GetDefaultServer() string

func (*CipdSettings) ProtoMessage

func (*CipdSettings) ProtoMessage()

func (*CipdSettings) ProtoReflect

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

func (*CipdSettings) Reset

func (x *CipdSettings) Reset()

func (*CipdSettings) String

func (x *CipdSettings) String() string

type ExternalSchedulerConfig

type ExternalSchedulerConfig struct {

	// Service address of external scheduler.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Scheduler id within the external scheduler service to use. This value
	// is opaque to swarming.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Dimensions is a list of dimension strings in "key:value" format (e.g.
	// ["os:foo", "featureX:bar"]) that determines eligibility for a bot or task
	// to use this external scheduler. In particular:
	// - a bot will be eligible if it contains all of these dimensions.
	// - a task will be eligible if all its slices contain all these dimensions.
	//
	// Note of care: if this list is empty, that means all requests in the pool
	// are eligible to be forwarded to it.
	//
	// Note: To be deprecated, in favor of: any_dimensions and all_dimensions.
	Dimensions []string `protobuf:"bytes,3,rep,name=dimensions,proto3" json:"dimensions,omitempty"`
	// If not enabled, this external scheduler config will be ignored. This
	// makes it safer to add new configs (the naive approach of adding a config
	// with empty dimentions list would cause all requests to be routed to
	// that config).
	Enabled bool `protobuf:"varint,4,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Deprecated: Do not use.
	FallbackWhenEmpty bool `protobuf:"varint,5,opt,name=fallback_when_empty,json=fallbackWhenEmpty,proto3" json:"fallback_when_empty,omitempty"`
	// A task or bot must have all of these dimensions in order to match this
	// dimension set.
	//
	// Note: Support not yet implemented.
	AllDimensions []string `protobuf:"bytes,6,rep,name=all_dimensions,json=allDimensions,proto3" json:"all_dimensions,omitempty"`
	// If any_dimensions is defined, a task or bot must have any of these
	// dimensions in order to match this dimension set.
	//
	// Note: Support not yet implemented.
	AnyDimensions []string `protobuf:"bytes,7,rep,name=any_dimensions,json=anyDimensions,proto3" json:"any_dimensions,omitempty"`
	// If true, allows the swarming native scheduler to reap tasks that would
	// otherwise be owned by this external scheduler, if the external scheduler
	// returns no results.
	//
	// This field should be enabled temporarily when first turning on a new
	// external scheduler config, to allow tasks that existing prior to that time
	// to still have a chance to run. After prior tasks have aged out of the
	// system, this flag should be disabled, to get stricter consistency between
	// swarming's state and external scheduler's state.
	AllowEsFallback bool `protobuf:"varint,8,opt,name=allow_es_fallback,json=allowEsFallback,proto3" json:"allow_es_fallback,omitempty"`
	// contains filtered or unexported fields
}

Describes an external scheduler used by a particular swarming pool and dimension set, via the external scheduler API.

func (*ExternalSchedulerConfig) Descriptor

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

Deprecated: Use ExternalSchedulerConfig.ProtoReflect.Descriptor instead.

func (*ExternalSchedulerConfig) GetAddress

func (x *ExternalSchedulerConfig) GetAddress() string

func (*ExternalSchedulerConfig) GetAllDimensions

func (x *ExternalSchedulerConfig) GetAllDimensions() []string

func (*ExternalSchedulerConfig) GetAllowEsFallback

func (x *ExternalSchedulerConfig) GetAllowEsFallback() bool

func (*ExternalSchedulerConfig) GetAnyDimensions

func (x *ExternalSchedulerConfig) GetAnyDimensions() []string

func (*ExternalSchedulerConfig) GetDimensions

func (x *ExternalSchedulerConfig) GetDimensions() []string

func (*ExternalSchedulerConfig) GetEnabled

func (x *ExternalSchedulerConfig) GetEnabled() bool

func (*ExternalSchedulerConfig) GetFallbackWhenEmpty

func (x *ExternalSchedulerConfig) GetFallbackWhenEmpty() bool

Deprecated: Do not use.

func (*ExternalSchedulerConfig) GetId

func (x *ExternalSchedulerConfig) GetId() string

func (*ExternalSchedulerConfig) ProtoMessage

func (*ExternalSchedulerConfig) ProtoMessage()

func (*ExternalSchedulerConfig) ProtoReflect

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

func (*ExternalSchedulerConfig) Reset

func (x *ExternalSchedulerConfig) Reset()

func (*ExternalSchedulerConfig) String

func (x *ExternalSchedulerConfig) String() string

type ExternalServices

type ExternalServices struct {
	Isolate *ExternalServices_Isolate `protobuf:"bytes,1,opt,name=isolate,proto3" json:"isolate,omitempty"`
	Cipd    *ExternalServices_CIPD    `protobuf:"bytes,2,opt,name=cipd,proto3" json:"cipd,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalServices) Descriptor

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

Deprecated: Use ExternalServices.ProtoReflect.Descriptor instead.

func (*ExternalServices) GetCipd

func (x *ExternalServices) GetCipd() *ExternalServices_CIPD

func (*ExternalServices) GetIsolate

func (x *ExternalServices) GetIsolate() *ExternalServices_Isolate

func (*ExternalServices) ProtoMessage

func (*ExternalServices) ProtoMessage()

func (*ExternalServices) ProtoReflect

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

func (*ExternalServices) Reset

func (x *ExternalServices) Reset()

func (*ExternalServices) String

func (x *ExternalServices) String() string

type ExternalServices_CIPD

type ExternalServices_CIPD struct {

	// (required) URL of the default CIPD server to use, if it is not specified
	// in the task.
	//
	// Must start with "https://" or "http://".
	//
	// e.g. "https://chrome-infra-packages.appspot.com"
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// (required) The version of the cipd client to use. This is likely the
	// 'infra/tools/cipd/${platform}' package, but because it's part of the
	// bootstrap needs special logic to handle its installation.
	ClientPackage *CipdPackage `protobuf:"bytes,3,opt,name=client_package,json=clientPackage,proto3" json:"client_package,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalServices_CIPD) Descriptor

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

Deprecated: Use ExternalServices_CIPD.ProtoReflect.Descriptor instead.

func (*ExternalServices_CIPD) GetClientPackage

func (x *ExternalServices_CIPD) GetClientPackage() *CipdPackage

func (*ExternalServices_CIPD) GetServer

func (x *ExternalServices_CIPD) GetServer() string

func (*ExternalServices_CIPD) ProtoMessage

func (*ExternalServices_CIPD) ProtoMessage()

func (*ExternalServices_CIPD) ProtoReflect

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

func (*ExternalServices_CIPD) Reset

func (x *ExternalServices_CIPD) Reset()

func (*ExternalServices_CIPD) String

func (x *ExternalServices_CIPD) String() string

type ExternalServices_Isolate

type ExternalServices_Isolate struct {

	// (required) URL of the default isolate server to use if it is not
	// specified in the task.
	//
	// Must start with "https://" or "http://".
	//
	// e.g. "https://isolateserver.appspot.com"
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// (required) Default namespace to use if it is not specified in a task,
	// e.g. "default-gzip"
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalServices_Isolate) Descriptor

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

Deprecated: Use ExternalServices_Isolate.ProtoReflect.Descriptor instead.

func (*ExternalServices_Isolate) GetNamespace

func (x *ExternalServices_Isolate) GetNamespace() string

func (*ExternalServices_Isolate) GetServer

func (x *ExternalServices_Isolate) GetServer() string

func (*ExternalServices_Isolate) ProtoMessage

func (*ExternalServices_Isolate) ProtoMessage()

func (*ExternalServices_Isolate) ProtoReflect

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

func (*ExternalServices_Isolate) Reset

func (x *ExternalServices_Isolate) Reset()

func (*ExternalServices_Isolate) String

func (x *ExternalServices_Isolate) String() string

type IsolateSettings

type IsolateSettings struct {

	// URL of the default isolate server to use if it is not specified in a
	// task. Must start with "https://" or "http://",
	// e.g. "https://isolateserver.appspot.com"
	DefaultServer string `protobuf:"bytes,1,opt,name=default_server,json=defaultServer,proto3" json:"default_server,omitempty"`
	// Default namespace to use if it is not specified in a task,
	// e.g. "default-gzip"
	DefaultNamespace string `protobuf:"bytes,2,opt,name=default_namespace,json=defaultNamespace,proto3" json:"default_namespace,omitempty"`
	// contains filtered or unexported fields
}

Configuration for swarming-isolate integration.

func (*IsolateSettings) Descriptor

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

Deprecated: Use IsolateSettings.ProtoReflect.Descriptor instead.

func (*IsolateSettings) GetDefaultNamespace

func (x *IsolateSettings) GetDefaultNamespace() string

func (*IsolateSettings) GetDefaultServer

func (x *IsolateSettings) GetDefaultServer() string

func (*IsolateSettings) ProtoMessage

func (*IsolateSettings) ProtoMessage()

func (*IsolateSettings) ProtoReflect

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

func (*IsolateSettings) Reset

func (x *IsolateSettings) Reset()

func (*IsolateSettings) String

func (x *IsolateSettings) String() string

type Pool

type Pool struct {
	Name []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"`

	Owners []string `protobuf:"bytes,2,rep,name=owners,proto3" json:"owners,omitempty"`

	Schedulers *Schedulers `protobuf:"bytes,3,opt,name=schedulers,proto3" json:"schedulers,omitempty"`

	AllowedServiceAccount []string `protobuf:"bytes,4,rep,name=allowed_service_account,json=allowedServiceAccount,proto3" json:"allowed_service_account,omitempty"`

	AllowedServiceAccountGroup []string "" /* 143 byte string literal not displayed */

	TaskDeploymentScheme isPool_TaskDeploymentScheme `protobuf_oneof:"task_deployment_scheme"`

	BotMonitoring string `protobuf:"bytes,8,opt,name=bot_monitoring,json=botMonitoring,proto3" json:"bot_monitoring,omitempty"`

	ExternalSchedulers []*ExternalSchedulerConfig `protobuf:"bytes,9,rep,name=external_schedulers,json=externalSchedulers,proto3" json:"external_schedulers,omitempty"`

	Realm string `protobuf:"bytes,10,opt,name=realm,proto3" json:"realm,omitempty"`

	EnforcedRealmPermissions []RealmPermission "" /* 181 byte string literal not displayed */

	DryRunTaskRealm string `protobuf:"bytes,12,opt,name=dry_run_task_realm,json=dryRunTaskRealm,proto3" json:"dry_run_task_realm,omitempty"`

}

Properties of a single pool or a bunch of identically configured pools.

In particular contains authorization configuration.

func (*Pool) Descriptor

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

Deprecated: Use Pool.ProtoReflect.Descriptor instead.

func (*Pool) GetAllowedServiceAccount

func (x *Pool) GetAllowedServiceAccount() []string

func (*Pool) GetAllowedServiceAccountGroup

func (x *Pool) GetAllowedServiceAccountGroup() []string

func (*Pool) GetBotMonitoring

func (x *Pool) GetBotMonitoring() string

func (*Pool) GetDryRunTaskRealm

func (x *Pool) GetDryRunTaskRealm() string

func (*Pool) GetEnforcedRealmPermissions

func (x *Pool) GetEnforcedRealmPermissions() []RealmPermission

func (*Pool) GetExternalSchedulers

func (x *Pool) GetExternalSchedulers() []*ExternalSchedulerConfig

func (*Pool) GetName

func (x *Pool) GetName() []string

func (*Pool) GetOwners

func (x *Pool) GetOwners() []string

func (*Pool) GetRealm

func (x *Pool) GetRealm() string

func (*Pool) GetSchedulers

func (x *Pool) GetSchedulers() *Schedulers

func (*Pool) GetTaskDeploymentScheme

func (m *Pool) GetTaskDeploymentScheme() isPool_TaskDeploymentScheme

func (*Pool) GetTaskTemplateDeployment

func (x *Pool) GetTaskTemplateDeployment() string

func (*Pool) GetTaskTemplateDeploymentInline

func (x *Pool) GetTaskTemplateDeploymentInline() *TaskTemplateDeployment

func (*Pool) ProtoMessage

func (*Pool) ProtoMessage()

func (*Pool) ProtoReflect

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

func (*Pool) Reset

func (x *Pool) Reset()

func (*Pool) String

func (x *Pool) String() string

type Pool_TaskTemplateDeployment

type Pool_TaskTemplateDeployment struct {
	// Most Pools will include a task_template_deployment by name.
	TaskTemplateDeployment string `protobuf:"bytes,6,opt,name=task_template_deployment,json=taskTemplateDeployment,proto3,oneof"`
}

type Pool_TaskTemplateDeploymentInline

type Pool_TaskTemplateDeploymentInline struct {
	// However, pools which substantially differ from other ones can define an
	// entire deployment inline without putting it in the shared namespace.
	//
	// The name fields in this deployment and any embedded task_templates must
	// not be specified.
	TaskTemplateDeploymentInline *TaskTemplateDeployment `protobuf:"bytes,7,opt,name=task_template_deployment_inline,json=taskTemplateDeploymentInline,proto3,oneof"`
}

type PoolsCfg

type PoolsCfg struct {
	Pool []*Pool `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool,omitempty"`

	DefaultExternalServices *ExternalServices "" /* 132 byte string literal not displayed */

	TaskTemplate []*TaskTemplate `protobuf:"bytes,3,rep,name=task_template,json=taskTemplate,proto3" json:"task_template,omitempty"`

	TaskTemplateDeployment []*TaskTemplateDeployment "" /* 129 byte string literal not displayed */

	BotMonitoring []*BotMonitoring `protobuf:"bytes,5,rep,name=bot_monitoring,json=botMonitoring,proto3" json:"bot_monitoring,omitempty"`

}

Schema for pools.cfg service config file in luci-config.

It defined a set of Pool objects, each one corresponding to a single Swarming pool dimension. Each Swarming task resided in some pool, and each Swarming bot belongs to at least one pool.

Pools are used to isolate groups of tasks/bots from each other for security and capacity reasons. Two different pools should not interfere with each other at all (unless explicitly configured to share bots or accounts).

func (*PoolsCfg) Descriptor

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

Deprecated: Use PoolsCfg.ProtoReflect.Descriptor instead.

func (*PoolsCfg) GetBotMonitoring

func (x *PoolsCfg) GetBotMonitoring() []*BotMonitoring

func (*PoolsCfg) GetDefaultExternalServices

func (x *PoolsCfg) GetDefaultExternalServices() *ExternalServices

func (*PoolsCfg) GetPool

func (x *PoolsCfg) GetPool() []*Pool

func (*PoolsCfg) GetTaskTemplate

func (x *PoolsCfg) GetTaskTemplate() []*TaskTemplate

func (*PoolsCfg) GetTaskTemplateDeployment

func (x *PoolsCfg) GetTaskTemplateDeployment() []*TaskTemplateDeployment

func (*PoolsCfg) ProtoMessage

func (*PoolsCfg) ProtoMessage()

func (*PoolsCfg) ProtoReflect

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

func (*PoolsCfg) Reset

func (x *PoolsCfg) Reset()

func (*PoolsCfg) String

func (x *PoolsCfg) String() string

type RealmPermission

type RealmPermission int32

Realm permissions used in Swarming. The enums are converted to string names using get_permission_name in server/realms.py NEXT_ID: 12

const (
	RealmPermission_REALM_PERMISSION_UNSPECIFIED RealmPermission = 0
	// Permission 'swarming.pools.createTask'
	// This is required to create a task in the pool.
	// It will be checked at the new task API.
	RealmPermission_REALM_PERMISSION_POOLS_CREATE_TASK RealmPermission = 1
	// Permission 'swarming.pools.listTasks'
	// This is required to list/count tasks in the pool.
	// It will be checked at tasks list/count APIs.
	RealmPermission_REALM_PERMISSION_POOLS_LIST_TASKS RealmPermission = 4
	// Permission 'swarming.pools.cancelTask'
	// This is required to cancel a task in the pool.
	// It will be checked at task cancel APIs.
	RealmPermission_REALM_PERMISSION_POOLS_CANCEL_TASK RealmPermission = 5
	// Permission 'swarming.pools.createBot'
	// This is required to create a bot in the pool.
	// It will be checked at bot bootstrap, bot code APIs.
	RealmPermission_REALM_PERMISSION_POOLS_CREATE_BOT RealmPermission = 6
	// Permission 'swarming.pools.listBots'
	// This is required to list/count bots in the pool.
	// It will be checked at bots list/count APIs.
	RealmPermission_REALM_PERMISSION_POOLS_LIST_BOTS RealmPermission = 7
	// Permission 'swarming.pools.terminateBot'
	// This is required to terminate a bot in the pool.
	// It will be checked at bot terminate API.
	RealmPermission_REALM_PERMISSION_POOLS_TERMINATE_BOT RealmPermission = 8
	// Permission 'swarming.pools.deleteBot'
	// This is required to delete a bot in the pool.
	// It will be checked at bot delete API.
	RealmPermission_REALM_PERMISSION_POOLS_DELETE_BOT RealmPermission = 9
	// Permission 'swarming.tasks.createInRealm'
	// This is required to create a task in the realm.
	// It will be checked at the new task API.
	RealmPermission_REALM_PERMISSION_TASKS_CREATE_IN_REALM RealmPermission = 2
	// Permission 'swarming.tasks.actAs'
	// This is required to use a task service account in the realm.
	// It will be checked at the new task API.
	RealmPermission_REALM_PERMISSION_TASKS_ACT_AS RealmPermission = 3
	// Permission 'swarming.tasks.get'
	// This is required to get task request, result, outputs.
	// It will be checked at task request, result, stdout GET APIs.
	RealmPermission_REALM_PERMISSION_TASKS_GET RealmPermission = 10
	// Permission 'swarming.tasks.cancel'
	// This is required to cancel a task.
	// It will be checked at task cancel API.
	RealmPermission_REALM_PERMISSION_TASKS_CANCEL RealmPermission = 11
)

func (RealmPermission) Descriptor

func (RealmPermission) Descriptor() protoreflect.EnumDescriptor

func (RealmPermission) Enum

func (x RealmPermission) Enum() *RealmPermission

func (RealmPermission) EnumDescriptor

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

Deprecated: Use RealmPermission.Descriptor instead.

func (RealmPermission) Number

func (x RealmPermission) Number() protoreflect.EnumNumber

func (RealmPermission) String

func (x RealmPermission) String() string

func (RealmPermission) Type

func (RealmPermission) Type() protoreflect.EnumType

type ResultDBSettings

type ResultDBSettings struct {

	// URL of the ResultDB server to use.
	// Must start with "https://" or "http://",
	// e.g. "https://results.api.cr.dev".
	Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// contains filtered or unexported fields
}

Settings for Swarming-ResultDB integration.

func (*ResultDBSettings) Descriptor

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

Deprecated: Use ResultDBSettings.ProtoReflect.Descriptor instead.

func (*ResultDBSettings) GetServer

func (x *ResultDBSettings) GetServer() string

func (*ResultDBSettings) ProtoMessage

func (*ResultDBSettings) ProtoMessage()

func (*ResultDBSettings) ProtoReflect

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

func (*ResultDBSettings) Reset

func (x *ResultDBSettings) Reset()

func (*ResultDBSettings) String

func (x *ResultDBSettings) String() string

type Schedulers

type Schedulers struct {

	// Emails of individual end-users.
	//
	// Useful to avoid creating one-person groups.
	User []string `protobuf:"bytes,1,rep,name=user,proto3" json:"user,omitempty"`
	// List of groups with end-users.
	Group []string `protobuf:"bytes,2,rep,name=group,proto3" json:"group,omitempty"`
	// See TrustedDelegation comment.
	TrustedDelegation []*TrustedDelegation `protobuf:"bytes,3,rep,name=trusted_delegation,json=trustedDelegation,proto3" json:"trusted_delegation,omitempty"`
	// contains filtered or unexported fields
}

Defines who can schedule tasks in a pool.

func (*Schedulers) Descriptor

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

Deprecated: Use Schedulers.ProtoReflect.Descriptor instead.

func (*Schedulers) GetGroup

func (x *Schedulers) GetGroup() []string

func (*Schedulers) GetTrustedDelegation

func (x *Schedulers) GetTrustedDelegation() []*TrustedDelegation

func (*Schedulers) GetUser

func (x *Schedulers) GetUser() []string

func (*Schedulers) ProtoMessage

func (*Schedulers) ProtoMessage()

func (*Schedulers) ProtoReflect

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

func (*Schedulers) Reset

func (x *Schedulers) Reset()

func (*Schedulers) String

func (x *Schedulers) String() string

type SettingsCfg

type SettingsCfg struct {
	GoogleAnalytics string `protobuf:"bytes,1,opt,name=google_analytics,json=googleAnalytics,proto3" json:"google_analytics,omitempty"`

	ReusableTaskAgeSecs int32 `protobuf:"varint,2,opt,name=reusable_task_age_secs,json=reusableTaskAgeSecs,proto3" json:"reusable_task_age_secs,omitempty"`

	BotDeathTimeoutSecs int32 `protobuf:"varint,3,opt,name=bot_death_timeout_secs,json=botDeathTimeoutSecs,proto3" json:"bot_death_timeout_secs,omitempty"`

	EnableTsMonitoring bool `protobuf:"varint,4,opt,name=enable_ts_monitoring,json=enableTsMonitoring,proto3" json:"enable_ts_monitoring,omitempty"`

	Isolate *IsolateSettings `protobuf:"bytes,5,opt,name=isolate,proto3" json:"isolate,omitempty"`

	Cipd *CipdSettings `protobuf:"bytes,6,opt,name=cipd,proto3" json:"cipd,omitempty"`

	ForceBotsToSleepAndNotRunTask bool "" /* 161 byte string literal not displayed */

	UiClientId string `protobuf:"bytes,9,opt,name=ui_client_id,json=uiClientId,proto3" json:"ui_client_id,omitempty"`

	DisplayServerUrlTemplate string "" /* 138 byte string literal not displayed */

	MaxBotSleepTime int32 `protobuf:"varint,12,opt,name=max_bot_sleep_time,json=maxBotSleepTime,proto3" json:"max_bot_sleep_time,omitempty"`

	Auth *AuthSettings `protobuf:"bytes,13,opt,name=auth,proto3" json:"auth,omitempty"`

	BotIsolateGrpcProxy string `protobuf:"bytes,14,opt,name=bot_isolate_grpc_proxy,json=botIsolateGrpcProxy,proto3" json:"bot_isolate_grpc_proxy,omitempty"`

	BotSwarmingGrpcProxy string `protobuf:"bytes,15,opt,name=bot_swarming_grpc_proxy,json=botSwarmingGrpcProxy,proto3" json:"bot_swarming_grpc_proxy,omitempty"`

	ExtraChildSrcCspUrl []string `protobuf:"bytes,16,rep,name=extra_child_src_csp_url,json=extraChildSrcCspUrl,proto3" json:"extra_child_src_csp_url,omitempty"`

	UseLifo bool `protobuf:"varint,17,opt,name=use_lifo,json=useLifo,proto3" json:"use_lifo,omitempty"`

	EnableBatchEsNotifications bool "" /* 145 byte string literal not displayed */

	Resultdb *ResultDBSettings `protobuf:"bytes,19,opt,name=resultdb,proto3" json:"resultdb,omitempty"`

}

Schema for settings.cfg service config file in luci-config.

func (*SettingsCfg) Descriptor

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

Deprecated: Use SettingsCfg.ProtoReflect.Descriptor instead.

func (*SettingsCfg) GetAuth

func (x *SettingsCfg) GetAuth() *AuthSettings

func (*SettingsCfg) GetBotDeathTimeoutSecs

func (x *SettingsCfg) GetBotDeathTimeoutSecs() int32

func (*SettingsCfg) GetBotIsolateGrpcProxy

func (x *SettingsCfg) GetBotIsolateGrpcProxy() string

func (*SettingsCfg) GetBotSwarmingGrpcProxy

func (x *SettingsCfg) GetBotSwarmingGrpcProxy() string

func (*SettingsCfg) GetCipd

func (x *SettingsCfg) GetCipd() *CipdSettings

func (*SettingsCfg) GetDisplayServerUrlTemplate

func (x *SettingsCfg) GetDisplayServerUrlTemplate() string

func (*SettingsCfg) GetEnableBatchEsNotifications

func (x *SettingsCfg) GetEnableBatchEsNotifications() bool

func (*SettingsCfg) GetEnableTsMonitoring

func (x *SettingsCfg) GetEnableTsMonitoring() bool

func (*SettingsCfg) GetExtraChildSrcCspUrl

func (x *SettingsCfg) GetExtraChildSrcCspUrl() []string

func (*SettingsCfg) GetForceBotsToSleepAndNotRunTask

func (x *SettingsCfg) GetForceBotsToSleepAndNotRunTask() bool

func (*SettingsCfg) GetGoogleAnalytics

func (x *SettingsCfg) GetGoogleAnalytics() string

func (*SettingsCfg) GetIsolate

func (x *SettingsCfg) GetIsolate() *IsolateSettings

func (*SettingsCfg) GetMaxBotSleepTime

func (x *SettingsCfg) GetMaxBotSleepTime() int32

func (*SettingsCfg) GetResultdb

func (x *SettingsCfg) GetResultdb() *ResultDBSettings

func (*SettingsCfg) GetReusableTaskAgeSecs

func (x *SettingsCfg) GetReusableTaskAgeSecs() int32

func (*SettingsCfg) GetUiClientId

func (x *SettingsCfg) GetUiClientId() string

func (*SettingsCfg) GetUseLifo

func (x *SettingsCfg) GetUseLifo() bool

func (*SettingsCfg) ProtoMessage

func (*SettingsCfg) ProtoMessage()

func (*SettingsCfg) ProtoReflect

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

func (*SettingsCfg) Reset

func (x *SettingsCfg) Reset()

func (*SettingsCfg) String

func (x *SettingsCfg) String() string

type TaskTemplate

type TaskTemplate struct {

	// This gives the template a name for the 'include' field below. This only
	// applies to templates defined within the PoolsCfg message (i.e. the
	// top-level message), not to templates inlined into a TaskTemplateDeployment.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Includes properties from the named other TaskTemplate. This can only
	// include templates defined in the top-level PoolsCfg message.
	Include []string `protobuf:"bytes,2,rep,name=include,proto3" json:"include,omitempty"`
	// CacheEntries are keyed by `name`, and `path` is overridden wholesale.
	//
	// It is illegal to have any TaskTemplate with multiple cache entries mapping
	// to the same path. It is illegal to have any cache paths overlap with cipd
	// package paths.
	Cache []*TaskTemplate_CacheEntry `protobuf:"bytes,3,rep,name=cache,proto3" json:"cache,omitempty"`
	// CipdPackages are keyed by (path, name), and `version` is overridden
	// wholesale.
	//
	// It is illegal to have any cipd paths overlap with cache entry paths.
	CipdPackage []*TaskTemplate_CipdPackage `protobuf:"bytes,4,rep,name=cipd_package,json=cipdPackage,proto3" json:"cipd_package,omitempty"`
	// Env vars are keyed by the `var` field,
	//
	// `value` fields overwrite included values.
	// `soft` fields overwrite included values.
	// `prefix` fields append to included values. For example, Doing:
	//
	//     {name: "1" env { var: "PATH" prefix: "a" }}
	//     {name: "2" env { var: "PATH" prefix: "b" }}
	//     {name: "3" include: "1" include: "2" }
	//
	//  Is equivalent to:
	//
	//     {name: "3" env { var: "PATH" prefix: "a" prefix: "b" }}
	//
	//
	// Full Example:
	//
	//   env {
	//     var: "PATH"
	//     value: "/disable_system_path"
	//     prefix: "a"
	//     prefix: "b"
	//     prefix: "c"
	//     soft: true
	//   }
	//   env {
	//     var: "OTHER"
	//     value: "1"
	//   }
	//   env {
	//     var: "PYTHONPATH"
	//     prefix: "a"
	//   }
	//
	// Results in, essentially:
	//
	//   $PATH=/path/to/a:/path/to/b:/path/to/c:/disable_system_path
	//   $OTHER=1
	//   $PYTHONPATH=/path/to/a:$PYTHONPATH
	Env []*TaskTemplate_Env `protobuf:"bytes,5,rep,name=env,proto3" json:"env,omitempty"`
	// contains filtered or unexported fields
}

A TaskTemplate describes a set of properties (caches, CIPD packages and envvars) which apply to tasks created within a swarming pool.

TaskTemplates may either be defined inline inside of a TaskTemplateDeployment, or in "shared namespace" of the PoolsCfg.task_template field.

TaskTemplates may also include other TaskTemplates by name from the "shared namespace" in PoolsCfg. Swarming calculates the final value for a given TaskTemplate by applying all of its `include` fields depth-first, and then by applying the properties in the body of the TaskTemplate. Includes may never be repeated, including transitively. This means that "diamond shaped dependencies" are forbidden (i.e. A<-B<-D and A<-C<-D would be forbidden because `A` is included in `D` twice (via both C and B)).

func (*TaskTemplate) Descriptor

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

Deprecated: Use TaskTemplate.ProtoReflect.Descriptor instead.

func (*TaskTemplate) GetCache

func (x *TaskTemplate) GetCache() []*TaskTemplate_CacheEntry

func (*TaskTemplate) GetCipdPackage

func (x *TaskTemplate) GetCipdPackage() []*TaskTemplate_CipdPackage

func (*TaskTemplate) GetEnv

func (x *TaskTemplate) GetEnv() []*TaskTemplate_Env

func (*TaskTemplate) GetInclude

func (x *TaskTemplate) GetInclude() []string

func (*TaskTemplate) GetName

func (x *TaskTemplate) GetName() string

func (*TaskTemplate) ProtoMessage

func (*TaskTemplate) ProtoMessage()

func (*TaskTemplate) ProtoReflect

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

func (*TaskTemplate) Reset

func (x *TaskTemplate) Reset()

func (*TaskTemplate) String

func (x *TaskTemplate) String() string

type TaskTemplateDeployment

type TaskTemplateDeployment struct {

	// This gives the deployment a name for the 'task_template_deployment' field
	// in PoolCfg.
	//
	// When this TaskTemplateDeployment is inlined into another message (e.g.
	// `TaskTemplate.task_template_deployment_inline`), the name field must not be
	// specified.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Most Deployments will have a TaskTemplate with just a single include
	// directive.
	//
	// However, pools which substantially differ from other ones could define an
	// entire template inline without being forced to put it in the shared
	// namespace.
	//
	// The name field in this template (and the canary template) must not be
	// specified.
	Prod *TaskTemplate `protobuf:"bytes,2,opt,name=prod,proto3" json:"prod,omitempty"`
	// The canary template can be defined like the `prod` field above. If this is
	// defined and `canary_chance` is greater than 0, then this template will be
	// selected instead of `prod`.
	Canary *TaskTemplate `protobuf:"bytes,3,opt,name=canary,proto3" json:"canary,omitempty"`
	// range [0, 9999] where each tick corresponds to %0.01 chance of selecting
	// the template. Exactly 0 means 'canary is disabled', meaning that tasks
	// in this pool will always get the prod template.
	//
	// Examples:
	//   * 1     ".01% chance of picking canary"
	//   * 10    ".1% chance of picking canary"
	//   * 100   "1% chance of picking canary"
	//   * 1000  "10% chance of picking canary"
	//   * 5000  "50% chance of picking canary"
	//   * 7500  "75% chance of picking canary"
	//   * 9999  "99.99% chance of picking canary"
	CanaryChance int32 `protobuf:"varint,4,opt,name=canary_chance,json=canaryChance,proto3" json:"canary_chance,omitempty"`
	// contains filtered or unexported fields
}

This is a tuple of (prod template, canary template, canary_chance), so that it can be referenced from multiple pools simultaneously as a single unit.

func (*TaskTemplateDeployment) Descriptor

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

Deprecated: Use TaskTemplateDeployment.ProtoReflect.Descriptor instead.

func (*TaskTemplateDeployment) GetCanary

func (x *TaskTemplateDeployment) GetCanary() *TaskTemplate

func (*TaskTemplateDeployment) GetCanaryChance

func (x *TaskTemplateDeployment) GetCanaryChance() int32

func (*TaskTemplateDeployment) GetName

func (x *TaskTemplateDeployment) GetName() string

func (*TaskTemplateDeployment) GetProd

func (x *TaskTemplateDeployment) GetProd() *TaskTemplate

func (*TaskTemplateDeployment) ProtoMessage

func (*TaskTemplateDeployment) ProtoMessage()

func (*TaskTemplateDeployment) ProtoReflect

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

func (*TaskTemplateDeployment) Reset

func (x *TaskTemplateDeployment) Reset()

func (*TaskTemplateDeployment) String

func (x *TaskTemplateDeployment) String() string

type TaskTemplate_CacheEntry

type TaskTemplate_CacheEntry struct {

	// The name of the cache (required).
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The path relative to the task root to mount the cache (required).
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskTemplate_CacheEntry) Descriptor

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

Deprecated: Use TaskTemplate_CacheEntry.ProtoReflect.Descriptor instead.

func (*TaskTemplate_CacheEntry) GetName

func (x *TaskTemplate_CacheEntry) GetName() string

func (*TaskTemplate_CacheEntry) GetPath

func (x *TaskTemplate_CacheEntry) GetPath() string

func (*TaskTemplate_CacheEntry) ProtoMessage

func (*TaskTemplate_CacheEntry) ProtoMessage()

func (*TaskTemplate_CacheEntry) ProtoReflect

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

func (*TaskTemplate_CacheEntry) Reset

func (x *TaskTemplate_CacheEntry) Reset()

func (*TaskTemplate_CacheEntry) String

func (x *TaskTemplate_CacheEntry) String() string

type TaskTemplate_CipdPackage

type TaskTemplate_CipdPackage struct {

	// The relative to the task root to unpack the CIPD package. A blank value
	// is permitted and means 'the root directory of the task'.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// The CIPD package name template to use (required).
	Pkg string `protobuf:"bytes,2,opt,name=pkg,proto3" json:"pkg,omitempty"`
	// The version of the CIPD package to use (required).
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskTemplate_CipdPackage) Descriptor

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

Deprecated: Use TaskTemplate_CipdPackage.ProtoReflect.Descriptor instead.

func (*TaskTemplate_CipdPackage) GetPath

func (x *TaskTemplate_CipdPackage) GetPath() string

func (*TaskTemplate_CipdPackage) GetPkg

func (x *TaskTemplate_CipdPackage) GetPkg() string

func (*TaskTemplate_CipdPackage) GetVersion

func (x *TaskTemplate_CipdPackage) GetVersion() string

func (*TaskTemplate_CipdPackage) ProtoMessage

func (*TaskTemplate_CipdPackage) ProtoMessage()

func (*TaskTemplate_CipdPackage) ProtoReflect

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

func (*TaskTemplate_CipdPackage) Reset

func (x *TaskTemplate_CipdPackage) Reset()

func (*TaskTemplate_CipdPackage) String

func (x *TaskTemplate_CipdPackage) String() string

type TaskTemplate_Env

type TaskTemplate_Env struct {

	// The envvar you want to set (required).
	Var string `protobuf:"bytes,1,opt,name=var,proto3" json:"var,omitempty"`
	// The envvar value you want to set. Any prefixes are prepended to this
	// value. If the value is unset, prefixes will be prepended to the bot's
	// current value of this envvar (see examples)
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// Paths relative to the task root to prepend to this envvar on the bot.
	// These will be resolved to absolute paths on the bot.
	Prefix []string `protobuf:"bytes,3,rep,name=prefix,proto3" json:"prefix,omitempty"`
	// If true, tasks setting this EnvVar can overwrite the value and/or the
	// prefix. Otherwise, tasks will not be permitted to to set any env var or
	// env_prefix for this var.
	//
	// This should be True for envvars you expect tasks to extend, like $PATH.
	// Note that this only affects envvar manipulation at the Swarming API
	// level; once the task is running it can (of course) manipulate the env
	// however it wants.
	Soft bool `protobuf:"varint,4,opt,name=soft,proto3" json:"soft,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskTemplate_Env) Descriptor

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

Deprecated: Use TaskTemplate_Env.ProtoReflect.Descriptor instead.

func (*TaskTemplate_Env) GetPrefix

func (x *TaskTemplate_Env) GetPrefix() []string

func (*TaskTemplate_Env) GetSoft

func (x *TaskTemplate_Env) GetSoft() bool

func (*TaskTemplate_Env) GetValue

func (x *TaskTemplate_Env) GetValue() string

func (*TaskTemplate_Env) GetVar

func (x *TaskTemplate_Env) GetVar() string

func (*TaskTemplate_Env) ProtoMessage

func (*TaskTemplate_Env) ProtoMessage()

func (*TaskTemplate_Env) ProtoReflect

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

func (*TaskTemplate_Env) Reset

func (x *TaskTemplate_Env) Reset()

func (*TaskTemplate_Env) String

func (x *TaskTemplate_Env) String() string

type TrustedDelegation

type TrustedDelegation struct {

	// Email of a trusted delegatee (the one who's minting the delegation token).
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	// A list of tags to expected in the delegation token to allow the usage of
	// a pool.
	//
	// Presence of any of the specified tags are enough. The format of these tags
	// generally depends on what service is doing the delegation.
	RequireAnyOf *TrustedDelegation_TagList `protobuf:"bytes,2,opt,name=require_any_of,json=requireAnyOf,proto3" json:"require_any_of,omitempty"`
	// contains filtered or unexported fields
}

Defines a delegatee trusted to make authorization decisions for who can use a pool.

This is based on LUCI delegation protocol. Imagine an end user U calling Swarming through an intermediary service X. In this case U is a delegator and X is a delegatee. When X calls Swarming, it makes an RPC to the token server to make a delegation token that says "<X can call Swarming on behalf of U>".

This token is then sent to the Swarming with the RPC. Swarming sees that the direct peer it's talking to is X, but the call should be performed under the authority of U.

We extend this to also allow X make authorization decisions about whether U can use particular Swarming resource or not. The result of this decision is encoded in the delegation token as a set of "key:value" tags. Swarming then can treat presence of such tags as a signal that the particular call is allowed.

In this scenario we totally trust X to make the correct decision.

func (*TrustedDelegation) Descriptor

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

Deprecated: Use TrustedDelegation.ProtoReflect.Descriptor instead.

func (*TrustedDelegation) GetPeerId

func (x *TrustedDelegation) GetPeerId() string

func (*TrustedDelegation) GetRequireAnyOf

func (x *TrustedDelegation) GetRequireAnyOf() *TrustedDelegation_TagList

func (*TrustedDelegation) ProtoMessage

func (*TrustedDelegation) ProtoMessage()

func (*TrustedDelegation) ProtoReflect

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

func (*TrustedDelegation) Reset

func (x *TrustedDelegation) Reset()

func (*TrustedDelegation) String

func (x *TrustedDelegation) String() string

type TrustedDelegation_TagList

type TrustedDelegation_TagList struct {
	Tag []string `protobuf:"bytes,1,rep,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

func (*TrustedDelegation_TagList) Descriptor

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

Deprecated: Use TrustedDelegation_TagList.ProtoReflect.Descriptor instead.

func (*TrustedDelegation_TagList) GetTag

func (x *TrustedDelegation_TagList) GetTag() []string

func (*TrustedDelegation_TagList) ProtoMessage

func (*TrustedDelegation_TagList) ProtoMessage()

func (*TrustedDelegation_TagList) ProtoReflect

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

func (*TrustedDelegation_TagList) Reset

func (x *TrustedDelegation_TagList) Reset()

func (*TrustedDelegation_TagList) String

func (x *TrustedDelegation_TagList) String() string

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier