Documentation ¶
Overview ¶
Package internalspb contains protobuf messages used internally by Swarming.
Index ¶
- Constants
- Variables
- func RegisterInternalsServer(s grpc.ServiceRegistrar, srv InternalsServer)
- type BotConfig
- func (*BotConfig) Descriptor() ([]byte, []int)deprecated
- func (x *BotConfig) GetBotAuth() []*config.BotAuth
- func (x *BotConfig) GetDebugInfo() *DebugInfo
- func (x *BotConfig) GetExpiry() *timestamppb.Timestamp
- func (x *BotConfig) GetLogsCloudProject() string
- func (x *BotConfig) GetRbeInstance() string
- func (x *BotConfig) GetSystemServiceAccount() string
- func (*BotConfig) ProtoMessage()
- func (x *BotConfig) ProtoReflect() protoreflect.Message
- func (x *BotConfig) Reset()
- func (x *BotConfig) String() string
- type BotSession
- func (*BotSession) Descriptor() ([]byte, []int)deprecated
- func (x *BotSession) GetExpiry() *timestamppb.Timestamp
- func (x *BotSession) GetPollState() *PollState
- func (x *BotSession) GetRbeBotSessionId() string
- func (*BotSession) ProtoMessage()
- func (x *BotSession) ProtoReflect() protoreflect.Message
- func (x *BotSession) Reset()
- func (x *BotSession) String() string
- type CancelRBETask
- func (*CancelRBETask) Descriptor() ([]byte, []int)deprecated
- func (x *CancelRBETask) GetDebugInfo() *CancelRBETask_DebugInfo
- func (x *CancelRBETask) GetRbeInstance() string
- func (x *CancelRBETask) GetReservationId() string
- func (*CancelRBETask) ProtoMessage()
- func (x *CancelRBETask) ProtoReflect() protoreflect.Message
- func (x *CancelRBETask) Reset()
- func (x *CancelRBETask) String() string
- type CancelRBETask_DebugInfo
- func (*CancelRBETask_DebugInfo) Descriptor() ([]byte, []int)deprecated
- func (x *CancelRBETask_DebugInfo) GetCreated() *timestamppb.Timestamp
- func (x *CancelRBETask_DebugInfo) GetPySwarmingVersion() string
- func (x *CancelRBETask_DebugInfo) GetTaskName() string
- func (*CancelRBETask_DebugInfo) ProtoMessage()
- func (x *CancelRBETask_DebugInfo) ProtoReflect() protoreflect.Message
- func (x *CancelRBETask_DebugInfo) Reset()
- func (x *CancelRBETask_DebugInfo) String() string
- type DebugInfo
- func (*DebugInfo) Descriptor() ([]byte, []int)deprecated
- func (x *DebugInfo) GetCreated() *timestamppb.Timestamp
- func (x *DebugInfo) GetRequestId() string
- func (x *DebugInfo) GetSwarmingVersion() string
- func (*DebugInfo) ProtoMessage()
- func (x *DebugInfo) ProtoReflect() protoreflect.Message
- func (x *DebugInfo) Reset()
- func (x *DebugInfo) String() string
- type EnqueueRBETask
- func (*EnqueueRBETask) Descriptor() ([]byte, []int)deprecated
- func (x *EnqueueRBETask) GetConstraints() []*EnqueueRBETask_Constraint
- func (x *EnqueueRBETask) GetExecutionTimeout() *durationpb.Duration
- func (x *EnqueueRBETask) GetExpiry() *timestamppb.Timestamp
- func (x *EnqueueRBETask) GetPayload() *TaskPayload
- func (x *EnqueueRBETask) GetPriority() int32
- func (x *EnqueueRBETask) GetRbeInstance() string
- func (x *EnqueueRBETask) GetRequestedBotId() string
- func (x *EnqueueRBETask) GetSchedulingAlgorithm() config.Pool_SchedulingAlgorithm
- func (*EnqueueRBETask) ProtoMessage()
- func (x *EnqueueRBETask) ProtoReflect() protoreflect.Message
- func (x *EnqueueRBETask) Reset()
- func (x *EnqueueRBETask) String() string
- type EnqueueRBETask_Constraint
- func (*EnqueueRBETask_Constraint) Descriptor() ([]byte, []int)deprecated
- func (x *EnqueueRBETask_Constraint) GetAllowedValues() []string
- func (x *EnqueueRBETask_Constraint) GetKey() string
- func (*EnqueueRBETask_Constraint) ProtoMessage()
- func (x *EnqueueRBETask_Constraint) ProtoReflect() protoreflect.Message
- func (x *EnqueueRBETask_Constraint) Reset()
- func (x *EnqueueRBETask_Constraint) String() string
- type ExpireSliceRequest
- func (*ExpireSliceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExpireSliceRequest) GetDetails() string
- func (x *ExpireSliceRequest) GetReason() ExpireSliceRequest_Reason
- func (x *ExpireSliceRequest) GetTaskId() string
- func (x *ExpireSliceRequest) GetTaskToRunId() int64
- func (x *ExpireSliceRequest) GetTaskToRunShard() int32
- func (*ExpireSliceRequest) ProtoMessage()
- func (x *ExpireSliceRequest) ProtoReflect() protoreflect.Message
- func (x *ExpireSliceRequest) Reset()
- func (x *ExpireSliceRequest) String() string
- type ExpireSliceRequest_Reason
- func (ExpireSliceRequest_Reason) Descriptor() protoreflect.EnumDescriptor
- func (x ExpireSliceRequest_Reason) Enum() *ExpireSliceRequest_Reason
- func (ExpireSliceRequest_Reason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ExpireSliceRequest_Reason) Number() protoreflect.EnumNumber
- func (x ExpireSliceRequest_Reason) String() string
- func (ExpireSliceRequest_Reason) Type() protoreflect.EnumType
- type InternalsClient
- type InternalsServer
- type PollState
- func (*PollState) Descriptor() ([]byte, []int)deprecated
- func (m *PollState) GetAuthMethod() isPollState_AuthMethod
- func (x *PollState) GetDebugInfo() *PollState_DebugInfo
- func (x *PollState) GetEnforcedDimensions() []*PollState_Dimension
- func (x *PollState) GetExpiry() *timestamppb.Timestamp
- func (x *PollState) GetGceAuth() *PollState_GCEAuth
- func (x *PollState) GetId() string
- func (x *PollState) GetIpAllowlist() string
- func (x *PollState) GetIpAllowlistAuth() *PollState_IPAllowlistAuth
- func (x *PollState) GetLuciMachineTokenAuth() *PollState_LUCIMachineTokenAuth
- func (x *PollState) GetRbeInstance() string
- func (x *PollState) GetServiceAccountAuth() *PollState_ServiceAccountAuth
- func (*PollState) ProtoMessage()
- func (x *PollState) ProtoReflect() protoreflect.Message
- func (x *PollState) Reset()
- func (x *PollState) String() string
- type PollState_DebugInfo
- func (*PollState_DebugInfo) Descriptor() ([]byte, []int)deprecated
- func (x *PollState_DebugInfo) GetCreated() *timestamppb.Timestamp
- func (x *PollState_DebugInfo) GetRequestId() string
- func (x *PollState_DebugInfo) GetSwarmingVersion() string
- func (*PollState_DebugInfo) ProtoMessage()
- func (x *PollState_DebugInfo) ProtoReflect() protoreflect.Message
- func (x *PollState_DebugInfo) Reset()
- func (x *PollState_DebugInfo) String() string
- type PollState_Dimension
- func (*PollState_Dimension) Descriptor() ([]byte, []int)deprecated
- func (x *PollState_Dimension) GetKey() string
- func (x *PollState_Dimension) GetValues() []string
- func (*PollState_Dimension) ProtoMessage()
- func (x *PollState_Dimension) ProtoReflect() protoreflect.Message
- func (x *PollState_Dimension) Reset()
- func (x *PollState_Dimension) String() string
- type PollState_GCEAuth
- func (*PollState_GCEAuth) Descriptor() ([]byte, []int)deprecated
- func (x *PollState_GCEAuth) GetGceInstance() string
- func (x *PollState_GCEAuth) GetGceProject() string
- func (*PollState_GCEAuth) ProtoMessage()
- func (x *PollState_GCEAuth) ProtoReflect() protoreflect.Message
- func (x *PollState_GCEAuth) Reset()
- func (x *PollState_GCEAuth) String() string
- type PollState_GceAuth
- type PollState_IPAllowlistAuth
- type PollState_IpAllowlistAuth
- type PollState_LUCIMachineTokenAuth
- func (*PollState_LUCIMachineTokenAuth) Descriptor() ([]byte, []int)deprecated
- func (x *PollState_LUCIMachineTokenAuth) GetMachineFqdn() string
- func (*PollState_LUCIMachineTokenAuth) ProtoMessage()
- func (x *PollState_LUCIMachineTokenAuth) ProtoReflect() protoreflect.Message
- func (x *PollState_LUCIMachineTokenAuth) Reset()
- func (x *PollState_LUCIMachineTokenAuth) String() string
- type PollState_LuciMachineTokenAuth
- type PollState_ServiceAccountAuth
- func (*PollState_ServiceAccountAuth) Descriptor() ([]byte, []int)deprecated
- func (x *PollState_ServiceAccountAuth) GetServiceAccount() string
- func (*PollState_ServiceAccountAuth) ProtoMessage()
- func (x *PollState_ServiceAccountAuth) ProtoReflect() protoreflect.Message
- func (x *PollState_ServiceAccountAuth) Reset()
- func (x *PollState_ServiceAccountAuth) String() string
- type PollState_ServiceAccountAuth_
- type Session
- func (*Session) Descriptor() ([]byte, []int)deprecated
- func (x *Session) GetBotConfig() *BotConfig
- func (x *Session) GetBotId() string
- func (x *Session) GetDebugInfo() *DebugInfo
- func (x *Session) GetExpiry() *timestamppb.Timestamp
- func (x *Session) GetHandshakeConfigHash() []byte
- func (x *Session) GetLastSeenConfig() *timestamppb.Timestamp
- func (x *Session) GetRbeBotSessionId() string
- func (x *Session) GetSessionId() string
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Reset()
- func (x *Session) String() string
- type SessionToken
- func (*SessionToken) Descriptor() ([]byte, []int)deprecated
- func (x *SessionToken) GetAeadEncrypted() *SessionToken_AeadEncrypted
- func (x *SessionToken) GetHmacTagged() *SessionToken_HmacTagged
- func (m *SessionToken) GetKind() isSessionToken_Kind
- func (*SessionToken) ProtoMessage()
- func (x *SessionToken) ProtoReflect() protoreflect.Message
- func (x *SessionToken) Reset()
- func (x *SessionToken) String() string
- type SessionToken_AeadEncrypted
- func (*SessionToken_AeadEncrypted) Descriptor() ([]byte, []int)deprecated
- func (x *SessionToken_AeadEncrypted) GetCipherText() []byte
- func (*SessionToken_AeadEncrypted) ProtoMessage()
- func (x *SessionToken_AeadEncrypted) ProtoReflect() protoreflect.Message
- func (x *SessionToken_AeadEncrypted) Reset()
- func (x *SessionToken_AeadEncrypted) String() string
- type SessionToken_AeadEncrypted_
- type SessionToken_HmacTagged
- func (*SessionToken_HmacTagged) Descriptor() ([]byte, []int)deprecated
- func (x *SessionToken_HmacTagged) GetHmacSha256() []byte
- func (x *SessionToken_HmacTagged) GetSession() []byte
- func (*SessionToken_HmacTagged) ProtoMessage()
- func (x *SessionToken_HmacTagged) ProtoReflect() protoreflect.Message
- func (x *SessionToken_HmacTagged) Reset()
- func (x *SessionToken_HmacTagged) String() string
- type SessionToken_HmacTagged_
- type TaggedMessage
- func (*TaggedMessage) Descriptor() ([]byte, []int)deprecated
- func (x *TaggedMessage) GetHmacSha256() []byte
- func (x *TaggedMessage) GetPayload() []byte
- func (x *TaggedMessage) GetPayloadType() TaggedMessage_PayloadType
- func (*TaggedMessage) ProtoMessage()
- func (x *TaggedMessage) ProtoReflect() protoreflect.Message
- func (x *TaggedMessage) Reset()
- func (x *TaggedMessage) String() string
- type TaggedMessage_PayloadType
- func (TaggedMessage_PayloadType) Descriptor() protoreflect.EnumDescriptor
- func (x TaggedMessage_PayloadType) Enum() *TaggedMessage_PayloadType
- func (TaggedMessage_PayloadType) EnumDescriptor() ([]byte, []int)deprecated
- func (x TaggedMessage_PayloadType) Number() protoreflect.EnumNumber
- func (x TaggedMessage_PayloadType) String() string
- func (TaggedMessage_PayloadType) Type() protoreflect.EnumType
- type TaskPayload
- func (*TaskPayload) Descriptor() ([]byte, []int)deprecated
- func (x *TaskPayload) GetDebugInfo() *TaskPayload_DebugInfo
- func (x *TaskPayload) GetNoop() bool
- func (x *TaskPayload) GetReservationId() string
- func (x *TaskPayload) GetSliceIndex() int32
- func (x *TaskPayload) GetTaskId() string
- func (x *TaskPayload) GetTaskToRunId() int64
- func (x *TaskPayload) GetTaskToRunShard() int32
- func (*TaskPayload) ProtoMessage()
- func (x *TaskPayload) ProtoReflect() protoreflect.Message
- func (x *TaskPayload) Reset()
- func (x *TaskPayload) String() string
- type TaskPayload_DebugInfo
- func (*TaskPayload_DebugInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TaskPayload_DebugInfo) GetCreated() *timestamppb.Timestamp
- func (x *TaskPayload_DebugInfo) GetGoSwarmingVersion() string
- func (x *TaskPayload_DebugInfo) GetPySwarmingVersion() string
- func (x *TaskPayload_DebugInfo) GetTaskName() string
- func (*TaskPayload_DebugInfo) ProtoMessage()
- func (x *TaskPayload_DebugInfo) ProtoReflect() protoreflect.Message
- func (x *TaskPayload_DebugInfo) Reset()
- func (x *TaskPayload_DebugInfo) String() string
- type TaskResult
- func (*TaskResult) Descriptor() ([]byte, []int)deprecated
- func (x *TaskResult) GetBotInternalError() string
- func (x *TaskResult) GetSkipReason() string
- func (*TaskResult) ProtoMessage()
- func (x *TaskResult) ProtoReflect() protoreflect.Message
- func (x *TaskResult) Reset()
- func (x *TaskResult) String() string
- type UnimplementedInternalsServer
- type UnsafeInternalsServer
Constants ¶
const (
Internals_ExpireSlice_FullMethodName = "/swarming.internals.rbe.Internals/ExpireSlice"
)
Variables ¶
var ( TaggedMessage_PayloadType_name = map[int32]string{ 0: "PAYLOAD_TYPE_UNSPECIFIED", 1: "POLL_STATE", 2: "BOT_SESSION", } TaggedMessage_PayloadType_value = map[string]int32{ "PAYLOAD_TYPE_UNSPECIFIED": 0, "POLL_STATE": 1, "BOT_SESSION": 2, } )
Enum value maps for TaggedMessage_PayloadType.
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.
var File_go_chromium_org_luci_swarming_proto_internals_rbe_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_swarming_proto_internals_session_proto protoreflect.FileDescriptor
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) GetBotAuth ¶
func (*BotConfig) GetDebugInfo ¶
func (*BotConfig) GetExpiry ¶
func (x *BotConfig) GetExpiry() *timestamppb.Timestamp
func (*BotConfig) GetLogsCloudProject ¶
func (*BotConfig) GetRbeInstance ¶
func (*BotConfig) GetSystemServiceAccount ¶
func (*BotConfig) ProtoMessage ¶
func (*BotConfig) ProtoMessage()
func (*BotConfig) ProtoReflect ¶
func (x *BotConfig) ProtoReflect() protoreflect.Message
type BotSession ¶
type BotSession struct { // ID of the RBE's BotSession. RbeBotSessionId string `protobuf:"bytes,1,opt,name=rbe_bot_session_id,json=rbeBotSessionId,proto3" json:"rbe_bot_session_id,omitempty"` // Poll state extracted from the last seen validated PollState token. // // Its `expiry` should be ignored in favor of `expiry` field in BotSession. PollState *PollState `protobuf:"bytes,2,opt,name=poll_state,json=pollState,proto3" json:"poll_state,omitempty"` // Expiration time of this message. It should not be used once it expires. Expiry *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expiry,proto3" json:"expiry,omitempty"` // contains filtered or unexported fields }
BotSession carries an RBE bot session ID and the latest validated PollState.
It travels wrapped in a TaggedMessage. It is produced and verified by the Go server whenever the bot calls CreateBotSession or UpdateBotSession.
It serves two purposes:
- Protect the RBE bot session ID from tampering by the bot (e.g. prevents the bot from using a different bot session ID of a bot in another pool).
- Preserve parameters of the last known PollState (in particular auth ones) and bind the session ID to them, so even if the bot has a valid BotSession token from another bot, it won't be able to use them (because it will fail the auth check encoded in the PollState).
The original PollState token has limited expiration time and it expires if the bot doesn't refresh it by calling the polling endpoint served by the Python server. When running a long task, the bot is not polling anything and can't refresh the PollState token. But it still periodically calls UpdateBotSession to send heartbeats to RBE. This is where PollState stored in BotSession token is verified and where BotSession token is occasionally refreshed.
If a call to UpdateBotSession has both the PollState token and BotSession token (happens when a bot is polling new tasks from RBE), the information in the PollState token is used as authoritative since PollState tokens are generated by Python code based on the freshest state of bot configs. Fields pulled from such PollState token is used to update BotSession token.
DEPRECATED: Being replaced with Session.
func (*BotSession) Descriptor
deprecated
func (*BotSession) Descriptor() ([]byte, []int)
Deprecated: Use BotSession.ProtoReflect.Descriptor instead.
func (*BotSession) GetExpiry ¶
func (x *BotSession) GetExpiry() *timestamppb.Timestamp
func (*BotSession) GetPollState ¶
func (x *BotSession) GetPollState() *PollState
func (*BotSession) GetRbeBotSessionId ¶
func (x *BotSession) GetRbeBotSessionId() string
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 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 (x *CancelRBETask_DebugInfo) GetCreated() *timestamppb.Timestamp
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) GetCreated ¶
func (x *DebugInfo) GetCreated() *timestamppb.Timestamp
func (*DebugInfo) GetRequestId ¶
func (*DebugInfo) GetSwarmingVersion ¶
func (*DebugInfo) ProtoMessage ¶
func (*DebugInfo) ProtoMessage()
func (*DebugInfo) ProtoReflect ¶
func (x *DebugInfo) ProtoReflect() protoreflect.Message
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 (x *EnqueueRBETask_Constraint) ProtoReflect() protoreflect.Message
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 (x *ExpireSliceRequest) GetReason() ExpireSliceRequest_Reason
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) Descriptor() protoreflect.EnumDescriptor
func (ExpireSliceRequest_Reason) Enum ¶
func (x ExpireSliceRequest_Reason) Enum() *ExpireSliceRequest_Reason
func (ExpireSliceRequest_Reason) EnumDescriptor
deprecated
func (ExpireSliceRequest_Reason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ExpireSliceRequest_Reason.Descriptor instead.
func (ExpireSliceRequest_Reason) Number ¶
func (x ExpireSliceRequest_Reason) Number() protoreflect.EnumNumber
func (ExpireSliceRequest_Reason) String ¶
func (x ExpireSliceRequest_Reason) String() string
func (ExpireSliceRequest_Reason) Type ¶
func (ExpireSliceRequest_Reason) Type() protoreflect.EnumType
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 PollState ¶
type PollState struct { // Unique ID of this message (primary to correlate logs that use it). Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Expiration time of this message. It should not be used once it expires. Expiry *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiry,proto3" json:"expiry,omitempty"` // Full RBE instance name to use. RbeInstance string `protobuf:"bytes,3,opt,name=rbe_instance,json=rbeInstance,proto3" json:"rbe_instance,omitempty"` EnforcedDimensions []*PollState_Dimension `protobuf:"bytes,4,rep,name=enforced_dimensions,json=enforcedDimensions,proto3" json:"enforced_dimensions,omitempty"` DebugInfo *PollState_DebugInfo `protobuf:"bytes,5,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"` // If set, the bot should be in the corresponding IP allowlist (in addition // to the primary auth check described by auth_method). Always set if // auth_method is IPAllowlistAuth. IpAllowlist string `protobuf:"bytes,10,opt,name=ip_allowlist,json=ipAllowlist,proto3" json:"ip_allowlist,omitempty"` // Describes how to authenticate the bot. See swarming.config.BotAuth. // // Must be set. // // Types that are assignable to AuthMethod: // // *PollState_GceAuth // *PollState_ServiceAccountAuth_ // *PollState_LuciMachineTokenAuth // *PollState_IpAllowlistAuth AuthMethod isPollState_AuthMethod `protobuf_oneof:"auth_method"` // contains filtered or unexported fields }
PollState is produced by the Python server and passed to the Go server.
It travels wrapped in a TaggedMessage. Once the HMAC tag is verified, the Go server can trust that this message was generated by the Python server and was not tampered with.
It is generated by "/bot/poll" endpoint for bots in the RBE mode. Such bots then pass it to the "/bot/rbe/..." endpoints. It contains RBE-related parameters for this particular bot produced based on the bot credentials and Python server configs.
It also contains instructions how to authenticate the bot on the Go side. They are derived based on how the Python server authenticated this particular bot. They are tightly coupled to swarming.config.BotAuth message.
Once the Go server verifies the HMAC tag, and checks that the bot presented the exact same credentials as used by the Python side, the Go side can trust that this message was not tampered with and was not "substituted" (i.e. taken from one bot and replayed on another).
DEPRECATED: Being replaced with Session.
func (*PollState) Descriptor
deprecated
func (*PollState) GetAuthMethod ¶
func (m *PollState) GetAuthMethod() isPollState_AuthMethod
func (*PollState) GetDebugInfo ¶
func (x *PollState) GetDebugInfo() *PollState_DebugInfo
func (*PollState) GetEnforcedDimensions ¶
func (x *PollState) GetEnforcedDimensions() []*PollState_Dimension
func (*PollState) GetExpiry ¶
func (x *PollState) GetExpiry() *timestamppb.Timestamp
func (*PollState) GetGceAuth ¶
func (x *PollState) GetGceAuth() *PollState_GCEAuth
func (*PollState) GetIpAllowlist ¶
func (*PollState) GetIpAllowlistAuth ¶
func (x *PollState) GetIpAllowlistAuth() *PollState_IPAllowlistAuth
func (*PollState) GetLuciMachineTokenAuth ¶
func (x *PollState) GetLuciMachineTokenAuth() *PollState_LUCIMachineTokenAuth
func (*PollState) GetRbeInstance ¶
func (*PollState) GetServiceAccountAuth ¶
func (x *PollState) GetServiceAccountAuth() *PollState_ServiceAccountAuth
func (*PollState) ProtoMessage ¶
func (*PollState) ProtoMessage()
func (*PollState) ProtoReflect ¶
func (x *PollState) ProtoReflect() protoreflect.Message
type PollState_DebugInfo ¶
type PollState_DebugInfo struct { Created *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"` // when this message was created SwarmingVersion string `protobuf:"bytes,2,opt,name=swarming_version,json=swarmingVersion,proto3" json:"swarming_version,omitempty"` // version of the Swarming code RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // ID of the "/bot/poll" request // contains filtered or unexported fields }
Information for logs and debugging (not passed to RBE).
func (*PollState_DebugInfo) Descriptor
deprecated
func (*PollState_DebugInfo) Descriptor() ([]byte, []int)
Deprecated: Use PollState_DebugInfo.ProtoReflect.Descriptor instead.
func (*PollState_DebugInfo) GetCreated ¶
func (x *PollState_DebugInfo) GetCreated() *timestamppb.Timestamp
func (*PollState_DebugInfo) GetRequestId ¶
func (x *PollState_DebugInfo) GetRequestId() string
func (*PollState_DebugInfo) GetSwarmingVersion ¶
func (x *PollState_DebugInfo) GetSwarmingVersion() string
func (*PollState_DebugInfo) ProtoMessage ¶
func (*PollState_DebugInfo) ProtoMessage()
func (*PollState_DebugInfo) ProtoReflect ¶
func (x *PollState_DebugInfo) ProtoReflect() protoreflect.Message
func (*PollState_DebugInfo) Reset ¶
func (x *PollState_DebugInfo) Reset()
func (*PollState_DebugInfo) String ¶
func (x *PollState_DebugInfo) String() string
type PollState_Dimension ¶
type PollState_Dimension struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
Override these particular dimensions when contacting RBE.
These values will be used instead of whatever the bot is reporting. This is used for security-sensitive dimensions like `id` and `pool`.
`id` is always populated and has a single value matching the bot ID.
func (*PollState_Dimension) Descriptor
deprecated
func (*PollState_Dimension) Descriptor() ([]byte, []int)
Deprecated: Use PollState_Dimension.ProtoReflect.Descriptor instead.
func (*PollState_Dimension) GetKey ¶
func (x *PollState_Dimension) GetKey() string
func (*PollState_Dimension) GetValues ¶
func (x *PollState_Dimension) GetValues() []string
func (*PollState_Dimension) ProtoMessage ¶
func (*PollState_Dimension) ProtoMessage()
func (*PollState_Dimension) ProtoReflect ¶
func (x *PollState_Dimension) ProtoReflect() protoreflect.Message
func (*PollState_Dimension) Reset ¶
func (x *PollState_Dimension) Reset()
func (*PollState_Dimension) String ¶
func (x *PollState_Dimension) String() string
type PollState_GCEAuth ¶
type PollState_GCEAuth struct { GceProject string `protobuf:"bytes,1,opt,name=gce_project,json=gceProject,proto3" json:"gce_project,omitempty"` GceInstance string `protobuf:"bytes,2,opt,name=gce_instance,json=gceInstance,proto3" json:"gce_instance,omitempty"` // contains filtered or unexported fields }
If set, use `X-Luci-Gce-Vm-Token` header for auth.
This header should contain JWT with signed VM metadata with the following expectations:
- Audience matches https://[*-dot-]<app>.appspot.com
- google.compute_engine.project_id field matches `gce_project`.
- google.compute_engine.instance_name matches `gce_instance`.
func (*PollState_GCEAuth) Descriptor
deprecated
func (*PollState_GCEAuth) Descriptor() ([]byte, []int)
Deprecated: Use PollState_GCEAuth.ProtoReflect.Descriptor instead.
func (*PollState_GCEAuth) GetGceInstance ¶
func (x *PollState_GCEAuth) GetGceInstance() string
func (*PollState_GCEAuth) GetGceProject ¶
func (x *PollState_GCEAuth) GetGceProject() string
func (*PollState_GCEAuth) ProtoMessage ¶
func (*PollState_GCEAuth) ProtoMessage()
func (*PollState_GCEAuth) ProtoReflect ¶
func (x *PollState_GCEAuth) ProtoReflect() protoreflect.Message
func (*PollState_GCEAuth) Reset ¶
func (x *PollState_GCEAuth) Reset()
func (*PollState_GCEAuth) String ¶
func (x *PollState_GCEAuth) String() string
type PollState_GceAuth ¶
type PollState_GceAuth struct {
GceAuth *PollState_GCEAuth `protobuf:"bytes,11,opt,name=gce_auth,json=gceAuth,proto3,oneof"`
}
type PollState_IPAllowlistAuth ¶
type PollState_IPAllowlistAuth struct {
// contains filtered or unexported fields
}
If set, use only `ip_allowlist` field for auth (see below).
func (*PollState_IPAllowlistAuth) Descriptor
deprecated
func (*PollState_IPAllowlistAuth) Descriptor() ([]byte, []int)
Deprecated: Use PollState_IPAllowlistAuth.ProtoReflect.Descriptor instead.
func (*PollState_IPAllowlistAuth) ProtoMessage ¶
func (*PollState_IPAllowlistAuth) ProtoMessage()
func (*PollState_IPAllowlistAuth) ProtoReflect ¶
func (x *PollState_IPAllowlistAuth) ProtoReflect() protoreflect.Message
func (*PollState_IPAllowlistAuth) Reset ¶
func (x *PollState_IPAllowlistAuth) Reset()
func (*PollState_IPAllowlistAuth) String ¶
func (x *PollState_IPAllowlistAuth) String() string
type PollState_IpAllowlistAuth ¶
type PollState_IpAllowlistAuth struct {
IpAllowlistAuth *PollState_IPAllowlistAuth `protobuf:"bytes,14,opt,name=ip_allowlist_auth,json=ipAllowlistAuth,proto3,oneof"`
}
type PollState_LUCIMachineTokenAuth ¶
type PollState_LUCIMachineTokenAuth struct { MachineFqdn string `protobuf:"bytes,1,opt,name=machine_fqdn,json=machineFqdn,proto3" json:"machine_fqdn,omitempty"` // contains filtered or unexported fields }
If set, use `X-Luci-Machine-Token` header with LUCI machine token.
The token should have the corresponding FQDN in it.
func (*PollState_LUCIMachineTokenAuth) Descriptor
deprecated
func (*PollState_LUCIMachineTokenAuth) Descriptor() ([]byte, []int)
Deprecated: Use PollState_LUCIMachineTokenAuth.ProtoReflect.Descriptor instead.
func (*PollState_LUCIMachineTokenAuth) GetMachineFqdn ¶
func (x *PollState_LUCIMachineTokenAuth) GetMachineFqdn() string
func (*PollState_LUCIMachineTokenAuth) ProtoMessage ¶
func (*PollState_LUCIMachineTokenAuth) ProtoMessage()
func (*PollState_LUCIMachineTokenAuth) ProtoReflect ¶
func (x *PollState_LUCIMachineTokenAuth) ProtoReflect() protoreflect.Message
func (*PollState_LUCIMachineTokenAuth) Reset ¶
func (x *PollState_LUCIMachineTokenAuth) Reset()
func (*PollState_LUCIMachineTokenAuth) String ¶
func (x *PollState_LUCIMachineTokenAuth) String() string
type PollState_LuciMachineTokenAuth ¶
type PollState_LuciMachineTokenAuth struct {
LuciMachineTokenAuth *PollState_LUCIMachineTokenAuth `protobuf:"bytes,13,opt,name=luci_machine_token_auth,json=luciMachineTokenAuth,proto3,oneof"`
}
type PollState_ServiceAccountAuth ¶
type PollState_ServiceAccountAuth struct { ServiceAccount string `protobuf:"bytes,1,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` // contains filtered or unexported fields }
If set, use `Authorization` header with OAuth2 access tokens for auth.
The token should have "https://www.googleapis.com/auth/userinfo.email" scope and belong to the given service account.
func (*PollState_ServiceAccountAuth) Descriptor
deprecated
func (*PollState_ServiceAccountAuth) Descriptor() ([]byte, []int)
Deprecated: Use PollState_ServiceAccountAuth.ProtoReflect.Descriptor instead.
func (*PollState_ServiceAccountAuth) GetServiceAccount ¶
func (x *PollState_ServiceAccountAuth) GetServiceAccount() string
func (*PollState_ServiceAccountAuth) ProtoMessage ¶
func (*PollState_ServiceAccountAuth) ProtoMessage()
func (*PollState_ServiceAccountAuth) ProtoReflect ¶
func (x *PollState_ServiceAccountAuth) ProtoReflect() protoreflect.Message
func (*PollState_ServiceAccountAuth) Reset ¶
func (x *PollState_ServiceAccountAuth) Reset()
func (*PollState_ServiceAccountAuth) String ¶
func (x *PollState_ServiceAccountAuth) String() string
type PollState_ServiceAccountAuth_ ¶
type PollState_ServiceAccountAuth_ struct {
ServiceAccountAuth *PollState_ServiceAccountAuth `protobuf:"bytes,12,opt,name=service_account_auth,json=serviceAccountAuth,proto3,oneof"`
}
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) GetBotConfig ¶
func (*Session) GetDebugInfo ¶
func (*Session) GetExpiry ¶
func (x *Session) GetExpiry() *timestamppb.Timestamp
func (*Session) GetHandshakeConfigHash ¶
func (*Session) GetLastSeenConfig ¶
func (x *Session) GetLastSeenConfig() *timestamppb.Timestamp
func (*Session) GetRbeBotSessionId ¶
func (*Session) GetSessionId ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
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 (x *SessionToken_AeadEncrypted) ProtoReflect() protoreflect.Message
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 TaggedMessage ¶
type TaggedMessage struct { PayloadType TaggedMessage_PayloadType `` // identifies the payload proto message type /* 149-byte string literal not displayed */ Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // the serialized payload proto message HmacSha256 []byte `protobuf:"bytes,3,opt,name=hmac_sha256,json=hmacSha256,proto3" json:"hmac_sha256,omitempty"` // HMAC of the payload, see the comment above // contains filtered or unexported fields }
TaggedMessage is an envelope for an HMAC-tagged protobuf message.
A secret key that was used for tagging should be communicated off band (e.g. stored in some pre-agreed Google Secret Manager secret).
hmac_sha256 is calculated as:
hmac_sha256("%d" % payload_type + "\n" + payload, secret_key).
DEPRECATED: Being replaced with SessionToken.
func (*TaggedMessage) Descriptor
deprecated
func (*TaggedMessage) Descriptor() ([]byte, []int)
Deprecated: Use TaggedMessage.ProtoReflect.Descriptor instead.
func (*TaggedMessage) GetHmacSha256 ¶
func (x *TaggedMessage) GetHmacSha256() []byte
func (*TaggedMessage) GetPayload ¶
func (x *TaggedMessage) GetPayload() []byte
func (*TaggedMessage) GetPayloadType ¶
func (x *TaggedMessage) GetPayloadType() TaggedMessage_PayloadType
func (*TaggedMessage) ProtoMessage ¶
func (*TaggedMessage) ProtoMessage()
func (*TaggedMessage) ProtoReflect ¶
func (x *TaggedMessage) ProtoReflect() protoreflect.Message
func (*TaggedMessage) Reset ¶
func (x *TaggedMessage) Reset()
func (*TaggedMessage) String ¶
func (x *TaggedMessage) String() string
type TaggedMessage_PayloadType ¶
type TaggedMessage_PayloadType int32
const ( TaggedMessage_PAYLOAD_TYPE_UNSPECIFIED TaggedMessage_PayloadType = 0 TaggedMessage_POLL_STATE TaggedMessage_PayloadType = 1 // payload is wirepb-serialized PollState TaggedMessage_BOT_SESSION TaggedMessage_PayloadType = 2 // payload is wirepb-serialized BotSession )
func (TaggedMessage_PayloadType) Descriptor ¶
func (TaggedMessage_PayloadType) Descriptor() protoreflect.EnumDescriptor
func (TaggedMessage_PayloadType) Enum ¶
func (x TaggedMessage_PayloadType) Enum() *TaggedMessage_PayloadType
func (TaggedMessage_PayloadType) EnumDescriptor
deprecated
func (TaggedMessage_PayloadType) EnumDescriptor() ([]byte, []int)
Deprecated: Use TaggedMessage_PayloadType.Descriptor instead.
func (TaggedMessage_PayloadType) Number ¶
func (x TaggedMessage_PayloadType) Number() protoreflect.EnumNumber
func (TaggedMessage_PayloadType) String ¶
func (x TaggedMessage_PayloadType) String() string
func (TaggedMessage_PayloadType) Type ¶
func (TaggedMessage_PayloadType) Type() protoreflect.EnumType
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 ¶
func (UnimplementedInternalsServer) ExpireSlice(context.Context, *ExpireSliceRequest) (*emptypb.Empty, error)
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.