remoteworkers

package
v0.0.0-...-2824937 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package remoteworkers is a generated protocol buffer package.

It is generated from these files:

google/devtools/remoteworkers/v1test2/bots.proto
google/devtools/remoteworkers/v1test2/command.proto
google/devtools/remoteworkers/v1test2/tasks.proto

It has these top-level messages:

BotSession
Lease
Worker
Device
AdminTemp
CreateBotSessionRequest
UpdateBotSessionRequest
PostBotEventTempRequest
CommandTask
CommandOutputs
CommandOverhead
FileMetadata
DirectoryMetadata
Digest
Directory
Task
TaskResult
GetTaskRequest
UpdateTaskResultRequest
AddTaskLogRequest
AddTaskLogResponse

Index

Constants

This section is empty.

Variables

View Source
var AdminTemp_Command_name = map[int32]string{
	0: "UNSPECIFIED",
	1: "BOT_UPDATE",
	2: "BOT_RESTART",
	3: "BOT_TERMINATE",
	4: "HOST_RESTART",
}
View Source
var AdminTemp_Command_value = map[string]int32{
	"UNSPECIFIED":   0,
	"BOT_UPDATE":    1,
	"BOT_RESTART":   2,
	"BOT_TERMINATE": 3,
	"HOST_RESTART":  4,
}
View Source
var BotStatus_name = map[int32]string{
	0: "BOT_STATUS_UNSPECIFIED",
	1: "OK",
	2: "UNHEALTHY",
	3: "HOST_REBOOTING",
	4: "BOT_TERMINATING",
}
View Source
var BotStatus_value = map[string]int32{
	"BOT_STATUS_UNSPECIFIED": 0,
	"OK":                     1,
	"UNHEALTHY":              2,
	"HOST_REBOOTING":         3,
	"BOT_TERMINATING":        4,
}
View Source
var LeaseState_name = map[int32]string{
	0: "LEASE_STATE_UNSPECIFIED",
	1: "PENDING",
	2: "ACTIVE",
	4: "COMPLETED",
	5: "CANCELLED",
}
View Source
var LeaseState_value = map[string]int32{
	"LEASE_STATE_UNSPECIFIED": 0,
	"PENDING":                 1,
	"ACTIVE":                  2,
	"COMPLETED":               4,
	"CANCELLED":               5,
}
View Source
var PostBotEventTempRequest_Type_name = map[int32]string{
	0: "UNSPECIFIED",
	1: "INFO",
	2: "ERROR",
}
View Source
var PostBotEventTempRequest_Type_value = map[string]int32{
	"UNSPECIFIED": 0,
	"INFO":        1,
	"ERROR":       2,
}

Functions

func RegisterBotsServer

func RegisterBotsServer(s *grpc.Server, srv BotsServer)

func RegisterTasksServer

func RegisterTasksServer(s *grpc.Server, srv TasksServer)

Types

type AddTaskLogRequest

type AddTaskLogRequest struct {
	// The name of the task that will own the new log.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The human-readable name of the log, like `stdout` or a relative file path.
	LogId string `protobuf:"bytes,2,opt,name=log_id,json=logId" json:"log_id,omitempty"`
}

Request message for `AddTaskLog`.

func (*AddTaskLogRequest) Descriptor

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

func (*AddTaskLogRequest) GetLogId

func (m *AddTaskLogRequest) GetLogId() string

func (*AddTaskLogRequest) GetName

func (m *AddTaskLogRequest) GetName() string

func (*AddTaskLogRequest) ProtoMessage

func (*AddTaskLogRequest) ProtoMessage()

func (*AddTaskLogRequest) Reset

func (m *AddTaskLogRequest) Reset()

func (*AddTaskLogRequest) String

func (m *AddTaskLogRequest) String() string

type AddTaskLogResponse

type AddTaskLogResponse struct {
	// The handle for the new log, as would be returned in Task.logs.
	Handle string `protobuf:"bytes,1,opt,name=handle" json:"handle,omitempty"`
}

Response message for `AddTaskLog`.

func (*AddTaskLogResponse) Descriptor

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

func (*AddTaskLogResponse) GetHandle

func (m *AddTaskLogResponse) GetHandle() string

func (*AddTaskLogResponse) ProtoMessage

func (*AddTaskLogResponse) ProtoMessage()

func (*AddTaskLogResponse) Reset

func (m *AddTaskLogResponse) Reset()

func (*AddTaskLogResponse) String

func (m *AddTaskLogResponse) String() string

type AdminTemp

type AdminTemp struct {
	// The admin action; see `Command` for legal values.
	Command AdminTemp_Command `protobuf:"varint,1,opt,name=command,enum=google.devtools.remoteworkers.v1test2.AdminTemp_Command" json:"command,omitempty"`
	// The argument to the admin action; see `Command` for semantics.
	Arg string `protobuf:"bytes,2,opt,name=arg" json:"arg,omitempty"`
}

AdminTemp is a prelimiary set of administration tasks. It's called "Temp" because we do not yet know the best way to represent admin tasks; it's possible that this will be entirely replaced in later versions of this API. If this message proves to be sufficient, it will be renamed in the alpha or beta release of this API.

This message (suitably marshalled into a protobuf.Any) can be used as the inline_assignment field in a lease; the lease assignment field should simply be `"admin"` in these cases.

This message is heavily based on Swarming administration tasks from the LUCI project (http://github.com/luci/luci-py/appengine/swarming).

func (*AdminTemp) Descriptor

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

func (*AdminTemp) GetArg

func (m *AdminTemp) GetArg() string

func (*AdminTemp) GetCommand

func (m *AdminTemp) GetCommand() AdminTemp_Command

func (*AdminTemp) ProtoMessage

func (*AdminTemp) ProtoMessage()

func (*AdminTemp) Reset

func (m *AdminTemp) Reset()

func (*AdminTemp) String

func (m *AdminTemp) String() string

type AdminTemp_Command

type AdminTemp_Command int32

Possible administration actions.

const (
	// Illegal value.
	AdminTemp_UNSPECIFIED AdminTemp_Command = 0
	// Download and run a new version of the bot. `arg` will be a resource
	// accessible via `ByteStream.Read` to obtain the new bot code.
	AdminTemp_BOT_UPDATE AdminTemp_Command = 1
	// Restart the bot without downloading a new version. `arg` will be a
	// message to log.
	AdminTemp_BOT_RESTART AdminTemp_Command = 2
	// Shut down the bot. `arg` will be a task resource name (similar to those
	// in tasks.proto) that the bot can use to tell the server that it is
	// terminating.
	AdminTemp_BOT_TERMINATE AdminTemp_Command = 3
	// Restart the host computer. `arg` will be a message to log.
	AdminTemp_HOST_RESTART AdminTemp_Command = 4
)

func (AdminTemp_Command) EnumDescriptor

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

func (AdminTemp_Command) String

func (x AdminTemp_Command) String() string

type BotSession

type BotSession struct {
	// The bot session name, as selected by the server. Output only during a call
	// to CreateBotSession.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// A unique bot ID within the farm used to persistently identify this bot over
	// time (i.e., over multiple sessions). This ID must be unique within a
	// farm. Typically, the bot ID will be the same as the name of the primary
	// device in the worker (e.g., what you'd get from typing `uname -n` on *nix),
	// but this is not required since a single device may allow multiple bots to
	// run on it, each with access to different resources. What is important is
	// that this ID is meaningful to humans, who might need to hunt a physical
	// machine down to fix it.
	//
	// When CreateBotSession is successfully called with a bot_id, all prior
	// sessions with the same ID are invalidated. If a bot attempts to update an
	// invalid session, the server must reject that request, and may also
	// quarantine the other bot with the same bot IDs (ie, stop sending it new
	// leases and alert an admin).
	BotId string `protobuf:"bytes,2,opt,name=bot_id,json=botId" json:"bot_id,omitempty"`
	// The status of the bot. This must be populated in every call to
	// UpdateBotSession.
	Status BotStatus `protobuf:"varint,3,opt,name=status,enum=google.devtools.remoteworkers.v1test2.BotStatus" json:"status,omitempty"`
	// A description of the worker hosting this bot. The Worker message is used
	// here in the Status context (see Worker for more information).  If multiple
	// bots are running on the worker, this field should only describe the
	// resources accessible from this bot.
	//
	// During the call to CreateBotSession, the server may make arbitrary changes
	// to the worker's `server_properties` field (see that field for more
	// information). Otherwise, this field is input-only.
	Worker *Worker `protobuf:"bytes,4,opt,name=worker" json:"worker,omitempty"`
	// A list of all leases that are a part of this session. See the Lease message
	// for details.
	Leases []*Lease `protobuf:"bytes,5,rep,name=leases" json:"leases,omitempty"`
	// The time at which this bot session will expire, unless the bot calls
	// UpdateBotSession again. Output only.
	ExpireTime *google_protobuf4.Timestamp `protobuf:"bytes,6,opt,name=expire_time,json=expireTime" json:"expire_time,omitempty"`
	// The version of the bot code currently running. The server may use this
	// information to issue an admin action to tell the bot to update itself.
	Version string `protobuf:"bytes,7,opt,name=version" json:"version,omitempty"`
}

A bot session represents the state of a bot while in continuous contact with the server for a period of time. The session includes information about the worker - that is, the *worker* (the physical or virtual hardware) is considered to be a property of the bot (the software agent running on that hardware), which is the reverse of real life, but more natural from the point of the view of this API, which communicates solely with the bot and not directly with the underlying worker.

func (*BotSession) Descriptor

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

func (*BotSession) GetBotId

func (m *BotSession) GetBotId() string

func (*BotSession) GetExpireTime

func (m *BotSession) GetExpireTime() *google_protobuf4.Timestamp

func (*BotSession) GetLeases

func (m *BotSession) GetLeases() []*Lease

func (*BotSession) GetName

func (m *BotSession) GetName() string

func (*BotSession) GetStatus

func (m *BotSession) GetStatus() BotStatus

func (*BotSession) GetVersion

func (m *BotSession) GetVersion() string

func (*BotSession) GetWorker

func (m *BotSession) GetWorker() *Worker

func (*BotSession) ProtoMessage

func (*BotSession) ProtoMessage()

func (*BotSession) Reset

func (m *BotSession) Reset()

func (*BotSession) String

func (m *BotSession) String() string

type BotStatus

type BotStatus int32

A coarse description of the status of the bot that the server uses to determine whether to assign the bot new leases.

const (
	// Default value; do not use.
	BotStatus_BOT_STATUS_UNSPECIFIED BotStatus = 0
	// The bot is healthy, and will accept leases as normal.
	BotStatus_OK BotStatus = 1
	// The bot is unhealthy and will not accept new leases. For example, the bot
	// may have detected that available disk space is too low. This situation may
	// resolve itself, but will typically require human intervention.
	BotStatus_UNHEALTHY BotStatus = 2
	// The bot has been asked to reboot the host. The bot will not accept new
	// leases; once all leases are complete, this session will no longer be
	// updated but the bot will be expected to establish a new session after the
	// reboot completes.
	BotStatus_HOST_REBOOTING BotStatus = 3
	// The bot has been asked to shut down. As with HOST_REBOOTING, once all
	// leases are completed, the session will no longer be updated and the bot
	// will not be expected to establish a new session.
	//
	// Bots are typically only asked to shut down if its host computer will be
	// modified in some way, such as deleting a VM.
	BotStatus_BOT_TERMINATING BotStatus = 4
)

func (BotStatus) EnumDescriptor

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

func (BotStatus) String

func (x BotStatus) String() string

type BotsClient

type BotsClient interface {
	// CreateBotSession is called when the bot first joins the farm, and
	// establishes a session ID to ensure that multiple machines do not register
	// using the same name accidentally.
	CreateBotSession(ctx context.Context, in *CreateBotSessionRequest, opts ...grpc.CallOption) (*BotSession, error)
	// UpdateBotSession must be called periodically by the bot (on a schedule
	// determined by the server) to let the server know about its status, and to
	// pick up new lease requests from the server.
	UpdateBotSession(ctx context.Context, in *UpdateBotSessionRequest, opts ...grpc.CallOption) (*BotSession, error)
	// PostBotEventTemp may be called by the bot to indicate that some exceptional
	// event has occurred. This method is subject to change or removal in future
	// revisions of this API; we may simply want to replace it with StackDriver or
	// some other common interface.
	PostBotEventTemp(ctx context.Context, in *PostBotEventTempRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
}

func NewBotsClient

func NewBotsClient(cc *grpc.ClientConn) BotsClient

type BotsServer

type BotsServer interface {
	// CreateBotSession is called when the bot first joins the farm, and
	// establishes a session ID to ensure that multiple machines do not register
	// using the same name accidentally.
	CreateBotSession(context.Context, *CreateBotSessionRequest) (*BotSession, error)
	// UpdateBotSession must be called periodically by the bot (on a schedule
	// determined by the server) to let the server know about its status, and to
	// pick up new lease requests from the server.
	UpdateBotSession(context.Context, *UpdateBotSessionRequest) (*BotSession, error)
	// PostBotEventTemp may be called by the bot to indicate that some exceptional
	// event has occurred. This method is subject to change or removal in future
	// revisions of this API; we may simply want to replace it with StackDriver or
	// some other common interface.
	PostBotEventTemp(context.Context, *PostBotEventTempRequest) (*google_protobuf2.Empty, error)
}

type CommandOutputs

type CommandOutputs struct {
	// exit_code is only fully reliable if the status' code is OK. If the task
	// exceeded its deadline or was cancelled, the process may still produce an
	// exit code as it is cancelled, and this will be populated, but a successful
	// (zero) is unlikely to be correct unless the status code is OK.
	ExitCode int32 `protobuf:"varint,1,opt,name=exit_code,json=exitCode" json:"exit_code,omitempty"`
	// The output files. The blob referenced by the digest should contain
	// one of the following (implementation-dependent):
	//    * A marshalled DirectoryMetadata of the returned filesystem
	//    * A LUCI-style .isolated file
	Outputs *Digest `protobuf:"bytes,2,opt,name=outputs" json:"outputs,omitempty"`
}

Describes the actual outputs from the task.

func (*CommandOutputs) Descriptor

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

func (*CommandOutputs) GetExitCode

func (m *CommandOutputs) GetExitCode() int32

func (*CommandOutputs) GetOutputs

func (m *CommandOutputs) GetOutputs() *Digest

func (*CommandOutputs) ProtoMessage

func (*CommandOutputs) ProtoMessage()

func (*CommandOutputs) Reset

func (m *CommandOutputs) Reset()

func (*CommandOutputs) String

func (m *CommandOutputs) String() string

type CommandOverhead

type CommandOverhead struct {
	// The elapsed time between calling Accept and Complete. The server will also
	// have its own idea of what this should be, but this excludes the overhead of
	// the RPCs and the bot response time.
	Duration *google_protobuf5.Duration `protobuf:"bytes,1,opt,name=duration" json:"duration,omitempty"`
	// The amount of time *not* spent executing the command (ie
	// uploading/downloading files).
	Overhead *google_protobuf5.Duration `protobuf:"bytes,2,opt,name=overhead" json:"overhead,omitempty"`
}

Can be used as part of CompleteRequest.metadata, or are part of a more sophisticated message.

func (*CommandOverhead) Descriptor

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

func (*CommandOverhead) GetDuration

func (m *CommandOverhead) GetDuration() *google_protobuf5.Duration

func (*CommandOverhead) GetOverhead

func (m *CommandOverhead) GetOverhead() *google_protobuf5.Duration

func (*CommandOverhead) ProtoMessage

func (*CommandOverhead) ProtoMessage()

func (*CommandOverhead) Reset

func (m *CommandOverhead) Reset()

func (*CommandOverhead) String

func (m *CommandOverhead) String() string

type CommandTask

type CommandTask struct {
	// The inputs to the task.
	Inputs *CommandTask_Inputs `protobuf:"bytes,1,opt,name=inputs" json:"inputs,omitempty"`
	// The expected outputs from the task.
	ExpectedOutputs *CommandTask_Outputs `protobuf:"bytes,4,opt,name=expected_outputs,json=expectedOutputs" json:"expected_outputs,omitempty"`
	// The timeouts of this task.
	Timeouts *CommandTask_Timeouts `protobuf:"bytes,5,opt,name=timeouts" json:"timeouts,omitempty"`
}

Describes a shell-style task to execute.

func (*CommandTask) Descriptor

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

func (*CommandTask) GetExpectedOutputs

func (m *CommandTask) GetExpectedOutputs() *CommandTask_Outputs

func (*CommandTask) GetInputs

func (m *CommandTask) GetInputs() *CommandTask_Inputs

func (*CommandTask) GetTimeouts

func (m *CommandTask) GetTimeouts() *CommandTask_Timeouts

func (*CommandTask) ProtoMessage

func (*CommandTask) ProtoMessage()

func (*CommandTask) Reset

func (m *CommandTask) Reset()

func (*CommandTask) String

func (m *CommandTask) String() string

type CommandTask_Inputs

type CommandTask_Inputs struct {
	// The command itself to run (e.g., argv)
	Arguments []string `protobuf:"bytes,1,rep,name=arguments" json:"arguments,omitempty"`
	// The input filesystem to be set up prior to the task beginning. The
	// contents should be a repeated set of FileMetadata messages though other
	// formats are allowed if better for the implementation (eg, a LUCI-style
	// .isolated file).
	//
	// This field is repeated since implementations might want to cache the
	// metadata, in which case it may be useful to break up portions of the
	// filesystem that change frequently (eg, specific input files) from those
	// that don't (eg, standard header files).
	Files []*Digest `protobuf:"bytes,2,rep,name=files" json:"files,omitempty"`
	// All environment variables required by the task.
	EnvironmentVariables []*CommandTask_Inputs_EnvironmentVariable `protobuf:"bytes,3,rep,name=environment_variables,json=environmentVariables" json:"environment_variables,omitempty"`
}

Describes the inputs to a shell-style task.

func (*CommandTask_Inputs) Descriptor

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

func (*CommandTask_Inputs) GetArguments

func (m *CommandTask_Inputs) GetArguments() []string

func (*CommandTask_Inputs) GetEnvironmentVariables

func (m *CommandTask_Inputs) GetEnvironmentVariables() []*CommandTask_Inputs_EnvironmentVariable

func (*CommandTask_Inputs) GetFiles

func (m *CommandTask_Inputs) GetFiles() []*Digest

func (*CommandTask_Inputs) ProtoMessage

func (*CommandTask_Inputs) ProtoMessage()

func (*CommandTask_Inputs) Reset

func (m *CommandTask_Inputs) Reset()

func (*CommandTask_Inputs) String

func (m *CommandTask_Inputs) String() string

type CommandTask_Inputs_EnvironmentVariable

type CommandTask_Inputs_EnvironmentVariable struct {
	// The envvar name.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The envvar value.
	Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

An environment variable required by this task.

func (*CommandTask_Inputs_EnvironmentVariable) Descriptor

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

func (*CommandTask_Inputs_EnvironmentVariable) GetName

func (*CommandTask_Inputs_EnvironmentVariable) GetValue

func (*CommandTask_Inputs_EnvironmentVariable) ProtoMessage

func (*CommandTask_Inputs_EnvironmentVariable) Reset

func (*CommandTask_Inputs_EnvironmentVariable) String

type CommandTask_Outputs

type CommandTask_Outputs struct {
	// A list of expected files, relative to the execution root.
	Files []string `protobuf:"bytes,1,rep,name=files" json:"files,omitempty"`
	// A list of expected directories, relative to the execution root.
	Directories []string `protobuf:"bytes,2,rep,name=directories" json:"directories,omitempty"`
}

Describes the expected outputs of the command.

func (*CommandTask_Outputs) Descriptor

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

func (*CommandTask_Outputs) GetDirectories

func (m *CommandTask_Outputs) GetDirectories() []string

func (*CommandTask_Outputs) GetFiles

func (m *CommandTask_Outputs) GetFiles() []string

func (*CommandTask_Outputs) ProtoMessage

func (*CommandTask_Outputs) ProtoMessage()

func (*CommandTask_Outputs) Reset

func (m *CommandTask_Outputs) Reset()

func (*CommandTask_Outputs) String

func (m *CommandTask_Outputs) String() string

type CommandTask_Timeouts

type CommandTask_Timeouts struct {
	// This specifies the maximum time that the task can run, excluding the
	// time required to download inputs or upload outputs. That is, the worker
	// will terminate the task if it runs longer than this.
	Execution *google_protobuf5.Duration `protobuf:"bytes,1,opt,name=execution" json:"execution,omitempty"`
	// This specifies the maximum amount of time the task can be idle - that is,
	// go without generating some output in either stdout or stderr. If the
	// process is silent for more than the specified time, the worker will
	// terminate the task.
	Idle *google_protobuf5.Duration `protobuf:"bytes,2,opt,name=idle" json:"idle,omitempty"`
	// If the execution or IO timeouts are exceeded, the worker will try to
	// gracefully terminate the task and return any existing logs. However,
	// tasks may be hard-frozen in which case this process will fail. This
	// timeout specifies how long to wait for a terminated task to shut down
	// gracefully (e.g. via SIGTERM) before we bring down the hammer (e.g.
	// SIGKILL on *nix, CTRL_BREAK_EVENT on Windows).
	Shutdown *google_protobuf5.Duration `protobuf:"bytes,3,opt,name=shutdown" json:"shutdown,omitempty"`
}

Describes the timeouts associated with this task.

func (*CommandTask_Timeouts) Descriptor

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

func (*CommandTask_Timeouts) GetExecution

func (m *CommandTask_Timeouts) GetExecution() *google_protobuf5.Duration

func (*CommandTask_Timeouts) GetIdle

func (*CommandTask_Timeouts) GetShutdown

func (*CommandTask_Timeouts) ProtoMessage

func (*CommandTask_Timeouts) ProtoMessage()

func (*CommandTask_Timeouts) Reset

func (m *CommandTask_Timeouts) Reset()

func (*CommandTask_Timeouts) String

func (m *CommandTask_Timeouts) String() string

type CreateBotSessionRequest

type CreateBotSessionRequest struct {
	// The farm resource.
	Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
	// The bot session to create. Server-assigned fields like name must be unset.
	BotSession *BotSession `protobuf:"bytes,2,opt,name=bot_session,json=botSession" json:"bot_session,omitempty"`
}

Request message for CreateBotSession.

func (*CreateBotSessionRequest) Descriptor

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

func (*CreateBotSessionRequest) GetBotSession

func (m *CreateBotSessionRequest) GetBotSession() *BotSession

func (*CreateBotSessionRequest) GetParent

func (m *CreateBotSessionRequest) GetParent() string

func (*CreateBotSessionRequest) ProtoMessage

func (*CreateBotSessionRequest) ProtoMessage()

func (*CreateBotSessionRequest) Reset

func (m *CreateBotSessionRequest) Reset()

func (*CreateBotSessionRequest) String

func (m *CreateBotSessionRequest) String() string

type Device

type Device struct {
	// The handle can be thought of as the "name" of the device, and must be
	// unique within a Worker.
	//
	// In the Status context, the handle should be some human-understandable name,
	// perhaps corresponding to a label physically written on the device to make
	// it easy to locate. In the Request context, the name should be the
	// *logical* name expected by the task. The bot is responsible for mapping the
	// logical name expected by the task to a machine-readable name that the task
	// can actually use, such as a USB address. The method by which this mapping
	// is communicated to the task is not covered in this API.
	Handle string `protobuf:"bytes,1,opt,name=handle" json:"handle,omitempty"`
	// Properties of this device that don't change based on the tasks that are
	// running on it, e.g. OS, CPU architecture, etc.
	//
	// Keys may be repeated, and have the following interpretation:
	//
	//    * Status context: the device can support *any* the listed values. For
	//    example, an "ISA" property might include "x86", "x86-64" and "sse4".
	//
	//    * Request context: the device *must* support *all* of the listed values.
	Properties []*Device_Property `protobuf:"bytes,2,rep,name=properties" json:"properties,omitempty"`
}

Any device, including computers, phones, accelerators (e.g. GPUs), etc. All names must be unique.

func (*Device) Descriptor

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

func (*Device) GetHandle

func (m *Device) GetHandle() string

func (*Device) GetProperties

func (m *Device) GetProperties() []*Device_Property

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) Reset

func (m *Device) Reset()

func (*Device) String

func (m *Device) String() string

type Device_Property

type Device_Property struct {
	// For general information on keys, see the documentation to `Worker`.
	//
	// The current set of standard keys are:
	//
	// * os: a human-readable description of the OS. Examples include `linux`,
	// `ubuntu` and `ubuntu 14.04` (note that a bot may advertise itself as more
	// than one). This will be replaced in the future by more well-structured
	// keys and values to represent OS variants.
	//
	// * has-docker: "true" if the bot has Docker installed. This will be
	// replaced in the future by a more structured message for Docker support.
	Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	// The property's value.
	Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

A device property; see `properties` for more information.

func (*Device_Property) Descriptor

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

func (*Device_Property) GetKey

func (m *Device_Property) GetKey() string

func (*Device_Property) GetValue

func (m *Device_Property) GetValue() string

func (*Device_Property) ProtoMessage

func (*Device_Property) ProtoMessage()

func (*Device_Property) Reset

func (m *Device_Property) Reset()

func (*Device_Property) String

func (m *Device_Property) String() string

type Digest

type Digest struct {
	// A string-encoded hash (eg "1a2b3c", not the byte array [0x1a, 0x2b, 0x3c])
	// using an implementation-defined hash algorithm (eg SHA-256).
	Hash string `protobuf:"bytes,1,opt,name=hash" json:"hash,omitempty"`
	// The size of the contents. While this is not strictly required as part of an
	// identifier (after all, any given hash will have exactly one canonical
	// size), it's useful in almost all cases when one might want to send or
	// retrieve blobs of content and is included here for this reason.
	SizeBytes int64 `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes" json:"size_bytes,omitempty"`
}

A reference to the contents of a file or a directory. If the latter, the has refers to the hash of a marshalled Directory message. Similar to the equivalent message in the Remote Execution API.

func (*Digest) Descriptor

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

func (*Digest) GetHash

func (m *Digest) GetHash() string

func (*Digest) GetSizeBytes

func (m *Digest) GetSizeBytes() int64

func (*Digest) ProtoMessage

func (*Digest) ProtoMessage()

func (*Digest) Reset

func (m *Digest) Reset()

func (*Digest) String

func (m *Digest) String() string

type Directory

type Directory struct {
	// The files in this directory
	Files []*FileMetadata `protobuf:"bytes,1,rep,name=files" json:"files,omitempty"`
	// Any subdirectories
	Directories []*DirectoryMetadata `protobuf:"bytes,2,rep,name=directories" json:"directories,omitempty"`
}

The contents of a directory. Similar to the equivalent message in the Remote Execution API.

func (*Directory) Descriptor

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

func (*Directory) GetDirectories

func (m *Directory) GetDirectories() []*DirectoryMetadata

func (*Directory) GetFiles

func (m *Directory) GetFiles() []*FileMetadata

func (*Directory) ProtoMessage

func (*Directory) ProtoMessage()

func (*Directory) Reset

func (m *Directory) Reset()

func (*Directory) String

func (m *Directory) String() string

type DirectoryMetadata

type DirectoryMetadata struct {
	// The path of the directory, as in [FileMetadata.path][google.devtools.remoteworkers.v1test2.FileMetadata.path].
	Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
	// A pointer to the contents of the directory, in the form of a marshalled
	// Directory message.
	Digest *Digest `protobuf:"bytes,2,opt,name=digest" json:"digest,omitempty"`
}

The metadata for a directory. Similar to the equivalent message in the Remote Execution API.

func (*DirectoryMetadata) Descriptor

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

func (*DirectoryMetadata) GetDigest

func (m *DirectoryMetadata) GetDigest() *Digest

func (*DirectoryMetadata) GetPath

func (m *DirectoryMetadata) GetPath() string

func (*DirectoryMetadata) ProtoMessage

func (*DirectoryMetadata) ProtoMessage()

func (*DirectoryMetadata) Reset

func (m *DirectoryMetadata) Reset()

func (*DirectoryMetadata) String

func (m *DirectoryMetadata) String() string

type FileMetadata

type FileMetadata struct {
	// The path of this file. If this message is part of the
	// CommandResult.output_files fields, the path is relative to the execution
	// root and must correspond to an entry in CommandTask.outputs.files. If this
	// message is part of a Directory message, then the path is relative to the
	// root of that directory.
	Path string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
	// A pointer to the contents of the file. The method by which a client
	// retrieves the contents from a CAS system is not defined here.
	Digest *Digest `protobuf:"bytes,2,opt,name=digest" json:"digest,omitempty"`
	// If the file is small enough, its contents may also or alternatively be
	// listed here.
	Contents []byte `protobuf:"bytes,3,opt,name=contents,proto3" json:"contents,omitempty"`
	// Properties of the file
	IsExecutable bool `protobuf:"varint,4,opt,name=is_executable,json=isExecutable" json:"is_executable,omitempty"`
}

The metadata for a file. Similar to the equivalent message in the Remote Execution API.

func (*FileMetadata) Descriptor

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

func (*FileMetadata) GetContents

func (m *FileMetadata) GetContents() []byte

func (*FileMetadata) GetDigest

func (m *FileMetadata) GetDigest() *Digest

func (*FileMetadata) GetIsExecutable

func (m *FileMetadata) GetIsExecutable() bool

func (*FileMetadata) GetPath

func (m *FileMetadata) GetPath() string

func (*FileMetadata) ProtoMessage

func (*FileMetadata) ProtoMessage()

func (*FileMetadata) Reset

func (m *FileMetadata) Reset()

func (*FileMetadata) String

func (m *FileMetadata) String() string

type GetTaskRequest

type GetTaskRequest struct {
	// The task name.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

Request message for `GetTask`.

func (*GetTaskRequest) Descriptor

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

func (*GetTaskRequest) GetName

func (m *GetTaskRequest) GetName() string

func (*GetTaskRequest) ProtoMessage

func (*GetTaskRequest) ProtoMessage()

func (*GetTaskRequest) Reset

func (m *GetTaskRequest) Reset()

func (*GetTaskRequest) String

func (m *GetTaskRequest) String() string

type Lease

type Lease struct {
	// The assignment, which is typically a resource that can be accessed through
	// some other services. The assignment must be meaningful to the bot based
	// solely on this name, either because the bot only understands one type of
	// assignment (e.g., tasks served through the Tasks interface) or through some
	// implementation-defined schema.
	//
	// For example, if the worker is executing a Task as defined by the Tasks
	// interface, this field might be projects/{projectid}/tasks/{taskid}.
	// However, it the worker is being assigned pull from a *queue* of tasks, the
	// resource would be the name of the queue, something like
	// projects/{projectid}/locations/{locationid}/queues/{queueid}. That queue
	// may then provide the bot with tasks through another interface, which the
	// bot then processes through the [Tasks]
	// [google.devtools.remoteworkers.v1test2.Tasks] interface.
	//
	// Note that the assignment may be a [full resource name]
	// [https://cloud.google.com/apis/design/resource_names#full_resource_name] if
	// it should be accessed through an endpoint that is not already known to the
	// bot.
	Assignment string `protobuf:"bytes,1,opt,name=assignment" json:"assignment,omitempty"`
	// The state of the lease. See LeaseState for more information.
	State LeaseState `protobuf:"varint,2,opt,name=state,enum=google.devtools.remoteworkers.v1test2.LeaseState" json:"state,omitempty"`
	// The final status of the lease (should be populated by the bot if the state
	// is completed). This is the status of the lease, not of any task represented
	// by the lease. For example, if the bot could not accept the lease because it
	// asked for some resource the bot didn't have, this status will be
	// FAILED_PRECONDITION. But if the assignment in the lease didn't execute
	// correctly, this field will be `OK` while the failure of the assignment must
	// be tracked elsewhere (e.g., through the Tasks interface).
	Status *google_rpc.Status `protobuf:"bytes,3,opt,name=status" json:"status,omitempty"`
	// The requirements that are being claimed by this lease. This field may be
	// omitted by the server if the lease is not pending.
	Requirements *Worker `protobuf:"bytes,4,opt,name=requirements" json:"requirements,omitempty"`
	// The time at which this lease expires. The server *may* extend this over
	// time, but due to race conditions, the bot is not *required* to respect any
	// expiry date except the first one.
	ExpireTime *google_protobuf4.Timestamp `protobuf:"bytes,5,opt,name=expire_time,json=expireTime" json:"expire_time,omitempty"`
	// While the `assignment` field is a resource name that allows the bot to
	// get the actual assignment, the server can also optionally include the
	// assignment itself inline in order to save a round trip to the server.
	//
	// This doesn't necessarily need to be the resource pointed to by
	// `assignment`. For example, if the assignment is a task, this field could
	// be task.description, not the entire task, since that's all the bot needs
	// to know to get started. As with `assignment` itself, all that's necessary
	// is that the bot knows how to handle the type of message received here.
	//
	// This field may be omitted by the server if the lease is not in the
	// `PENDING` state.
	InlineAssignment *google_protobuf1.Any `protobuf:"bytes,6,opt,name=inline_assignment,json=inlineAssignment" json:"inline_assignment,omitempty"`
}

A Lease is a lease that the scheduler has assigned to this bot. If the bot notices (by UpdateBotSession) that it has any leases in the PENDING state, it should call UpdateBotSession to put the leases into the ACTIVE state and start executing their assignments.

All fields in this message are output-only, *except* the `state` and `status` fields. Note that repeated fields can only be updated as a unit, so on every update the bot must provide an update for *all* the leases the server expects it to report on.

The scheduler *should* ensure that all leases scheduled to a bot can actually be accepted, but race conditions may occur. In such cases, the bot should attempt to accept the leases in the order they are listed by the server, to allow the server to control priorities.

The server will remove COMPLETED leases from time to time, after which the bot shouldn't report on them any more (the server will ignore superfluous COMPLETED records).

func (*Lease) Descriptor

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

func (*Lease) GetAssignment

func (m *Lease) GetAssignment() string

func (*Lease) GetExpireTime

func (m *Lease) GetExpireTime() *google_protobuf4.Timestamp

func (*Lease) GetInlineAssignment

func (m *Lease) GetInlineAssignment() *google_protobuf1.Any

func (*Lease) GetRequirements

func (m *Lease) GetRequirements() *Worker

func (*Lease) GetState

func (m *Lease) GetState() LeaseState

func (*Lease) GetStatus

func (m *Lease) GetStatus() *google_rpc.Status

func (*Lease) ProtoMessage

func (*Lease) ProtoMessage()

func (*Lease) Reset

func (m *Lease) Reset()

func (*Lease) String

func (m *Lease) String() string

type LeaseState

type LeaseState int32

The state of the lease. All leases start in the PENDING state. A bot can change PENDING to ACTIVE or (in the case of an error) COMPLETED, or from ACTIVE to COMPLETED. The server can change PENDING or ACTIVE to CANCELLED if it wants the bot to release its resources - for example, if the bot needs to be quarantined (it's producing bad output) or a cell needs to be drained.

const (
	// Default value; do not use.
	LeaseState_LEASE_STATE_UNSPECIFIED LeaseState = 0
	// Pending: the server expects the bot to accept this lease. This may only be
	// set by the server.
	LeaseState_PENDING LeaseState = 1
	// Active: the bot has accepted this lease. This may only be set by the bot.
	LeaseState_ACTIVE LeaseState = 2
	// Completed: the bot is no longer leased. This may only be set by the bot,
	// and the status field must be populated iff the state is COMPLETED.
	LeaseState_COMPLETED LeaseState = 4
	// Cancelled: The bot should immediately release all resources associated with
	// the lease. This may only be set by the server.
	LeaseState_CANCELLED LeaseState = 5
)

func (LeaseState) EnumDescriptor

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

func (LeaseState) String

func (x LeaseState) String() string

type PostBotEventTempRequest

type PostBotEventTempRequest struct {
	// The bot session name.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The type of bot event.
	Type PostBotEventTempRequest_Type `` /* 127-byte string literal not displayed */
	// A human-readable message.
	Msg string `protobuf:"bytes,3,opt,name=msg" json:"msg,omitempty"`
}

Request message for PostBotEventTemp

func (*PostBotEventTempRequest) Descriptor

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

func (*PostBotEventTempRequest) GetMsg

func (m *PostBotEventTempRequest) GetMsg() string

func (*PostBotEventTempRequest) GetName

func (m *PostBotEventTempRequest) GetName() string

func (*PostBotEventTempRequest) GetType

func (*PostBotEventTempRequest) ProtoMessage

func (*PostBotEventTempRequest) ProtoMessage()

func (*PostBotEventTempRequest) Reset

func (m *PostBotEventTempRequest) Reset()

func (*PostBotEventTempRequest) String

func (m *PostBotEventTempRequest) String() string

type PostBotEventTempRequest_Type

type PostBotEventTempRequest_Type int32

Types of bot events.

const (
	// Illegal value.
	PostBotEventTempRequest_UNSPECIFIED PostBotEventTempRequest_Type = 0
	// Interesting but harmless event.
	PostBotEventTempRequest_INFO PostBotEventTempRequest_Type = 1
	// Error condition.
	PostBotEventTempRequest_ERROR PostBotEventTempRequest_Type = 2
)

func (PostBotEventTempRequest_Type) EnumDescriptor

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

func (PostBotEventTempRequest_Type) String

type Task

type Task struct {
	// The name of this task. Output only.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The actual task to perform. For example, this could be CommandTask to run a
	// command line.
	Description *google_protobuf1.Any `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
	// Handles to logs. The key is a human-readable name like `stdout`, and the
	// handle is a resource name that can be passed to ByteStream or other
	// accessors.
	//
	// An implementation may define some logs by default (like `stdout`), and may
	// allow clients to add new logs via AddTaskLog.
	Logs map[string]string `` /* 128-byte string literal not displayed */
}

A Task represents a unit of work. Its result and logs are defined as subresources.

If all the `Any` fields are populated, this can be a very large message, and clients may not want the entire message returned on every call to every method. Such clients should request partial responses (https://cloud.google.com/apis/design/design_patterns#partial_response) and servers should implement partial responses in order to reduce unnecessry overhead.

func (*Task) Descriptor

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

func (*Task) GetDescription

func (m *Task) GetDescription() *google_protobuf1.Any

func (*Task) GetLogs

func (m *Task) GetLogs() map[string]string

func (*Task) GetName

func (m *Task) GetName() string

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) Reset

func (m *Task) Reset()

func (*Task) String

func (m *Task) String() string

type TaskResult

type TaskResult struct {
	// The name of the task result; must be a name of a `Task` followed by
	// `/result`.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The result may be updated several times; the client must only set
	// `complete` to true to indicate that no further updates are allowed.
	// If this is not true, the `status` field must not be examined since its zero
	// value is equivalent to `OK`.
	//
	// Once a task is completed, it must not be updated with further results,
	// though the implementation may choose to continue to receive logs.
	Complete bool `protobuf:"varint,2,opt,name=complete" json:"complete,omitempty"`
	// The final status of the task itself. For example, if task.description
	// included a timeout which was violated, status.code may be
	// DEADLINE_EXCEEDED. This field can only be read if `complete` is true.
	Status *google_rpc.Status `protobuf:"bytes,3,opt,name=status" json:"status,omitempty"`
	// Any non-log output, such as output files and exit codes. See
	// CommandResult as an example.
	Output *google_protobuf1.Any `protobuf:"bytes,4,opt,name=output" json:"output,omitempty"`
	// Any information about how the command was executed, eg runtime. See
	// CommandOverhead as an example.
	Meta *google_protobuf1.Any `protobuf:"bytes,5,opt,name=meta" json:"meta,omitempty"`
}

The result and metadata of the task.

func (*TaskResult) Descriptor

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

func (*TaskResult) GetComplete

func (m *TaskResult) GetComplete() bool

func (*TaskResult) GetMeta

func (m *TaskResult) GetMeta() *google_protobuf1.Any

func (*TaskResult) GetName

func (m *TaskResult) GetName() string

func (*TaskResult) GetOutput

func (m *TaskResult) GetOutput() *google_protobuf1.Any

func (*TaskResult) GetStatus

func (m *TaskResult) GetStatus() *google_rpc.Status

func (*TaskResult) ProtoMessage

func (*TaskResult) ProtoMessage()

func (*TaskResult) Reset

func (m *TaskResult) Reset()

func (*TaskResult) String

func (m *TaskResult) String() string

type TasksClient

type TasksClient interface {
	// GetTask reads the current state of the task. Tasks must be created through
	// some other interface, and should be immutable once created and exposed to
	// the bots.
	GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error)
	// UpdateTaskResult updates the result.
	UpdateTaskResult(ctx context.Context, in *UpdateTaskResultRequest, opts ...grpc.CallOption) (*TaskResult, error)
	// AddTaskLog creates a new streaming log. The log is streamed and marked as
	// completed through other interfaces (i.e., ByteStream). This can be called
	// by the bot if it wants to create a new log; the server can also predefine
	// logs that do not need to be created (e.g. `stdout`).
	AddTaskLog(ctx context.Context, in *AddTaskLogRequest, opts ...grpc.CallOption) (*AddTaskLogResponse, error)
}

func NewTasksClient

func NewTasksClient(cc *grpc.ClientConn) TasksClient

type TasksServer

type TasksServer interface {
	// GetTask reads the current state of the task. Tasks must be created through
	// some other interface, and should be immutable once created and exposed to
	// the bots.
	GetTask(context.Context, *GetTaskRequest) (*Task, error)
	// UpdateTaskResult updates the result.
	UpdateTaskResult(context.Context, *UpdateTaskResultRequest) (*TaskResult, error)
	// AddTaskLog creates a new streaming log. The log is streamed and marked as
	// completed through other interfaces (i.e., ByteStream). This can be called
	// by the bot if it wants to create a new log; the server can also predefine
	// logs that do not need to be created (e.g. `stdout`).
	AddTaskLog(context.Context, *AddTaskLogRequest) (*AddTaskLogResponse, error)
}

type UpdateBotSessionRequest

type UpdateBotSessionRequest struct {
	// The bot session name. Must match bot_session.name.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The bot session resource to update.
	BotSession *BotSession `protobuf:"bytes,2,opt,name=bot_session,json=botSession" json:"bot_session,omitempty"`
	// The fields on the bot that should be updated. See the BotSession resource
	// for which fields are updatable by which caller.
	UpdateMask *google_protobuf3.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
}

Request message for UpdateBotSession.

func (*UpdateBotSessionRequest) Descriptor

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

func (*UpdateBotSessionRequest) GetBotSession

func (m *UpdateBotSessionRequest) GetBotSession() *BotSession

func (*UpdateBotSessionRequest) GetName

func (m *UpdateBotSessionRequest) GetName() string

func (*UpdateBotSessionRequest) GetUpdateMask

func (*UpdateBotSessionRequest) ProtoMessage

func (*UpdateBotSessionRequest) ProtoMessage()

func (*UpdateBotSessionRequest) Reset

func (m *UpdateBotSessionRequest) Reset()

func (*UpdateBotSessionRequest) String

func (m *UpdateBotSessionRequest) String() string

type UpdateTaskResultRequest

type UpdateTaskResultRequest struct {
	// The task result name; must match `result.name`.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The result being updated.
	Result *TaskResult `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
	// The fields within `result` that are specified.
	UpdateMask *google_protobuf3.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
	// If this is being updated by a bot from BotManager, the source should be
	// bot.session_id. That way, if two bots accidentally get the same name, we'll
	// know to reject updates from the older one.
	Source string `protobuf:"bytes,4,opt,name=source" json:"source,omitempty"`
}

Request message for `UpdateTaskResult`.

func (*UpdateTaskResultRequest) Descriptor

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

func (*UpdateTaskResultRequest) GetName

func (m *UpdateTaskResultRequest) GetName() string

func (*UpdateTaskResultRequest) GetResult

func (m *UpdateTaskResultRequest) GetResult() *TaskResult

func (*UpdateTaskResultRequest) GetSource

func (m *UpdateTaskResultRequest) GetSource() string

func (*UpdateTaskResultRequest) GetUpdateMask

func (*UpdateTaskResultRequest) ProtoMessage

func (*UpdateTaskResultRequest) ProtoMessage()

func (*UpdateTaskResultRequest) Reset

func (m *UpdateTaskResultRequest) Reset()

func (*UpdateTaskResultRequest) String

func (m *UpdateTaskResultRequest) String() string

type Worker

type Worker struct {
	// A list of devices; the first device is the primary device. See the `Device`
	// message for more information.
	Devices []*Device `protobuf:"bytes,1,rep,name=devices" json:"devices,omitempty"`
	// A worker may contain "global" properties. For example, certain machines
	// might be reserved for certain types of jobs, like short-running compilation
	// versus long-running integration tests. This property is known as a "pool"
	// and is not related to any one device within the worker; rather, it applies
	// to the worker as a whole.
	//
	// The behaviour of repeated keys is identical to that of Device.Property.
	Properties []*Worker_Property `protobuf:"bytes,2,rep,name=properties" json:"properties,omitempty"`
}

Describes a worker, which is a list of one or more devices and the connections between them. A device could be a computer, a phone, or even an accelerator like a GPU; it's up to the farm administrator to decide how to model their farm. For example, if a farm only has one type of GPU, the GPU could be modelled as a "has_gpu" property on its host computer; if it has many subproperties itself, it might be better to model it as a separate device.

The first device in the worker is the "primary device" - that is, the device running a bot and which is responsible for actually executing commands. All other devices are considered to be attached devices, and must be controllable by the primary device.

This message (and all its submessages) can be used in two contexts:

* Status: sent by the bot to report the current capabilities of the device to allow reservation matching. * Request: sent by a client to request a device with certain capabilities in a reservation.

Several of the fields in this message have different semantics depending on which of which of these contexts it is used. These semantics are described below.

Several messages in Worker and its submessages have the concept of keys and values, such as `Worker.Property` and `Device.Property`. All keys are simple strings, but certain keys are "standard" keys and should be broadly supported across farms and implementations; these are listed below each relevant message. Bot implementations or farm admins may add *additional* keys, but these SHOULD all begin with an underscore so they do not conflict with standard keys that may be added in the future.

Keys are not context sensitive.

See http://goo.gl/NurY8g for more information on the Worker message.

func (*Worker) Descriptor

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

func (*Worker) GetDevices

func (m *Worker) GetDevices() []*Device

func (*Worker) GetProperties

func (m *Worker) GetProperties() []*Worker_Property

func (*Worker) ProtoMessage

func (*Worker) ProtoMessage()

func (*Worker) Reset

func (m *Worker) Reset()

func (*Worker) String

func (m *Worker) String() string

type Worker_Property

type Worker_Property struct {
	// For general information on keys, see the documentation to `Worker`.
	//
	// The current set of standard keys are:
	//
	// * pool: different workers can be reserved for different purposes. For
	// example, an admin might want to segregate long-running integration tests
	// from short-running unit tests, so unit tests will always get some
	// throughput. To support this, the server can assign different values for
	// `pool` (such as "itest" and "utest") to different workers, and then have
	// jobs request workers from those pools.
	Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	// The property's value.
	Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

A global property; see the `properties` field for more information.

func (*Worker_Property) Descriptor

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

func (*Worker_Property) GetKey

func (m *Worker_Property) GetKey() string

func (*Worker_Property) GetValue

func (m *Worker_Property) GetValue() string

func (*Worker_Property) ProtoMessage

func (*Worker_Property) ProtoMessage()

func (*Worker_Property) Reset

func (m *Worker_Property) Reset()

func (*Worker_Property) String

func (m *Worker_Property) String() string

Jump to

Keyboard shortcuts

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