Documentation ¶
Overview ¶
Package swarmingV1 is a generated protocol buffer package.
It is generated from these files:
github.com/luci/luci-go/dm/api/distributor/swarming/v1/cipd.proto github.com/luci/luci-go/dm/api/distributor/swarming/v1/config.proto github.com/luci/luci-go/dm/api/distributor/swarming/v1/isolate_ref.proto github.com/luci/luci-go/dm/api/distributor/swarming/v1/params.proto github.com/luci/luci-go/dm/api/distributor/swarming/v1/result.proto
It has these top-level messages:
CipdPackage CipdSpec Config IsolatedRef Parameters Result
Index ¶
- Constants
- type CipdPackage
- func (*CipdPackage) Descriptor() ([]byte, []int)
- func (m *CipdPackage) GetName() string
- func (m *CipdPackage) GetVersion() string
- func (p *CipdPackage) Normalize() error
- func (*CipdPackage) ProtoMessage()
- func (m *CipdPackage) Reset()
- func (m *CipdPackage) String() string
- func (c *CipdPackage) ToCipdPackage() *swarm.SwarmingRpcsCipdPackage
- type CipdSpec
- func (*CipdSpec) Descriptor() ([]byte, []int)
- func (m *CipdSpec) GetByPath() map[string]*CipdSpec_CipdPackages
- func (m *CipdSpec) GetClient() *CipdPackage
- func (m *CipdSpec) GetServer() string
- func (c *CipdSpec) Normalize() error
- func (*CipdSpec) ProtoMessage()
- func (m *CipdSpec) Reset()
- func (m *CipdSpec) String() string
- func (c *CipdSpec) ToCipdInput() *swarm.SwarmingRpcsCipdInput
- type CipdSpec_CipdPackages
- type Config
- type Config_Isolate
- func (*Config_Isolate) Descriptor() ([]byte, []int)
- func (m *Config_Isolate) GetExpiration() *google_protobuf.Duration
- func (m *Config_Isolate) GetUrl() string
- func (i *Config_Isolate) Normalize() (err error)
- func (*Config_Isolate) ProtoMessage()
- func (m *Config_Isolate) Reset()
- func (m *Config_Isolate) String() string
- type Config_Swarming
- type IsolatedRef
- type Parameters
- func (*Parameters) Descriptor() ([]byte, []int)
- func (m *Parameters) GetJob() *Parameters_Job
- func (m *Parameters) GetMeta() *Parameters_Meta
- func (m *Parameters) GetScheduling() *Parameters_Scheduling
- func (p *Parameters) Normalize() (err error)
- func (*Parameters) ProtoMessage()
- func (m *Parameters) Reset()
- func (m *Parameters) String() string
- type Parameters_Job
- func (*Parameters_Job) Descriptor() ([]byte, []int)
- func (m *Parameters_Job) GetCommand() []string
- func (m *Parameters_Job) GetEnv() map[string]string
- func (m *Parameters_Job) GetInputs() *Parameters_Job_Inputs
- func (j *Parameters_Job) Normalize() (err error)
- func (*Parameters_Job) ProtoMessage()
- func (m *Parameters_Job) Reset()
- func (m *Parameters_Job) String() string
- type Parameters_Job_Inputs
- func (*Parameters_Job_Inputs) Descriptor() ([]byte, []int)
- func (m *Parameters_Job_Inputs) GetCipd() *CipdSpec
- func (m *Parameters_Job_Inputs) GetIsolated() []*IsolatedRef
- func (i *Parameters_Job_Inputs) Normalize() (err error)
- func (*Parameters_Job_Inputs) ProtoMessage()
- func (m *Parameters_Job_Inputs) Reset()
- func (m *Parameters_Job_Inputs) String() string
- type Parameters_Meta
- type Parameters_Scheduling
- func (*Parameters_Scheduling) Descriptor() ([]byte, []int)
- func (m *Parameters_Scheduling) GetDimensions() map[string]string
- func (m *Parameters_Scheduling) GetIoTimeout() *google_protobuf.Duration
- func (m *Parameters_Scheduling) GetPriority() uint32
- func (m *Parameters_Scheduling) GetSnapshotDimensions() []string
- func (s *Parameters_Scheduling) Normalize() (err error)
- func (*Parameters_Scheduling) ProtoMessage()
- func (m *Parameters_Scheduling) Reset()
- func (m *Parameters_Scheduling) String() string
- type Result
- func (*Result) Descriptor() ([]byte, []int)
- func (m *Result) GetCipdPins() *CipdSpec
- func (m *Result) GetExitCode() int64
- func (m *Result) GetIsolatedOutdir() *IsolatedRef
- func (m *Result) GetSnapshotDimensions() map[string]string
- func (*Result) ProtoMessage()
- func (m *Result) Reset()
- func (m *Result) String() string
Constants ¶
const DefaultSwarmingPriority = 100
DefaultSwarmingPriority is the priority used if Parameters.scheduling.priority == 0.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CipdPackage ¶
type CipdPackage struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` }
func (*CipdPackage) Descriptor ¶
func (*CipdPackage) Descriptor() ([]byte, []int)
func (*CipdPackage) GetName ¶
func (m *CipdPackage) GetName() string
func (*CipdPackage) GetVersion ¶
func (m *CipdPackage) GetVersion() string
func (*CipdPackage) Normalize ¶
func (p *CipdPackage) Normalize() error
Normalize normalizes and checks for input violations.
func (*CipdPackage) ProtoMessage ¶
func (*CipdPackage) ProtoMessage()
func (*CipdPackage) Reset ¶
func (m *CipdPackage) Reset()
func (*CipdPackage) String ¶
func (m *CipdPackage) String() string
func (*CipdPackage) ToCipdPackage ¶
func (c *CipdPackage) ToCipdPackage() *swarm.SwarmingRpcsCipdPackage
ToCipdPackage converts this to a swarming api SwarmingRpcsCipdPackage.
type CipdSpec ¶
type CipdSpec struct { // Server to use for cipd packages. Required (though it may be specified // by the quest's designated distributor config). This must be // scheme://<hostname>, e.g. "https://example.appspot.com". The only // supported schemes are http and https. Server string `protobuf:"bytes,1,opt,name=server" json:"server,omitempty"` // Specifies the CIPD package to use for the job to obtain the actual CIPD // client binary. You usually want to omit this. Client *CipdPackage `protobuf:"bytes,2,opt,name=client" json:"client,omitempty"` // A mapping from path-to-install to a list of cipd packages to install at // that location. To install packages in the root of the job, use the path // ”. ByPath map[string]*CipdSpec_CipdPackages `` /* 146-byte string literal not displayed */ }
func (*CipdSpec) GetByPath ¶
func (m *CipdSpec) GetByPath() map[string]*CipdSpec_CipdPackages
func (*CipdSpec) GetClient ¶
func (m *CipdSpec) GetClient() *CipdPackage
func (*CipdSpec) Normalize ¶
Normalize normalizes and checks for input violations.
func (*CipdSpec) ToCipdInput ¶
func (c *CipdSpec) ToCipdInput() *swarm.SwarmingRpcsCipdInput
ToCipdInput converts this to a swarming api SwarmingRpcsCipdInput.
type CipdSpec_CipdPackages ¶
type CipdSpec_CipdPackages struct {
Pkg []*CipdPackage `protobuf:"bytes,1,rep,name=pkg" json:"pkg,omitempty"`
}
func (*CipdSpec_CipdPackages) Descriptor ¶
func (*CipdSpec_CipdPackages) Descriptor() ([]byte, []int)
func (*CipdSpec_CipdPackages) GetPkg ¶
func (m *CipdSpec_CipdPackages) GetPkg() []*CipdPackage
func (*CipdSpec_CipdPackages) ProtoMessage ¶
func (*CipdSpec_CipdPackages) ProtoMessage()
func (*CipdSpec_CipdPackages) Reset ¶
func (m *CipdSpec_CipdPackages) Reset()
func (*CipdSpec_CipdPackages) String ¶
func (m *CipdSpec_CipdPackages) String() string
type Config ¶
type Config struct { Swarming *Config_Swarming `protobuf:"bytes,1,opt,name=swarming" json:"swarming,omitempty"` Isolate *Config_Isolate `protobuf:"bytes,2,opt,name=isolate" json:"isolate,omitempty"` }
func (*Config) GetIsolate ¶
func (m *Config) GetIsolate() *Config_Isolate
func (*Config) GetSwarming ¶
func (m *Config) GetSwarming() *Config_Swarming
func (*Config) Normalize ¶
Normalize normalizes and checks for input violations.
type Config_Isolate ¶
type Config_Isolate struct { // The host of the isolate service, e.g. isolateserver.appspot.com. Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"` // The default assumed expiration period for execution results. Expiration *google_protobuf.Duration `protobuf:"bytes,2,opt,name=expiration" json:"expiration,omitempty"` }
func (*Config_Isolate) Descriptor ¶
func (*Config_Isolate) Descriptor() ([]byte, []int)
func (*Config_Isolate) GetExpiration ¶
func (m *Config_Isolate) GetExpiration() *google_protobuf.Duration
func (*Config_Isolate) GetUrl ¶
func (m *Config_Isolate) GetUrl() string
func (*Config_Isolate) Normalize ¶
func (i *Config_Isolate) Normalize() (err error)
Normalize normalizes and checks for input violations.
func (*Config_Isolate) ProtoMessage ¶
func (*Config_Isolate) ProtoMessage()
func (*Config_Isolate) Reset ¶
func (m *Config_Isolate) Reset()
func (*Config_Isolate) String ¶
func (m *Config_Isolate) String() string
type Config_Swarming ¶
type Config_Swarming struct {
Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
}
func (*Config_Swarming) Descriptor ¶
func (*Config_Swarming) Descriptor() ([]byte, []int)
func (*Config_Swarming) GetUrl ¶
func (m *Config_Swarming) GetUrl() string
func (*Config_Swarming) Normalize ¶
func (s *Config_Swarming) Normalize() (err error)
Normalize normalizes and checks for input violations.
func (*Config_Swarming) ProtoMessage ¶
func (*Config_Swarming) ProtoMessage()
func (*Config_Swarming) Reset ¶
func (m *Config_Swarming) Reset()
func (*Config_Swarming) String ¶
func (m *Config_Swarming) String() string
type IsolatedRef ¶
type IsolatedRef struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Server string `protobuf:"bytes,2,opt,name=server" json:"server,omitempty"` }
func (*IsolatedRef) Descriptor ¶
func (*IsolatedRef) Descriptor() ([]byte, []int)
func (*IsolatedRef) GetId ¶
func (m *IsolatedRef) GetId() string
func (*IsolatedRef) GetServer ¶
func (m *IsolatedRef) GetServer() string
func (*IsolatedRef) ProtoMessage ¶
func (*IsolatedRef) ProtoMessage()
func (*IsolatedRef) Reset ¶
func (m *IsolatedRef) Reset()
func (*IsolatedRef) String ¶
func (m *IsolatedRef) String() string
type Parameters ¶
type Parameters struct { Scheduling *Parameters_Scheduling `protobuf:"bytes,1,opt,name=scheduling" json:"scheduling,omitempty"` Meta *Parameters_Meta `protobuf:"bytes,2,opt,name=meta" json:"meta,omitempty"` Job *Parameters_Job `protobuf:"bytes,3,opt,name=job" json:"job,omitempty"` }
Parameters represents the set of swarming parameters that the Swarming v1 distributor can interpret for use with a Swarming v1 compatible service.
func (*Parameters) Descriptor ¶
func (*Parameters) Descriptor() ([]byte, []int)
func (*Parameters) GetJob ¶
func (m *Parameters) GetJob() *Parameters_Job
func (*Parameters) GetMeta ¶
func (m *Parameters) GetMeta() *Parameters_Meta
func (*Parameters) GetScheduling ¶
func (m *Parameters) GetScheduling() *Parameters_Scheduling
func (*Parameters) Normalize ¶
func (p *Parameters) Normalize() (err error)
Normalize normalizes and checks for input violations.
func (*Parameters) ProtoMessage ¶
func (*Parameters) ProtoMessage()
func (*Parameters) Reset ¶
func (m *Parameters) Reset()
func (*Parameters) String ¶
func (m *Parameters) String() string
type Parameters_Job ¶
type Parameters_Job struct { Inputs *Parameters_Job_Inputs `protobuf:"bytes,1,opt,name=inputs" json:"inputs,omitempty"` // This is the "argv" to run with this job. This includes substitution // paramters defined by swarming's run_isolated.py script: // https://github.com/luci/luci-py/blob/master/client/run_isolated.py // // Additionally, DM provides the following substitutions: // ${DM.PREVIOUS.EXECUTION.STATE:PATH} - the path to a JSONPB encoding of // the swarming_v1.Result from the previous Execution of this Attempt. // ${DM.QUEST.DATA.DESC:PATH} - the path to the // dm.Quest.Data.Desc JSONPB for the quest that this execution is part // of. // ${DM.HOST} - the hostname to use to access DM's pRPC API. // // DM also provides a JSONPB encoded dm.Execution.Auth via the LUCI_CONTEXT // swarming.secret_bytes value. See: // https://github.com/luci/luci-py/blob/master/client/LUCI_CONTEXT.md // // Command MUST be specified; specifying a command in any of the isolated // inputs WILL NOT DO ANYTHING. Command []string `protobuf:"bytes,2,rep,name=command" json:"command,omitempty"` // Environment variables for the executions. Env map[string]string `` /* 126-byte string literal not displayed */ }
func (*Parameters_Job) Descriptor ¶
func (*Parameters_Job) Descriptor() ([]byte, []int)
func (*Parameters_Job) GetCommand ¶
func (m *Parameters_Job) GetCommand() []string
func (*Parameters_Job) GetEnv ¶
func (m *Parameters_Job) GetEnv() map[string]string
func (*Parameters_Job) GetInputs ¶
func (m *Parameters_Job) GetInputs() *Parameters_Job_Inputs
func (*Parameters_Job) Normalize ¶
func (j *Parameters_Job) Normalize() (err error)
Normalize normalizes and checks for input violations.
func (*Parameters_Job) ProtoMessage ¶
func (*Parameters_Job) ProtoMessage()
func (*Parameters_Job) Reset ¶
func (m *Parameters_Job) Reset()
func (*Parameters_Job) String ¶
func (m *Parameters_Job) String() string
type Parameters_Job_Inputs ¶
type Parameters_Job_Inputs struct { // 0 or more isolated IDs that will be 'included' together into the final // job .isolated sent to swarming. // // The "server" value must either be omitted, or equal the isolate server // defined by this distributor's config (the `isolate.host` field, // prepended with "https://"). Isolated []*IsolatedRef `protobuf:"bytes,1,rep,name=isolated" json:"isolated,omitempty"` // CIPD packages to use for the job. These specs may contain templated // parameters for package names or non-instance_ids for the package // versions. The first successful execution for each attempt will // resolve+snapshot all package names and versions. These package names // and versions will be used for all subsequent executions of that // attempt. Cipd *CipdSpec `protobuf:"bytes,2,opt,name=cipd" json:"cipd,omitempty"` }
func (*Parameters_Job_Inputs) Descriptor ¶
func (*Parameters_Job_Inputs) Descriptor() ([]byte, []int)
func (*Parameters_Job_Inputs) GetCipd ¶
func (m *Parameters_Job_Inputs) GetCipd() *CipdSpec
func (*Parameters_Job_Inputs) GetIsolated ¶
func (m *Parameters_Job_Inputs) GetIsolated() []*IsolatedRef
func (*Parameters_Job_Inputs) Normalize ¶
func (i *Parameters_Job_Inputs) Normalize() (err error)
Normalize normalizes and checks for input violations.
func (*Parameters_Job_Inputs) ProtoMessage ¶
func (*Parameters_Job_Inputs) ProtoMessage()
func (*Parameters_Job_Inputs) Reset ¶
func (m *Parameters_Job_Inputs) Reset()
func (*Parameters_Job_Inputs) String ¶
func (m *Parameters_Job_Inputs) String() string
type Parameters_Meta ¶
type Parameters_Meta struct { // The 'human readable' name prefix for Executions of this quest. DM will // automatically prepend this to the execution ID. So if this was "cool // job", the swarming task name would be // "cool job / <quest_ID>|<attempt>|<execution>" NamePrefix string `protobuf:"bytes,1,opt,name=name_prefix,json=namePrefix" json:"name_prefix,omitempty"` }
func (*Parameters_Meta) Descriptor ¶
func (*Parameters_Meta) Descriptor() ([]byte, []int)
func (*Parameters_Meta) GetNamePrefix ¶
func (m *Parameters_Meta) GetNamePrefix() string
func (*Parameters_Meta) Normalize ¶
func (m *Parameters_Meta) Normalize() (err error)
Normalize normalizes and checks for input violations.
func (*Parameters_Meta) ProtoMessage ¶
func (*Parameters_Meta) ProtoMessage()
func (*Parameters_Meta) Reset ¶
func (m *Parameters_Meta) Reset()
func (*Parameters_Meta) String ¶
func (m *Parameters_Meta) String() string
type Parameters_Scheduling ¶
type Parameters_Scheduling struct { // Priority adjusts the scheduling preference for Executions. The higher the // priority number, the longer it will take to schedule, and vice versa (ala // `nice`). // // A value of 0 (default) corresponds to a default priority (currently 100). // Other values correspond directly to the swarming task Priority. // // THIS MEANS THAT PRIORITY 0 IS NOT PERMITTED HERE! If you want 0, use // 1 instead. // // This must be <= 255. Priority uint32 `protobuf:"varint,1,opt,name=priority" json:"priority,omitempty"` // These specifiy the profile of the machine to use for Execuions of this // quest. These can indicate OS, number of cores, amount of ram, GPU type, // pool, etc. See the swarming service instance for available dimensions. Dimensions map[string]string `` /* 140-byte string literal not displayed */ // These dimensions will be snapshotted from the first execution of each // attempt, and will be subsequently re-used for all following executions of // that attempt. // // The most-specific value for these dimensions will be taken for tasks // where a given dimension has multiple values. SnapshotDimensions []string `protobuf:"bytes,3,rep,name=snapshot_dimensions,json=snapshotDimensions" json:"snapshot_dimensions,omitempty"` // This indicates the maximum amount of time that an Execution may run // without emitting IO on stdout/err. 0 means 'no timeout'. IoTimeout *google_protobuf.Duration `protobuf:"bytes,4,opt,name=io_timeout,json=ioTimeout" json:"io_timeout,omitempty"` }
These parameters affect how the Executions for this Quest are scheduled.
func (*Parameters_Scheduling) Descriptor ¶
func (*Parameters_Scheduling) Descriptor() ([]byte, []int)
func (*Parameters_Scheduling) GetDimensions ¶
func (m *Parameters_Scheduling) GetDimensions() map[string]string
func (*Parameters_Scheduling) GetIoTimeout ¶
func (m *Parameters_Scheduling) GetIoTimeout() *google_protobuf.Duration
func (*Parameters_Scheduling) GetPriority ¶
func (m *Parameters_Scheduling) GetPriority() uint32
func (*Parameters_Scheduling) GetSnapshotDimensions ¶
func (m *Parameters_Scheduling) GetSnapshotDimensions() []string
func (*Parameters_Scheduling) Normalize ¶
func (s *Parameters_Scheduling) Normalize() (err error)
Normalize normalizes and checks for input violations.
func (*Parameters_Scheduling) ProtoMessage ¶
func (*Parameters_Scheduling) ProtoMessage()
func (*Parameters_Scheduling) Reset ¶
func (m *Parameters_Scheduling) Reset()
func (*Parameters_Scheduling) String ¶
func (m *Parameters_Scheduling) String() string
type Result ¶
type Result struct { ExitCode int64 `protobuf:"varint,1,opt,name=exit_code,json=exitCode" json:"exit_code,omitempty"` // The isolated hash of the output directory IsolatedOutdir *IsolatedRef `protobuf:"bytes,2,opt,name=isolated_outdir,json=isolatedOutdir" json:"isolated_outdir,omitempty"` // The pinned cipd packages that this task actually used. CipdPins *CipdSpec `protobuf:"bytes,3,opt,name=cipd_pins,json=cipdPins" json:"cipd_pins,omitempty"` // The captured snapshot dimensions that the bot actually had. SnapshotDimensions map[string]string `` /* 182-byte string literal not displayed */ }
This is the swarming-specific result for Executions run via swarming.
func (*Result) GetIsolatedOutdir ¶
func (m *Result) GetIsolatedOutdir() *IsolatedRef