internalspb

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package internalspb contains protobuf messages used internally by Swarming.

Index

Constants

View Source
const (
	Internals_ExpireSlice_FullMethodName = "/swarming.internals.rbe.Internals/ExpireSlice"
)

Variables

View Source
var (
	ExpireSliceRequest_Reason_name = map[int32]string{
		0: "REASON_UNSPECIFIED",
		1: "NO_RESOURCE",
		2: "PERMISSION_DENIED",
		3: "INVALID_ARGUMENT",
		4: "BOT_INTERNAL_ERROR",
		5: "EXPIRED",
	}
	ExpireSliceRequest_Reason_value = map[string]int32{
		"REASON_UNSPECIFIED": 0,
		"NO_RESOURCE":        1,
		"PERMISSION_DENIED":  2,
		"INVALID_ARGUMENT":   3,
		"BOT_INTERNAL_ERROR": 4,
		"EXPIRED":            5,
	}
)

Enum value maps for ExpireSliceRequest_Reason.

View Source
var File_go_chromium_org_luci_swarming_proto_internals_rbe_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_swarming_proto_internals_session_proto protoreflect.FileDescriptor
View Source
var Internals_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "swarming.internals.rbe.Internals",
	HandlerType: (*InternalsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ExpireSlice",
			Handler:    _Internals_ExpireSlice_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "go.chromium.org/luci/swarming/proto/internals/rbe.proto",
}

Internals_ServiceDesc is the grpc.ServiceDesc for Internals service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterInternalsServer

func RegisterInternalsServer(s grpc.ServiceRegistrar, srv InternalsServer)

Types

type BotConfig

type BotConfig struct {

	// When this config should no longer be used.
	Expiry *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// Information for logs and debugging.
	DebugInfo *DebugInfo `protobuf:"bytes,2,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
	// Instructions on how to authenticate the bot.
	BotAuth []*config.BotAuth `protobuf:"bytes,3,rep,name=bot_auth,json=botAuth,proto3" json:"bot_auth,omitempty"`
	// A service account to use to authenticate calls to system-level services.
	SystemServiceAccount string `protobuf:"bytes,4,opt,name=system_service_account,json=systemServiceAccount,proto3" json:"system_service_account,omitempty"`
	// The cloud project id where the bot saves its logs.
	LogsCloudProject string `protobuf:"bytes,5,opt,name=logs_cloud_project,json=logsCloudProject,proto3" json:"logs_cloud_project,omitempty"`
	// The RBE instance to establish an RBE session at.
	RbeInstance string `protobuf:"bytes,6,opt,name=rbe_instance,json=rbeInstance,proto3" json:"rbe_instance,omitempty"`
	// contains filtered or unexported fields
}

BotConfig is a snapshot of the server's bots.cfg the last time /poll was called.

It is used to authenticate the bot while it runs a task. That way even if the bot is removed from the server config, it still is able to finish its current task (as long as BotConfig hasn't expired yet or the bot session hasn't been closed on the server).

Its fields are taken from swarming.config.BotGroup proto that matches the bot. Only fields that are needed to finishing running a task are included.

func (*BotConfig) Descriptor deprecated

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

Deprecated: Use BotConfig.ProtoReflect.Descriptor instead.

func (*BotConfig) GetBotAuth

func (x *BotConfig) GetBotAuth() []*config.BotAuth

func (*BotConfig) GetDebugInfo

func (x *BotConfig) GetDebugInfo() *DebugInfo

func (*BotConfig) GetExpiry

func (x *BotConfig) GetExpiry() *timestamppb.Timestamp

func (*BotConfig) GetLogsCloudProject

func (x *BotConfig) GetLogsCloudProject() string

func (*BotConfig) GetRbeInstance

func (x *BotConfig) GetRbeInstance() string

func (*BotConfig) GetSystemServiceAccount

func (x *BotConfig) GetSystemServiceAccount() string

func (*BotConfig) ProtoMessage

func (*BotConfig) ProtoMessage()

func (*BotConfig) ProtoReflect

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

func (*BotConfig) Reset

func (x *BotConfig) Reset()

func (*BotConfig) String

func (x *BotConfig) String() string

type CancelRBETask

type CancelRBETask struct {

	// Full RBE instance ID with the reservation, extracted from TaskRequest.
	RbeInstance string `protobuf:"bytes,1,opt,name=rbe_instance,json=rbeInstance,proto3" json:"rbe_instance,omitempty"`
	// Reservation to cancel (scoped to the instance).
	ReservationId string                   `protobuf:"bytes,2,opt,name=reservation_id,json=reservationId,proto3" json:"reservation_id,omitempty"`
	DebugInfo     *CancelRBETask_DebugInfo `protobuf:"bytes,3,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
	// contains filtered or unexported fields
}

CancelRBETask describes payload of `rbe-cancel` TQ tasks.

It is submitted into `rbe-cancel` Cloud Tasks queue and processed by the Go side (resulting in cancellation of an RBE reservation).

func (*CancelRBETask) Descriptor deprecated

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

Deprecated: Use CancelRBETask.ProtoReflect.Descriptor instead.

func (*CancelRBETask) GetDebugInfo

func (x *CancelRBETask) GetDebugInfo() *CancelRBETask_DebugInfo

func (*CancelRBETask) GetRbeInstance

func (x *CancelRBETask) GetRbeInstance() string

func (*CancelRBETask) GetReservationId

func (x *CancelRBETask) GetReservationId() string

func (*CancelRBETask) ProtoMessage

func (*CancelRBETask) ProtoMessage()

func (*CancelRBETask) ProtoReflect

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

func (*CancelRBETask) Reset

func (x *CancelRBETask) Reset()

func (*CancelRBETask) String

func (x *CancelRBETask) String() string

type CancelRBETask_DebugInfo

type CancelRBETask_DebugInfo struct {
	Created           *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"`                                                // when this message was created
	PySwarmingVersion string                 `protobuf:"bytes,2,opt,name=py_swarming_version,json=pySwarmingVersion,proto3" json:"py_swarming_version,omitempty"` // version of the Python Swarming
	TaskName          string                 `protobuf:"bytes,3,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"`                              // the user-supplied task name FYI
	// contains filtered or unexported fields
}

Optional information used for debugging and tracing purposes.

func (*CancelRBETask_DebugInfo) Descriptor deprecated

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

Deprecated: Use CancelRBETask_DebugInfo.ProtoReflect.Descriptor instead.

func (*CancelRBETask_DebugInfo) GetCreated

func (*CancelRBETask_DebugInfo) GetPySwarmingVersion

func (x *CancelRBETask_DebugInfo) GetPySwarmingVersion() string

func (*CancelRBETask_DebugInfo) GetTaskName

func (x *CancelRBETask_DebugInfo) GetTaskName() string

func (*CancelRBETask_DebugInfo) ProtoMessage

func (*CancelRBETask_DebugInfo) ProtoMessage()

func (*CancelRBETask_DebugInfo) ProtoReflect

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

func (*CancelRBETask_DebugInfo) Reset

func (x *CancelRBETask_DebugInfo) Reset()

func (*CancelRBETask_DebugInfo) String

func (x *CancelRBETask_DebugInfo) String() string

type DebugInfo

type DebugInfo struct {

	// When this message was created.
	Created *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"`
	// Version of the Swarming server that generated the message.
	SwarmingVersion string `protobuf:"bytes,2,opt,name=swarming_version,json=swarmingVersion,proto3" json:"swarming_version,omitempty"`
	// Trace ID of the request that generated the message.
	RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// contains filtered or unexported fields
}

DebugInfo captures when and where a message was created, for logs.

func (*DebugInfo) Descriptor deprecated

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

Deprecated: Use DebugInfo.ProtoReflect.Descriptor instead.

func (*DebugInfo) GetCreated

func (x *DebugInfo) GetCreated() *timestamppb.Timestamp

func (*DebugInfo) GetRequestId

func (x *DebugInfo) GetRequestId() string

func (*DebugInfo) GetSwarmingVersion

func (x *DebugInfo) GetSwarmingVersion() string

func (*DebugInfo) ProtoMessage

func (*DebugInfo) ProtoMessage()

func (*DebugInfo) ProtoReflect

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

func (*DebugInfo) Reset

func (x *DebugInfo) Reset()

func (*DebugInfo) String

func (x *DebugInfo) String() string

type EnqueueRBETask

type EnqueueRBETask struct {

	// Payload of the new RBE reservation. It will eventually be routed to a bot.
	Payload *TaskPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// Full RBE instance ID to submit this task to, extracted from TaskRequest.
	RbeInstance string `protobuf:"bytes,2,opt,name=rbe_instance,json=rbeInstance,proto3" json:"rbe_instance,omitempty"`
	// When this particular slice expires, extracted from TaskToRunShard.
	Expiry *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// A bot that should execute this slice (if any), extracted from TaskSlice.
	RequestedBotId string                       `protobuf:"bytes,4,opt,name=requested_bot_id,json=requestedBotId,proto3" json:"requested_bot_id,omitempty"`
	Constraints    []*EnqueueRBETask_Constraint `protobuf:"bytes,5,rep,name=constraints,proto3" json:"constraints,omitempty"`
	// Swarming task priority, as submitted by the client.
	Priority int32 `protobuf:"varint,6,opt,name=priority,proto3" json:"priority,omitempty"`
	// Swarming scheduling algorithm, as specified in pools.cfg.
	SchedulingAlgorithm config.Pool_SchedulingAlgorithm `` /* 165-byte string literal not displayed */
	// How long the task is allowed to run once it starts on the bot.
	ExecutionTimeout *durationpb.Duration `protobuf:"bytes,8,opt,name=execution_timeout,json=executionTimeout,proto3" json:"execution_timeout,omitempty"`
	// contains filtered or unexported fields
}

EnqueueRBETask describes payload of `rbe-enqueue` TQ tasks.

It is submitted into `rbe-enqueue` Cloud Tasks queue by the Python side and processed by the Go side (resulting in a new RBE reservation on success).

func (*EnqueueRBETask) Descriptor deprecated

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

Deprecated: Use EnqueueRBETask.ProtoReflect.Descriptor instead.

func (*EnqueueRBETask) GetConstraints

func (x *EnqueueRBETask) GetConstraints() []*EnqueueRBETask_Constraint

func (*EnqueueRBETask) GetExecutionTimeout

func (x *EnqueueRBETask) GetExecutionTimeout() *durationpb.Duration

func (*EnqueueRBETask) GetExpiry

func (x *EnqueueRBETask) GetExpiry() *timestamppb.Timestamp

func (*EnqueueRBETask) GetPayload

func (x *EnqueueRBETask) GetPayload() *TaskPayload

func (*EnqueueRBETask) GetPriority

func (x *EnqueueRBETask) GetPriority() int32

func (*EnqueueRBETask) GetRbeInstance

func (x *EnqueueRBETask) GetRbeInstance() string

func (*EnqueueRBETask) GetRequestedBotId

func (x *EnqueueRBETask) GetRequestedBotId() string

func (*EnqueueRBETask) GetSchedulingAlgorithm

func (x *EnqueueRBETask) GetSchedulingAlgorithm() config.Pool_SchedulingAlgorithm

func (*EnqueueRBETask) ProtoMessage

func (*EnqueueRBETask) ProtoMessage()

func (*EnqueueRBETask) ProtoReflect

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

func (*EnqueueRBETask) Reset

func (x *EnqueueRBETask) Reset()

func (*EnqueueRBETask) String

func (x *EnqueueRBETask) String() string

type EnqueueRBETask_Constraint

type EnqueueRBETask_Constraint struct {

	// The dimension key e.g. "python_version".
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Allowed dimension values to satisfy the constraint, e.g. ["3.8", "3.9"].
	AllowedValues []string `protobuf:"bytes,2,rep,name=allowed_values,json=allowedValues,proto3" json:"allowed_values,omitempty"`
	// contains filtered or unexported fields
}

Constraints on dimensions reported by a matching bot (ANDed together).

func (*EnqueueRBETask_Constraint) Descriptor deprecated

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

Deprecated: Use EnqueueRBETask_Constraint.ProtoReflect.Descriptor instead.

func (*EnqueueRBETask_Constraint) GetAllowedValues

func (x *EnqueueRBETask_Constraint) GetAllowedValues() []string

func (*EnqueueRBETask_Constraint) GetKey

func (x *EnqueueRBETask_Constraint) GetKey() string

func (*EnqueueRBETask_Constraint) ProtoMessage

func (*EnqueueRBETask_Constraint) ProtoMessage()

func (*EnqueueRBETask_Constraint) ProtoReflect

func (*EnqueueRBETask_Constraint) Reset

func (x *EnqueueRBETask_Constraint) Reset()

func (*EnqueueRBETask_Constraint) String

func (x *EnqueueRBETask_Constraint) String() string

type ExpireSliceRequest

type ExpireSliceRequest struct {

	// Swarming task ID (aka TaskResultSummary packed id), identifies TaskRequest.
	TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// Shard index of TaskToRunShardXXX entity class.
	TaskToRunShard int32 `protobuf:"varint,2,opt,name=task_to_run_shard,json=taskToRunShard,proto3" json:"task_to_run_shard,omitempty"`
	// Datastore ID of TaskToRunShardXXX entity (a child of the TaskRequest).
	TaskToRunId int64                     `protobuf:"varint,3,opt,name=task_to_run_id,json=taskToRunId,proto3" json:"task_to_run_id,omitempty"`
	Reason      ExpireSliceRequest_Reason `protobuf:"varint,4,opt,name=reason,proto3,enum=swarming.internals.rbe.ExpireSliceRequest_Reason" json:"reason,omitempty"`
	Details     string                    `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"`
	// contains filtered or unexported fields
}

Body of ExpireSlice internal RPC call.

It identifies a concrete TaskToRunShardXXX entity and the reason it has expired.

func (*ExpireSliceRequest) Descriptor deprecated

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

Deprecated: Use ExpireSliceRequest.ProtoReflect.Descriptor instead.

func (*ExpireSliceRequest) GetDetails

func (x *ExpireSliceRequest) GetDetails() string

func (*ExpireSliceRequest) GetReason

func (*ExpireSliceRequest) GetTaskId

func (x *ExpireSliceRequest) GetTaskId() string

func (*ExpireSliceRequest) GetTaskToRunId

func (x *ExpireSliceRequest) GetTaskToRunId() int64

func (*ExpireSliceRequest) GetTaskToRunShard

func (x *ExpireSliceRequest) GetTaskToRunShard() int32

func (*ExpireSliceRequest) ProtoMessage

func (*ExpireSliceRequest) ProtoMessage()

func (*ExpireSliceRequest) ProtoReflect

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

func (*ExpireSliceRequest) Reset

func (x *ExpireSliceRequest) Reset()

func (*ExpireSliceRequest) String

func (x *ExpireSliceRequest) String() string

type ExpireSliceRequest_Reason

type ExpireSliceRequest_Reason int32

The reason the slice is marked as expired.

const (
	ExpireSliceRequest_REASON_UNSPECIFIED ExpireSliceRequest_Reason = 0
	ExpireSliceRequest_NO_RESOURCE        ExpireSliceRequest_Reason = 1 // no bots alive that match the requested dimensions
	ExpireSliceRequest_PERMISSION_DENIED  ExpireSliceRequest_Reason = 2 // no access to the RBE instance
	ExpireSliceRequest_INVALID_ARGUMENT   ExpireSliceRequest_Reason = 3 // RBE didn't like something about the reservation
	ExpireSliceRequest_BOT_INTERNAL_ERROR ExpireSliceRequest_Reason = 4 // the bot picked up the reservation and then died
	ExpireSliceRequest_EXPIRED            ExpireSliceRequest_Reason = 5 // the scheduling deadline exceeded
)

func (ExpireSliceRequest_Reason) Descriptor

func (ExpireSliceRequest_Reason) Enum

func (ExpireSliceRequest_Reason) EnumDescriptor deprecated

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

Deprecated: Use ExpireSliceRequest_Reason.Descriptor instead.

func (ExpireSliceRequest_Reason) Number

func (ExpireSliceRequest_Reason) String

func (x ExpireSliceRequest_Reason) String() string

func (ExpireSliceRequest_Reason) Type

type InternalsClient

type InternalsClient interface {
	// Marks the slice as expired or failed, switches the task to the next slice.
	//
	// Does nothing (and succeeds) if the slice is no longer pending or doesn't
	// exist.
	ExpireSlice(ctx context.Context, in *ExpireSliceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

InternalsClient is the client API for Internals service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

This service is exposed by the Python Swarming, called by the Go Swarming.

All RPCs are internal to the Swarming backend.

func NewInternalsClient

func NewInternalsClient(cc grpc.ClientConnInterface) InternalsClient

type InternalsServer

type InternalsServer interface {
	// Marks the slice as expired or failed, switches the task to the next slice.
	//
	// Does nothing (and succeeds) if the slice is no longer pending or doesn't
	// exist.
	ExpireSlice(context.Context, *ExpireSliceRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

InternalsServer is the server API for Internals service. All implementations must embed UnimplementedInternalsServer for forward compatibility.

This service is exposed by the Python Swarming, called by the Go Swarming.

All RPCs are internal to the Swarming backend.

type Session

type Session struct {

	// ID of the bot as reported in /handshake.
	BotId string `protobuf:"bytes,1,opt,name=bot_id,json=botId,proto3" json:"bot_id,omitempty"`
	// The session ID as reported in /handshake.
	SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// Expiration time of this message. Refreshed on RPC calls.
	Expiry *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// Information for logs and debugging.
	DebugInfo *DebugInfo `protobuf:"bytes,4,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
	// The snapshot of server's bots.cfg the last time /poll was called.
	BotConfig *BotConfig `protobuf:"bytes,5,opt,name=bot_config,json=botConfig,proto3" json:"bot_config,omitempty"`
	// A hash of a config assigned to bot in /handshake to know when to restart.
	HandshakeConfigHash []byte `protobuf:"bytes,6,opt,name=handshake_config_hash,json=handshakeConfigHash,proto3" json:"handshake_config_hash,omitempty"`
	// ID of the RBE's BotSession if there's an established RBE session.
	RbeBotSessionId string `protobuf:"bytes,7,opt,name=rbe_bot_session_id,json=rbeBotSessionId,proto3" json:"rbe_bot_session_id,omitempty"`
	// The monotonic timestamp of the last server config used with this bot.
	LastSeenConfig *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=last_seen_config,json=lastSeenConfig,proto3" json:"last_seen_config,omitempty"`
	// contains filtered or unexported fields
}

Session is a payload of a SessionToken.

It is used to authenticate the bot session and to round-trip some server-specific state through the bot. This state is used by the server to decide how to handle bot calls or when to restart the bot, etc.

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetBotConfig

func (x *Session) GetBotConfig() *BotConfig

func (*Session) GetBotId

func (x *Session) GetBotId() string

func (*Session) GetDebugInfo

func (x *Session) GetDebugInfo() *DebugInfo

func (*Session) GetExpiry

func (x *Session) GetExpiry() *timestamppb.Timestamp

func (*Session) GetHandshakeConfigHash

func (x *Session) GetHandshakeConfigHash() []byte

func (*Session) GetLastSeenConfig

func (x *Session) GetLastSeenConfig() *timestamppb.Timestamp

func (*Session) GetRbeBotSessionId

func (x *Session) GetRbeBotSessionId() string

func (*Session) GetSessionId

func (x *Session) GetSessionId() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type SessionToken

type SessionToken struct {

	// Types that are assignable to Kind:
	//
	//	*SessionToken_HmacTagged_
	//	*SessionToken_AeadEncrypted_
	Kind isSessionToken_Kind `protobuf_oneof:"kind"`
	// contains filtered or unexported fields
}

SessionToken is an encoded and (optionally) encrypted Session proto.

It is sent to the bot in response to "/handshake" and other bot API calls, and the bot then sends it back with every request. This allows to authenticate the bot session and to round-trip server-specific session state through the bot without making bot know too much about it.

In JSON it is encoded using standard base64 encoding with paddings (just like any other `bytes` JSONPB field).

Secret key IDs used for HMAC and AEAD are part of the server configuration and not included in the token.

func (*SessionToken) Descriptor deprecated

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

Deprecated: Use SessionToken.ProtoReflect.Descriptor instead.

func (*SessionToken) GetAeadEncrypted

func (x *SessionToken) GetAeadEncrypted() *SessionToken_AeadEncrypted

func (*SessionToken) GetHmacTagged

func (x *SessionToken) GetHmacTagged() *SessionToken_HmacTagged

func (*SessionToken) GetKind

func (m *SessionToken) GetKind() isSessionToken_Kind

func (*SessionToken) ProtoMessage

func (*SessionToken) ProtoMessage()

func (*SessionToken) ProtoReflect

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

func (*SessionToken) Reset

func (x *SessionToken) Reset()

func (*SessionToken) String

func (x *SessionToken) String() string

type SessionToken_AeadEncrypted

type SessionToken_AeadEncrypted struct {
	CipherText []byte `protobuf:"bytes,1,opt,name=cipher_text,json=cipherText,proto3" json:"cipher_text,omitempty"`
	// contains filtered or unexported fields
}

An encrypted and authenticate token.

cipher_text = aead_encrypt(

plain_text=proto_wirepb(Session{...}),
additional_data="swarming.Session",
key=secret_key,

)

func (*SessionToken_AeadEncrypted) Descriptor deprecated

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

Deprecated: Use SessionToken_AeadEncrypted.ProtoReflect.Descriptor instead.

func (*SessionToken_AeadEncrypted) GetCipherText

func (x *SessionToken_AeadEncrypted) GetCipherText() []byte

func (*SessionToken_AeadEncrypted) ProtoMessage

func (*SessionToken_AeadEncrypted) ProtoMessage()

func (*SessionToken_AeadEncrypted) ProtoReflect

func (*SessionToken_AeadEncrypted) Reset

func (x *SessionToken_AeadEncrypted) Reset()

func (*SessionToken_AeadEncrypted) String

func (x *SessionToken_AeadEncrypted) String() string

type SessionToken_AeadEncrypted_

type SessionToken_AeadEncrypted_ struct {
	AeadEncrypted *SessionToken_AeadEncrypted `protobuf:"bytes,2,opt,name=aead_encrypted,json=aeadEncrypted,proto3,oneof"`
}

type SessionToken_HmacTagged

type SessionToken_HmacTagged struct {
	Session    []byte `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	HmacSha256 []byte `protobuf:"bytes,2,opt,name=hmac_sha256,json=hmacSha256,proto3" json:"hmac_sha256,omitempty"`
	// contains filtered or unexported fields
}

Unencrypted token with its integrity protected by a HMAC256.

Will be used temporarily until the Python backend is gone (since doing AEAD from Python2 GAE is hard).

session = proto_wirepb(Session{...}) hmac_sha256 = hmac_sha256("swarming.Session" + session, secret_key).

func (*SessionToken_HmacTagged) Descriptor deprecated

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

Deprecated: Use SessionToken_HmacTagged.ProtoReflect.Descriptor instead.

func (*SessionToken_HmacTagged) GetHmacSha256

func (x *SessionToken_HmacTagged) GetHmacSha256() []byte

func (*SessionToken_HmacTagged) GetSession

func (x *SessionToken_HmacTagged) GetSession() []byte

func (*SessionToken_HmacTagged) ProtoMessage

func (*SessionToken_HmacTagged) ProtoMessage()

func (*SessionToken_HmacTagged) ProtoReflect

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

func (*SessionToken_HmacTagged) Reset

func (x *SessionToken_HmacTagged) Reset()

func (*SessionToken_HmacTagged) String

func (x *SessionToken_HmacTagged) String() string

type SessionToken_HmacTagged_

type SessionToken_HmacTagged_ struct {
	HmacTagged *SessionToken_HmacTagged `protobuf:"bytes,1,opt,name=hmac_tagged,json=hmacTagged,proto3,oneof"`
}

type TaskPayload

type TaskPayload struct {

	// Unique (within the RBE instance) ID of the reservation, for idempotency.
	ReservationId string `protobuf:"bytes,1,opt,name=reservation_id,json=reservationId,proto3" json:"reservation_id,omitempty"`
	// Swarming task ID (aka TaskResultSummary packed id), identifies TaskRequest.
	TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// Task slice index (mostly FYI).
	SliceIndex int32 `protobuf:"varint,3,opt,name=slice_index,json=sliceIndex,proto3" json:"slice_index,omitempty"`
	// Shard index of TaskToRunShardXXX entity class.
	TaskToRunShard int32 `protobuf:"varint,4,opt,name=task_to_run_shard,json=taskToRunShard,proto3" json:"task_to_run_shard,omitempty"`
	// Datastore ID of TaskToRunShardXXX entity (a child of the TaskRequest).
	TaskToRunId int64                  `protobuf:"varint,5,opt,name=task_to_run_id,json=taskToRunId,proto3" json:"task_to_run_id,omitempty"`
	DebugInfo   *TaskPayload_DebugInfo `protobuf:"bytes,6,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"`
	// If true, the bot should not contact Python Swarming, don't execute
	// anything, just immediately move the reservation into COMPLETED state.
	//
	// This is useful during initial development to test RBE task distribution
	// mechanism in isolation from other Swarming guts.
	Noop bool `protobuf:"varint,7,opt,name=noop,proto3" json:"noop,omitempty"`
	// contains filtered or unexported fields
}

TaskPayload is used as an RBE task payload.

It is serialized as anypb.Any when passed to RBE, and its full proto name is thus sensitive.

It points to an existing TaskToRunShardXXX entity representing the pending request to execute a single task slice plus some extra information useful for debugging.

It also contains the name of the RBE reservation that will be created to represent this task.

func (*TaskPayload) Descriptor deprecated

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

Deprecated: Use TaskPayload.ProtoReflect.Descriptor instead.

func (*TaskPayload) GetDebugInfo

func (x *TaskPayload) GetDebugInfo() *TaskPayload_DebugInfo

func (*TaskPayload) GetNoop

func (x *TaskPayload) GetNoop() bool

func (*TaskPayload) GetReservationId

func (x *TaskPayload) GetReservationId() string

func (*TaskPayload) GetSliceIndex

func (x *TaskPayload) GetSliceIndex() int32

func (*TaskPayload) GetTaskId

func (x *TaskPayload) GetTaskId() string

func (*TaskPayload) GetTaskToRunId

func (x *TaskPayload) GetTaskToRunId() int64

func (*TaskPayload) GetTaskToRunShard

func (x *TaskPayload) GetTaskToRunShard() int32

func (*TaskPayload) ProtoMessage

func (*TaskPayload) ProtoMessage()

func (*TaskPayload) ProtoReflect

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

func (*TaskPayload) Reset

func (x *TaskPayload) Reset()

func (*TaskPayload) String

func (x *TaskPayload) String() string

type TaskPayload_DebugInfo

type TaskPayload_DebugInfo struct {
	Created           *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"`                                                // when this message was created
	PySwarmingVersion string                 `protobuf:"bytes,2,opt,name=py_swarming_version,json=pySwarmingVersion,proto3" json:"py_swarming_version,omitempty"` // version of the Python Swarming
	GoSwarmingVersion string                 `protobuf:"bytes,3,opt,name=go_swarming_version,json=goSwarmingVersion,proto3" json:"go_swarming_version,omitempty"` // version of the Go Swarming
	TaskName          string                 `protobuf:"bytes,4,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"`                              // the user-supplied task name FYI
	// contains filtered or unexported fields
}

Optional information used for debugging and tracing purposes.

func (*TaskPayload_DebugInfo) Descriptor deprecated

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

Deprecated: Use TaskPayload_DebugInfo.ProtoReflect.Descriptor instead.

func (*TaskPayload_DebugInfo) GetCreated

func (x *TaskPayload_DebugInfo) GetCreated() *timestamppb.Timestamp

func (*TaskPayload_DebugInfo) GetGoSwarmingVersion

func (x *TaskPayload_DebugInfo) GetGoSwarmingVersion() string

func (*TaskPayload_DebugInfo) GetPySwarmingVersion

func (x *TaskPayload_DebugInfo) GetPySwarmingVersion() string

func (*TaskPayload_DebugInfo) GetTaskName

func (x *TaskPayload_DebugInfo) GetTaskName() string

func (*TaskPayload_DebugInfo) ProtoMessage

func (*TaskPayload_DebugInfo) ProtoMessage()

func (*TaskPayload_DebugInfo) ProtoReflect

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

func (*TaskPayload_DebugInfo) Reset

func (x *TaskPayload_DebugInfo) Reset()

func (*TaskPayload_DebugInfo) String

func (x *TaskPayload_DebugInfo) String() string

type TaskResult

type TaskResult struct {

	// Set to a human readable string if the bot legitimately skipped executing
	// the reservation e.g. because it was already claimed. Used for debugging
	// only.
	SkipReason string `protobuf:"bytes,1,opt,name=skip_reason,json=skipReason,proto3" json:"skip_reason,omitempty"`
	// Set if the bot picked up the reservation, but could not work on it and
	// gave up. This usually happens if the bot can't claim the TaskToRun after
	// many attempts. This is an internal Swarming error and it results in the
	// task failing with BOT_DIED error.
	BotInternalError string `protobuf:"bytes,2,opt,name=bot_internal_error,json=botInternalError,proto3" json:"bot_internal_error,omitempty"`
	// contains filtered or unexported fields
}

TaskResult is used as an RBE task result.

TaskResult represents an outcome of a reservation that was processed by a bot (successfully or not). If a bot never saw the reservation, or crashed midway, TaskResult is not available. There's more generic Reservation.status field for these cases in the RBE API.

TaskResult is serialized into anypb.Any when passed to RBE, and its full proto name is thus sensitive.

Note that the corresponding TaskPayload is available in the same RBE Reservation proto that contains TaskResult, so TaskPayload fields are not duplicated in the TaskResult.

func (*TaskResult) Descriptor deprecated

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

Deprecated: Use TaskResult.ProtoReflect.Descriptor instead.

func (*TaskResult) GetBotInternalError

func (x *TaskResult) GetBotInternalError() string

func (*TaskResult) GetSkipReason

func (x *TaskResult) GetSkipReason() string

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 UnimplementedInternalsServer

type UnimplementedInternalsServer struct{}

UnimplementedInternalsServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedInternalsServer) ExpireSlice

type UnsafeInternalsServer

type UnsafeInternalsServer interface {
	// contains filtered or unexported methods
}

UnsafeInternalsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InternalsServer will result in compilation errors.

Jump to

Keyboard shortcuts

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