remoteworkers

package
v0.0.0-...-9d59e20 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BotStatus_name = map[int32]string{
		0: "BOT_STATUS_UNSPECIFIED",
		1: "OK",
		2: "UNHEALTHY",
		3: "HOST_REBOOTING",
		4: "BOT_TERMINATING",
		5: "INITIALIZING",
	}
	BotStatus_value = map[string]int32{
		"BOT_STATUS_UNSPECIFIED": 0,
		"OK":                     1,
		"UNHEALTHY":              2,
		"HOST_REBOOTING":         3,
		"BOT_TERMINATING":        4,
		"INITIALIZING":           5,
	}
)

Enum value maps for BotStatus.

View Source
var (
	LeaseState_name = map[int32]string{
		0: "LEASE_STATE_UNSPECIFIED",
		1: "PENDING",
		2: "ACTIVE",
		4: "COMPLETED",
		5: "CANCELLED",
	}
	LeaseState_value = map[string]int32{
		"LEASE_STATE_UNSPECIFIED": 0,
		"PENDING":                 1,
		"ACTIVE":                  2,
		"COMPLETED":               4,
		"CANCELLED":               5,
	}
)

Enum value maps for LeaseState.

View Source
var (
	AdminTemp_Command_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "BOT_UPDATE",
		2: "BOT_RESTART",
		3: "BOT_TERMINATE",
		4: "HOST_RESTART",
	}
	AdminTemp_Command_value = map[string]int32{
		"UNSPECIFIED":   0,
		"BOT_UPDATE":    1,
		"BOT_RESTART":   2,
		"BOT_TERMINATE": 3,
		"HOST_RESTART":  4,
	}
)

Enum value maps for AdminTemp_Command.

View Source
var File_google_devtools_remoteworkers_v1test2_bots_proto protoreflect.FileDescriptor
View Source
var File_google_devtools_remoteworkers_v1test2_command_proto protoreflect.FileDescriptor
View Source
var File_google_devtools_remoteworkers_v1test2_tasks_proto protoreflect.FileDescriptor
View Source
var File_google_devtools_remoteworkers_v1test2_worker_proto protoreflect.FileDescriptor

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 {

	// Required. The name of the task that will own the new log.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. 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,proto3" json:"log_id,omitempty"`
	// contains filtered or unexported fields
}

Request message for `AddTaskLog`.

func (*AddTaskLogRequest) Descriptor deprecated

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

Deprecated: Use AddTaskLogRequest.ProtoReflect.Descriptor instead.

func (*AddTaskLogRequest) GetLogId

func (x *AddTaskLogRequest) GetLogId() string

func (*AddTaskLogRequest) GetName

func (x *AddTaskLogRequest) GetName() string

func (*AddTaskLogRequest) ProtoMessage

func (*AddTaskLogRequest) ProtoMessage()

func (*AddTaskLogRequest) ProtoReflect

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

func (*AddTaskLogRequest) Reset

func (x *AddTaskLogRequest) Reset()

func (*AddTaskLogRequest) String

func (x *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,proto3" json:"handle,omitempty"`
	// contains filtered or unexported fields
}

Response message for `AddTaskLog`.

func (*AddTaskLogResponse) Descriptor deprecated

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

Deprecated: Use AddTaskLogResponse.ProtoReflect.Descriptor instead.

func (*AddTaskLogResponse) GetHandle

func (x *AddTaskLogResponse) GetHandle() string

func (*AddTaskLogResponse) ProtoMessage

func (*AddTaskLogResponse) ProtoMessage()

func (*AddTaskLogResponse) ProtoReflect

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

func (*AddTaskLogResponse) Reset

func (x *AddTaskLogResponse) Reset()

func (*AddTaskLogResponse) String

func (x *AddTaskLogResponse) String() string

type AdminTemp

type AdminTemp struct {

	// The admin action; see `Command` for legal values.
	Command AdminTemp_Command `` /* 129-byte string literal not displayed */
	// The argument to the admin action; see `Command` for semantics.
	Arg string `protobuf:"bytes,2,opt,name=arg,proto3" json:"arg,omitempty"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use AdminTemp.ProtoReflect.Descriptor instead.

func (*AdminTemp) GetArg

func (x *AdminTemp) GetArg() string

func (*AdminTemp) GetCommand

func (x *AdminTemp) GetCommand() AdminTemp_Command

func (*AdminTemp) ProtoMessage

func (*AdminTemp) ProtoMessage()

func (*AdminTemp) ProtoReflect

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

func (*AdminTemp) Reset

func (x *AdminTemp) Reset()

func (*AdminTemp) String

func (x *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) Descriptor

func (AdminTemp_Command) Enum

func (AdminTemp_Command) EnumDescriptor deprecated

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

Deprecated: Use AdminTemp_Command.Descriptor instead.

func (AdminTemp_Command) Number

func (AdminTemp_Command) String

func (x AdminTemp_Command) String() string

func (AdminTemp_Command) Type

type Blob

type Blob struct {

	// The digest of the blob. This should be verified by the receiver.
	Digest *Digest `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
	// The contents of the blob.
	Contents []byte `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"`
	// contains filtered or unexported fields
}

Describes a blob of binary content with its digest.

func (*Blob) Descriptor deprecated

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

Deprecated: Use Blob.ProtoReflect.Descriptor instead.

func (*Blob) GetContents

func (x *Blob) GetContents() []byte

func (*Blob) GetDigest

func (x *Blob) GetDigest() *Digest

func (*Blob) ProtoMessage

func (*Blob) ProtoMessage()

func (*Blob) ProtoReflect

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

func (*Blob) Reset

func (x *Blob) Reset()

func (*Blob) String

func (x *Blob) 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,proto3" 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,proto3" 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,proto3,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,proto3" 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,proto3" json:"leases,omitempty"`
	// The time at which this bot session will expire, unless the bot calls
	// UpdateBotSession again. Output only.
	ExpireTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expire_time,json=expireTime,proto3" 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,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use BotSession.ProtoReflect.Descriptor instead.

func (*BotSession) GetBotId

func (x *BotSession) GetBotId() string

func (*BotSession) GetExpireTime

func (x *BotSession) GetExpireTime() *timestamppb.Timestamp

func (*BotSession) GetLeases

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

func (*BotSession) GetName

func (x *BotSession) GetName() string

func (*BotSession) GetStatus

func (x *BotSession) GetStatus() BotStatus

func (*BotSession) GetVersion

func (x *BotSession) GetVersion() string

func (*BotSession) GetWorker

func (x *BotSession) GetWorker() *Worker

func (*BotSession) ProtoMessage

func (*BotSession) ProtoMessage()

func (*BotSession) ProtoReflect

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

func (*BotSession) Reset

func (x *BotSession) Reset()

func (*BotSession) String

func (x *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
	// The bot is initializing and is not ready to accept leases.
	BotStatus_INITIALIZING BotStatus = 5
)

func (BotStatus) Descriptor

func (BotStatus) Descriptor() protoreflect.EnumDescriptor

func (BotStatus) Enum

func (x BotStatus) Enum() *BotStatus

func (BotStatus) EnumDescriptor deprecated

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

Deprecated: Use BotStatus.Descriptor instead.

func (BotStatus) Number

func (x BotStatus) Number() protoreflect.EnumNumber

func (BotStatus) String

func (x BotStatus) String() string

func (BotStatus) Type

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)
}

BotsClient is the client API for Bots service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewBotsClient

func NewBotsClient(cc grpc.ClientConnInterface) 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)
}

BotsServer is the server API for Bots service.

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,proto3" 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,proto3" json:"outputs,omitempty"`
	// contains filtered or unexported fields
}

DEPRECATED - use CommandResult instead. Describes the actual outputs from the task.

func (*CommandOutputs) Descriptor deprecated

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

Deprecated: Use CommandOutputs.ProtoReflect.Descriptor instead.

func (*CommandOutputs) GetExitCode

func (x *CommandOutputs) GetExitCode() int32

func (*CommandOutputs) GetOutputs

func (x *CommandOutputs) GetOutputs() *Digest

func (*CommandOutputs) ProtoMessage

func (*CommandOutputs) ProtoMessage()

func (*CommandOutputs) ProtoReflect

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

func (*CommandOutputs) Reset

func (x *CommandOutputs) Reset()

func (*CommandOutputs) String

func (x *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 *durationpb.Duration `protobuf:"bytes,1,opt,name=duration,proto3" json:"duration,omitempty"`
	// The amount of time *not* spent executing the command (ie
	// uploading/downloading files).
	Overhead *durationpb.Duration `protobuf:"bytes,2,opt,name=overhead,proto3" json:"overhead,omitempty"`
	// contains filtered or unexported fields
}

DEPRECATED - use CommandResult instead. Can be used as part of CompleteRequest.metadata, or are part of a more sophisticated message.

func (*CommandOverhead) Descriptor deprecated

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

Deprecated: Use CommandOverhead.ProtoReflect.Descriptor instead.

func (*CommandOverhead) GetDuration

func (x *CommandOverhead) GetDuration() *durationpb.Duration

func (*CommandOverhead) GetOverhead

func (x *CommandOverhead) GetOverhead() *durationpb.Duration

func (*CommandOverhead) ProtoMessage

func (*CommandOverhead) ProtoMessage()

func (*CommandOverhead) ProtoReflect

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

func (*CommandOverhead) Reset

func (x *CommandOverhead) Reset()

func (*CommandOverhead) String

func (x *CommandOverhead) String() string

type CommandResult

type CommandResult struct {

	// An overall status for the command. For example, if the command timed out,
	// this might have a code of DEADLINE_EXCEEDED; if it was killed by the OS for
	// memory exhaustion, it might have a code of RESOURCE_EXHAUSTED.
	Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// The exit code of the process. An exit code of "0" should only be trusted if
	// `status` has a code of OK (otherwise it may simply be unset).
	ExitCode int32 `protobuf:"varint,2,opt,name=exit_code,json=exitCode,proto3" 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,3,opt,name=outputs,proto3" json:"outputs,omitempty"`
	// 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.
	//
	// Deprecated: Do not use.
	Duration *durationpb.Duration `protobuf:"bytes,4,opt,name=duration,proto3" json:"duration,omitempty"`
	// The amount of time *not* spent executing the command (ie
	// uploading/downloading files).
	//
	// Deprecated: Do not use.
	Overhead *durationpb.Duration `protobuf:"bytes,5,opt,name=overhead,proto3" json:"overhead,omitempty"`
	// Implementation-dependent metadata about the task. Both servers and bots
	// may define messages which can be encoded here; bots are free to provide
	// metadata in multiple formats, and servers are free to choose one or more
	// of the values to process and ignore others. In particular, it is *not*
	// considered an error for the bot to provide the server with a field that it
	// doesn't know about.
	Metadata []*anypb.Any `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

All information about the execution of a command, suitable for providing as the Bots interface's `Lease.result` field.

func (*CommandResult) Descriptor deprecated

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

Deprecated: Use CommandResult.ProtoReflect.Descriptor instead.

func (*CommandResult) GetDuration deprecated

func (x *CommandResult) GetDuration() *durationpb.Duration

Deprecated: Do not use.

func (*CommandResult) GetExitCode

func (x *CommandResult) GetExitCode() int32

func (*CommandResult) GetMetadata

func (x *CommandResult) GetMetadata() []*anypb.Any

func (*CommandResult) GetOutputs

func (x *CommandResult) GetOutputs() *Digest

func (*CommandResult) GetOverhead deprecated

func (x *CommandResult) GetOverhead() *durationpb.Duration

Deprecated: Do not use.

func (*CommandResult) GetStatus

func (x *CommandResult) GetStatus() *status.Status

func (*CommandResult) ProtoMessage

func (*CommandResult) ProtoMessage()

func (*CommandResult) ProtoReflect

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

func (*CommandResult) Reset

func (x *CommandResult) Reset()

func (*CommandResult) String

func (x *CommandResult) String() string

type CommandTask

type CommandTask struct {

	// The inputs to the task.
	Inputs *CommandTask_Inputs `protobuf:"bytes,1,opt,name=inputs,proto3" json:"inputs,omitempty"`
	// The expected outputs from the task.
	ExpectedOutputs *CommandTask_Outputs `protobuf:"bytes,4,opt,name=expected_outputs,json=expectedOutputs,proto3" json:"expected_outputs,omitempty"`
	// The timeouts of this task.
	Timeouts *CommandTask_Timeouts `protobuf:"bytes,5,opt,name=timeouts,proto3" json:"timeouts,omitempty"`
	// contains filtered or unexported fields
}

Describes a shell-style task to execute, suitable for providing as the Bots interface's `Lease.payload` field.

func (*CommandTask) Descriptor deprecated

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

Deprecated: Use CommandTask.ProtoReflect.Descriptor instead.

func (*CommandTask) GetExpectedOutputs

func (x *CommandTask) GetExpectedOutputs() *CommandTask_Outputs

func (*CommandTask) GetInputs

func (x *CommandTask) GetInputs() *CommandTask_Inputs

func (*CommandTask) GetTimeouts

func (x *CommandTask) GetTimeouts() *CommandTask_Timeouts

func (*CommandTask) ProtoMessage

func (*CommandTask) ProtoMessage()

func (*CommandTask) ProtoReflect

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

func (*CommandTask) Reset

func (x *CommandTask) Reset()

func (*CommandTask) String

func (x *CommandTask) String() string

type CommandTask_Inputs

type CommandTask_Inputs struct {

	// The command itself to run (e.g., argv).
	//
	// This field should be passed directly to the underlying operating system,
	// and so it must be sensible to that operating system. For example, on
	// Windows, the first argument might be "C:\Windows\System32\ping.exe" -
	// that is, using drive letters and backslashes. A command for a *nix
	// system, on the other hand, would use forward slashes.
	//
	// All other fields in the RWAPI must consistently use forward slashes,
	// since those fields may be interpretted by both the service and the bot.
	Arguments []string `protobuf:"bytes,1,rep,name=arguments,proto3" 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,proto3" json:"files,omitempty"`
	// Inline contents for blobs expected to be needed by the bot to execute the
	// task. For example, contents of entries in `files` or blobs that are
	// indirectly referenced by an entry there.
	//
	// The bot should check against this list before downloading required task
	// inputs to reduce the number of communications between itself and the
	// remote CAS server.
	InlineBlobs []*Blob `protobuf:"bytes,4,rep,name=inline_blobs,json=inlineBlobs,proto3" json:"inline_blobs,omitempty"`
	// All environment variables required by the task.
	EnvironmentVariables []*CommandTask_Inputs_EnvironmentVariable `protobuf:"bytes,3,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty"`
	// Directory from which a command is executed. It is a relative directory
	// with respect to the bot's working directory (i.e., "./"). If it is
	// non-empty, then it must exist under "./". Otherwise, "./" will be used.
	WorkingDirectory string `protobuf:"bytes,5,opt,name=working_directory,json=workingDirectory,proto3" json:"working_directory,omitempty"`
	// contains filtered or unexported fields
}

Describes the inputs to a shell-style task.

func (*CommandTask_Inputs) Descriptor deprecated

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

Deprecated: Use CommandTask_Inputs.ProtoReflect.Descriptor instead.

func (*CommandTask_Inputs) GetArguments

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

func (*CommandTask_Inputs) GetEnvironmentVariables

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

func (*CommandTask_Inputs) GetFiles

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

func (*CommandTask_Inputs) GetInlineBlobs

func (x *CommandTask_Inputs) GetInlineBlobs() []*Blob

func (*CommandTask_Inputs) GetWorkingDirectory

func (x *CommandTask_Inputs) GetWorkingDirectory() string

func (*CommandTask_Inputs) ProtoMessage

func (*CommandTask_Inputs) ProtoMessage()

func (*CommandTask_Inputs) ProtoReflect

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

func (*CommandTask_Inputs) Reset

func (x *CommandTask_Inputs) Reset()

func (*CommandTask_Inputs) String

func (x *CommandTask_Inputs) String() string

type CommandTask_Inputs_EnvironmentVariable

type CommandTask_Inputs_EnvironmentVariable struct {

	// The envvar name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The envvar value.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

An environment variable required by this task.

func (*CommandTask_Inputs_EnvironmentVariable) Descriptor deprecated

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

Deprecated: Use CommandTask_Inputs_EnvironmentVariable.ProtoReflect.Descriptor instead.

func (*CommandTask_Inputs_EnvironmentVariable) GetName

func (*CommandTask_Inputs_EnvironmentVariable) GetValue

func (*CommandTask_Inputs_EnvironmentVariable) ProtoMessage

func (*CommandTask_Inputs_EnvironmentVariable) ProtoReflect

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. All paths
	// MUST be delimited by forward slashes.
	Files []string `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
	// A list of expected directories, relative to the execution root. All paths
	// MUST be delimited by forward slashes.
	Directories []string `protobuf:"bytes,2,rep,name=directories,proto3" json:"directories,omitempty"`
	// The destination to which any stdout should be sent. The method by which
	// the bot should send the stream contents to that destination is not
	// defined in this API. As examples, the destination could be a file
	// referenced in the `files` field in this message, or it could be a URI
	// that must be written via the ByteStream API.
	StdoutDestination string `protobuf:"bytes,3,opt,name=stdout_destination,json=stdoutDestination,proto3" json:"stdout_destination,omitempty"`
	// The destination to which any stderr should be sent. The method by which
	// the bot should send the stream contents to that destination is not
	// defined in this API. As examples, the destination could be a file
	// referenced in the `files` field in this message, or it could be a URI
	// that must be written via the ByteStream API.
	StderrDestination string `protobuf:"bytes,4,opt,name=stderr_destination,json=stderrDestination,proto3" json:"stderr_destination,omitempty"`
	// contains filtered or unexported fields
}

Describes the expected outputs of the command.

func (*CommandTask_Outputs) Descriptor deprecated

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

Deprecated: Use CommandTask_Outputs.ProtoReflect.Descriptor instead.

func (*CommandTask_Outputs) GetDirectories

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

func (*CommandTask_Outputs) GetFiles

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

func (*CommandTask_Outputs) GetStderrDestination

func (x *CommandTask_Outputs) GetStderrDestination() string

func (*CommandTask_Outputs) GetStdoutDestination

func (x *CommandTask_Outputs) GetStdoutDestination() string

func (*CommandTask_Outputs) ProtoMessage

func (*CommandTask_Outputs) ProtoMessage()

func (*CommandTask_Outputs) ProtoReflect

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

func (*CommandTask_Outputs) Reset

func (x *CommandTask_Outputs) Reset()

func (*CommandTask_Outputs) String

func (x *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 *durationpb.Duration `protobuf:"bytes,1,opt,name=execution,proto3" 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 *durationpb.Duration `protobuf:"bytes,2,opt,name=idle,proto3" 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 *durationpb.Duration `protobuf:"bytes,3,opt,name=shutdown,proto3" json:"shutdown,omitempty"`
	// contains filtered or unexported fields
}

Describes the timeouts associated with this task.

func (*CommandTask_Timeouts) Descriptor deprecated

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

Deprecated: Use CommandTask_Timeouts.ProtoReflect.Descriptor instead.

func (*CommandTask_Timeouts) GetExecution

func (x *CommandTask_Timeouts) GetExecution() *durationpb.Duration

func (*CommandTask_Timeouts) GetIdle

func (*CommandTask_Timeouts) GetShutdown

func (x *CommandTask_Timeouts) GetShutdown() *durationpb.Duration

func (*CommandTask_Timeouts) ProtoMessage

func (*CommandTask_Timeouts) ProtoMessage()

func (*CommandTask_Timeouts) ProtoReflect

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

func (*CommandTask_Timeouts) Reset

func (x *CommandTask_Timeouts) Reset()

func (*CommandTask_Timeouts) String

func (x *CommandTask_Timeouts) String() string

type CreateBotSessionRequest

type CreateBotSessionRequest struct {

	// Required. The farm resource.
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. The bot session to create. Server-assigned fields like name must
	// be unset.
	BotSession *BotSession `protobuf:"bytes,2,opt,name=bot_session,json=botSession,proto3" json:"bot_session,omitempty"`
	// contains filtered or unexported fields
}

Request message for CreateBotSession.

func (*CreateBotSessionRequest) Descriptor deprecated

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

Deprecated: Use CreateBotSessionRequest.ProtoReflect.Descriptor instead.

func (*CreateBotSessionRequest) GetBotSession

func (x *CreateBotSessionRequest) GetBotSession() *BotSession

func (*CreateBotSessionRequest) GetParent

func (x *CreateBotSessionRequest) GetParent() string

func (*CreateBotSessionRequest) ProtoMessage

func (*CreateBotSessionRequest) ProtoMessage()

func (*CreateBotSessionRequest) ProtoReflect

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

func (*CreateBotSessionRequest) Reset

func (x *CreateBotSessionRequest) Reset()

func (*CreateBotSessionRequest) String

func (x *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,proto3" 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,proto3" json:"properties,omitempty"`
	// contains filtered or unexported fields
}

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

func (*Device) Descriptor deprecated

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

Deprecated: Use Device.ProtoReflect.Descriptor instead.

func (*Device) GetHandle

func (x *Device) GetHandle() string

func (*Device) GetProperties

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

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) ProtoReflect

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

func (*Device) Reset

func (x *Device) Reset()

func (*Device) String

func (x *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,proto3" json:"key,omitempty"`
	// The property's value.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

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

func (*Device_Property) Descriptor deprecated

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

Deprecated: Use Device_Property.ProtoReflect.Descriptor instead.

func (*Device_Property) GetKey

func (x *Device_Property) GetKey() string

func (*Device_Property) GetValue

func (x *Device_Property) GetValue() string

func (*Device_Property) ProtoMessage

func (*Device_Property) ProtoMessage()

func (*Device_Property) ProtoReflect

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

func (*Device_Property) Reset

func (x *Device_Property) Reset()

func (*Device_Property) String

func (x *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,proto3" 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,proto3" json:"size_bytes,omitempty"`
	// contains filtered or unexported fields
}

The CommandTask and CommandResult messages assume the existence of a service that can serve blobs of content, identified by a hash and size known as a "digest." The method by which these blobs may be retrieved is not specified here, but a model implementation is in the Remote Execution API's "ContentAddressibleStorage" interface.

In the context of the RWAPI, a Digest will virtually always refer to the contents of a file or a directory. The latter is represented by the byte-encoded Directory message.

func (*Digest) Descriptor deprecated

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

Deprecated: Use Digest.ProtoReflect.Descriptor instead.

func (*Digest) GetHash

func (x *Digest) GetHash() string

func (*Digest) GetSizeBytes

func (x *Digest) GetSizeBytes() int64

func (*Digest) ProtoMessage

func (*Digest) ProtoMessage()

func (*Digest) ProtoReflect

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

func (*Digest) Reset

func (x *Digest) Reset()

func (*Digest) String

func (x *Digest) String() string

type Directory

type Directory struct {

	// The files in this directory
	Files []*FileMetadata `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
	// Any subdirectories
	Directories []*DirectoryMetadata `protobuf:"bytes,2,rep,name=directories,proto3" json:"directories,omitempty"`
	// contains filtered or unexported fields
}

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

func (*Directory) Descriptor deprecated

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

Deprecated: Use Directory.ProtoReflect.Descriptor instead.

func (*Directory) GetDirectories

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

func (*Directory) GetFiles

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

func (*Directory) ProtoMessage

func (*Directory) ProtoMessage()

func (*Directory) ProtoReflect

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

func (*Directory) Reset

func (x *Directory) Reset()

func (*Directory) String

func (x *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,proto3" 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,proto3" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

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

func (*DirectoryMetadata) Descriptor deprecated

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

Deprecated: Use DirectoryMetadata.ProtoReflect.Descriptor instead.

func (*DirectoryMetadata) GetDigest

func (x *DirectoryMetadata) GetDigest() *Digest

func (*DirectoryMetadata) GetPath

func (x *DirectoryMetadata) GetPath() string

func (*DirectoryMetadata) ProtoMessage

func (*DirectoryMetadata) ProtoMessage()

func (*DirectoryMetadata) ProtoReflect

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

func (*DirectoryMetadata) Reset

func (x *DirectoryMetadata) Reset()

func (*DirectoryMetadata) String

func (x *DirectoryMetadata) String() string

type FileMetadata

type FileMetadata struct {

	// The path of this file. If this message is part of the
	// CommandOutputs.outputs 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. All paths MUST be delimited by forward slashes.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" 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,proto3" 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,proto3" json:"is_executable,omitempty"`
	// contains filtered or unexported fields
}

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

func (*FileMetadata) Descriptor deprecated

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

Deprecated: Use FileMetadata.ProtoReflect.Descriptor instead.

func (*FileMetadata) GetContents

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

func (*FileMetadata) GetDigest

func (x *FileMetadata) GetDigest() *Digest

func (*FileMetadata) GetIsExecutable

func (x *FileMetadata) GetIsExecutable() bool

func (*FileMetadata) GetPath

func (x *FileMetadata) GetPath() string

func (*FileMetadata) ProtoMessage

func (*FileMetadata) ProtoMessage()

func (*FileMetadata) ProtoReflect

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

func (*FileMetadata) Reset

func (x *FileMetadata) Reset()

func (*FileMetadata) String

func (x *FileMetadata) String() string

type GetTaskRequest

type GetTaskRequest struct {

	// Required. The task name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request message for `GetTask`.

func (*GetTaskRequest) Descriptor deprecated

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

Deprecated: Use GetTaskRequest.ProtoReflect.Descriptor instead.

func (*GetTaskRequest) GetName

func (x *GetTaskRequest) GetName() string

func (*GetTaskRequest) ProtoMessage

func (*GetTaskRequest) ProtoMessage()

func (*GetTaskRequest) ProtoReflect

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

func (*GetTaskRequest) Reset

func (x *GetTaskRequest) Reset()

func (*GetTaskRequest) String

func (x *GetTaskRequest) String() string

type Lease

type Lease struct {

	// A short string uniquely identifing the lease within this bot session.
	Id string `protobuf:"bytes,7,opt,name=id,proto3" json:"id,omitempty"`
	// The actual work to be performed, if any. May be omitted by the server if
	// the lease is not in the `PENDING` state. The message must be meaningful to
	// the bot. Output only (must only be set by the server).
	Payload *anypb.Any `protobuf:"bytes,8,opt,name=payload,proto3" json:"payload,omitempty"`
	// Any result the bot wishes to provide about the lease. Must not be changed
	// after the first call with the lease in the `COMPLETED` or `CANCELLED`
	// state. Input only (must only be set by the bot, will not be echoed by the
	// server).
	Result *anypb.Any `protobuf:"bytes,9,opt,name=result,proto3" json:"result,omitempty"`
	// The state of the lease. See LeaseState for more information.
	State LeaseState `protobuf:"varint,2,opt,name=state,proto3,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
	// communicated via the `result` field.
	Status *status.Status `protobuf:"bytes,3,opt,name=status,proto3" 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,proto3" 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 *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`
	// DEPRECATED. The assignment should be provided to the bot via the `payload`
	// field. Clients that wish to use a simple name (such as a queue of work
	// provided elsewhere) should define a custom message type and encode it into
	// `payload`.
	//
	// Deprecated: Do not use.
	Assignment string `protobuf:"bytes,1,opt,name=assignment,proto3" json:"assignment,omitempty"`
	// DEPRECATED. Use `payload` instead.
	//
	// Deprecated: Do not use.
	InlineAssignment *anypb.Any `protobuf:"bytes,6,opt,name=inline_assignment,json=inlineAssignment,proto3" json:"inline_assignment,omitempty"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use Lease.ProtoReflect.Descriptor instead.

func (*Lease) GetAssignment deprecated

func (x *Lease) GetAssignment() string

Deprecated: Do not use.

func (*Lease) GetExpireTime

func (x *Lease) GetExpireTime() *timestamppb.Timestamp

func (*Lease) GetId

func (x *Lease) GetId() string

func (*Lease) GetInlineAssignment deprecated

func (x *Lease) GetInlineAssignment() *anypb.Any

Deprecated: Do not use.

func (*Lease) GetPayload

func (x *Lease) GetPayload() *anypb.Any

func (*Lease) GetRequirements

func (x *Lease) GetRequirements() *Worker

func (*Lease) GetResult

func (x *Lease) GetResult() *anypb.Any

func (*Lease) GetState

func (x *Lease) GetState() LeaseState

func (*Lease) GetStatus

func (x *Lease) GetStatus() *status.Status

func (*Lease) ProtoMessage

func (*Lease) ProtoMessage()

func (*Lease) ProtoReflect

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

func (*Lease) Reset

func (x *Lease) Reset()

func (*Lease) String

func (x *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) Descriptor

func (LeaseState) Descriptor() protoreflect.EnumDescriptor

func (LeaseState) Enum

func (x LeaseState) Enum() *LeaseState

func (LeaseState) EnumDescriptor deprecated

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

Deprecated: Use LeaseState.Descriptor instead.

func (LeaseState) Number

func (x LeaseState) Number() protoreflect.EnumNumber

func (LeaseState) String

func (x LeaseState) String() string

func (LeaseState) Type

type Task

type Task struct {

	// The name of this task. Output only.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The actual task to perform. For example, this could be CommandTask to run a
	// command line.
	Description *any.Any `protobuf:"bytes,2,opt,name=description,proto3" 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 `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

DEPRECATED - use Lease.payload instead. 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 deprecated

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

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetDescription

func (x *Task) GetDescription() *any.Any

func (*Task) GetLogs

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

func (*Task) GetName

func (x *Task) GetName() string

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

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

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type TaskResult

type TaskResult struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" 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,proto3" 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 *status.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	// Any non-log output, such as output files and exit codes. See
	// CommandResult as an example.
	Output *any.Any `protobuf:"bytes,4,opt,name=output,proto3" json:"output,omitempty"`
	// Any information about how the command was executed, eg runtime. See
	// CommandOverhead as an example.
	Meta *any.Any `protobuf:"bytes,5,opt,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

DEPRECATED - use Lease.assignment_result instead. The result and metadata of the task.

func (*TaskResult) Descriptor deprecated

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

Deprecated: Use TaskResult.ProtoReflect.Descriptor instead.

func (*TaskResult) GetComplete

func (x *TaskResult) GetComplete() bool

func (*TaskResult) GetMeta

func (x *TaskResult) GetMeta() *any.Any

func (*TaskResult) GetName

func (x *TaskResult) GetName() string

func (*TaskResult) GetOutput

func (x *TaskResult) GetOutput() *any.Any

func (*TaskResult) GetStatus

func (x *TaskResult) GetStatus() *status.Status

func (*TaskResult) ProtoMessage

func (*TaskResult) ProtoMessage()

func (*TaskResult) ProtoReflect

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

func (*TaskResult) Reset

func (x *TaskResult) Reset()

func (*TaskResult) String

func (x *TaskResult) String() string

type TasksClient

type TasksClient interface {
	// DEPRECATED - use Lease.payload instead.
	// 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)
	// DEPRECATED - use Lease.result instead.
	// UpdateTaskResult updates the result.
	UpdateTaskResult(ctx context.Context, in *UpdateTaskResultRequest, opts ...grpc.CallOption) (*TaskResult, error)
	// DEPRECATED - precreate logs prior to sending to bot.
	// 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)
}

TasksClient is the client API for Tasks service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTasksClient

func NewTasksClient(cc grpc.ClientConnInterface) TasksClient

type TasksServer

type TasksServer interface {
	// DEPRECATED - use Lease.payload instead.
	// 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)
	// DEPRECATED - use Lease.result instead.
	// UpdateTaskResult updates the result.
	UpdateTaskResult(context.Context, *UpdateTaskResultRequest) (*TaskResult, error)
	// DEPRECATED - precreate logs prior to sending to bot.
	// 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)
}

TasksServer is the server API for Tasks service.

type UnimplementedBotsServer

type UnimplementedBotsServer struct {
}

UnimplementedBotsServer can be embedded to have forward compatible implementations.

func (*UnimplementedBotsServer) CreateBotSession

func (*UnimplementedBotsServer) UpdateBotSession

type UnimplementedTasksServer

type UnimplementedTasksServer struct {
}

UnimplementedTasksServer can be embedded to have forward compatible implementations.

func (*UnimplementedTasksServer) AddTaskLog

func (*UnimplementedTasksServer) GetTask

func (*UnimplementedTasksServer) UpdateTaskResult

type UpdateBotSessionRequest

type UpdateBotSessionRequest struct {

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

Request message for UpdateBotSession.

func (*UpdateBotSessionRequest) Descriptor deprecated

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

Deprecated: Use UpdateBotSessionRequest.ProtoReflect.Descriptor instead.

func (*UpdateBotSessionRequest) GetBotSession

func (x *UpdateBotSessionRequest) GetBotSession() *BotSession

func (*UpdateBotSessionRequest) GetName

func (x *UpdateBotSessionRequest) GetName() string

func (*UpdateBotSessionRequest) GetUpdateMask

func (x *UpdateBotSessionRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateBotSessionRequest) ProtoMessage

func (*UpdateBotSessionRequest) ProtoMessage()

func (*UpdateBotSessionRequest) ProtoReflect

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

func (*UpdateBotSessionRequest) Reset

func (x *UpdateBotSessionRequest) Reset()

func (*UpdateBotSessionRequest) String

func (x *UpdateBotSessionRequest) String() string

type UpdateTaskResultRequest

type UpdateTaskResultRequest struct {

	// Required. The task result name; must match `result.name`.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. The result being updated.
	Result *TaskResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	// Required. The fields within `result` that are specified.
	UpdateMask *field_mask.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// Required. 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,proto3" json:"source,omitempty"`
	// contains filtered or unexported fields
}

Request message for `UpdateTaskResult`.

func (*UpdateTaskResultRequest) Descriptor deprecated

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

Deprecated: Use UpdateTaskResultRequest.ProtoReflect.Descriptor instead.

func (*UpdateTaskResultRequest) GetName

func (x *UpdateTaskResultRequest) GetName() string

func (*UpdateTaskResultRequest) GetResult

func (x *UpdateTaskResultRequest) GetResult() *TaskResult

func (*UpdateTaskResultRequest) GetSource

func (x *UpdateTaskResultRequest) GetSource() string

func (*UpdateTaskResultRequest) GetUpdateMask

func (x *UpdateTaskResultRequest) GetUpdateMask() *field_mask.FieldMask

func (*UpdateTaskResultRequest) ProtoMessage

func (*UpdateTaskResultRequest) ProtoMessage()

func (*UpdateTaskResultRequest) ProtoReflect

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

func (*UpdateTaskResultRequest) Reset

func (x *UpdateTaskResultRequest) Reset()

func (*UpdateTaskResultRequest) String

func (x *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,proto3" 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,proto3" json:"properties,omitempty"`
	// Bots can be configured in certain ways when accepting leases. For example,
	// many leases are executed inside a Docker container. To support this, the
	// bot needs to be able to report that it has Docker installed (and knows how
	// to execute something inside a container), and the task submitter needs to
	// specify which image should be used to start the container. Similarly, a
	// lease may be able to run as one of several users on the worker; in such
	// cases, the bot needs to report what users are available, and the submitter
	// needs to choose one.
	//
	// Therefore, when this message is reported by the bot to the service, each
	// key represents a *type* of configuration that the bot knows how to set,
	// while each *value* represents a legal value for that configuration (the
	// empty string is interpretted as a wildcard, such as for Docker images).
	// When this message is sent by the server to the bot in the context of a
	// lease, it represents a command to the bot to apply the setting. Keys may
	// be repeated during reporting but not in a lease.
	Configs []*Worker_Config `protobuf:"bytes,3,rep,name=configs,proto3" json:"configs,omitempty"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use Worker.ProtoReflect.Descriptor instead.

func (*Worker) GetConfigs

func (x *Worker) GetConfigs() []*Worker_Config

func (*Worker) GetDevices

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

func (*Worker) GetProperties

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

func (*Worker) ProtoMessage

func (*Worker) ProtoMessage()

func (*Worker) ProtoReflect

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

func (*Worker) Reset

func (x *Worker) Reset()

func (*Worker) String

func (x *Worker) String() string

type Worker_Config

type Worker_Config struct {

	// For general information on keys, see the documentation to `Worker`.
	//
	// The current set of standard keys are:
	//
	// * DockerImage: the image of the container. When being reported by the
	// bot, the empty value should always be included if the bot is able to pull
	// its own images; the bot may optionally *also* report images that are
	// present in its cache. When being requested in a lease, the value is the
	// URI of the image (eg `gcr.io/user/image@sha256:hash`).
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The configuration's value.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

A configuration request or report; see the `configs` field for more information.

func (*Worker_Config) Descriptor deprecated

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

Deprecated: Use Worker_Config.ProtoReflect.Descriptor instead.

func (*Worker_Config) GetKey

func (x *Worker_Config) GetKey() string

func (*Worker_Config) GetValue

func (x *Worker_Config) GetValue() string

func (*Worker_Config) ProtoMessage

func (*Worker_Config) ProtoMessage()

func (*Worker_Config) ProtoReflect

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

func (*Worker_Config) Reset

func (x *Worker_Config) Reset()

func (*Worker_Config) String

func (x *Worker_Config) 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,proto3" json:"key,omitempty"`
	// The property's value.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

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

func (*Worker_Property) Descriptor deprecated

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

Deprecated: Use Worker_Property.ProtoReflect.Descriptor instead.

func (*Worker_Property) GetKey

func (x *Worker_Property) GetKey() string

func (*Worker_Property) GetValue

func (x *Worker_Property) GetValue() string

func (*Worker_Property) ProtoMessage

func (*Worker_Property) ProtoMessage()

func (*Worker_Property) ProtoReflect

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

func (*Worker_Property) Reset

func (x *Worker_Property) Reset()

func (*Worker_Property) String

func (x *Worker_Property) String() string

Jump to

Keyboard shortcuts

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