multibot

package
v0.0.0-...-712ccb0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FollowerStateChange_FollowerState_name = map[int32]string{
		0:  "STATE_UNDEFINED",
		16: "STATE_STARTED",
		32: "STATE_WAITING_TO_RUN_PAYLOAD",
		48: "STATE_RUNNING_PAYLOAD",
		64: "STATE_CLEANING",
	}
	FollowerStateChange_FollowerState_value = map[string]int32{
		"STATE_UNDEFINED":              0,
		"STATE_STARTED":                16,
		"STATE_WAITING_TO_RUN_PAYLOAD": 32,
		"STATE_RUNNING_PAYLOAD":        48,
		"STATE_CLEANING":               64,
	}
)

Enum value maps for FollowerStateChange_FollowerState.

View Source
var (
	LeaderTransitionMessage_LeaderState_name = map[int32]string{
		0:  "STATE_UNDEFINED",
		16: "STATE_SCHEDULING",
		32: "STATE_RUNNING_PREJOB",
		48: "STATE_WAITING_FOR_FOLLOWERS",
		64: "STATE_NOTIFYING_FOLLOWERS",
		80: "STATE_RUNNING_PAYLOAD",
		96: "STATE_CLEANING",
	}
	LeaderTransitionMessage_LeaderState_value = map[string]int32{
		"STATE_UNDEFINED":             0,
		"STATE_SCHEDULING":            16,
		"STATE_RUNNING_PREJOB":        32,
		"STATE_WAITING_FOR_FOLLOWERS": 48,
		"STATE_NOTIFYING_FOLLOWERS":   64,
		"STATE_RUNNING_PAYLOAD":       80,
		"STATE_CLEANING":              96,
	}
)

Enum value maps for LeaderTransitionMessage_LeaderState.

View Source
var File_test_platform_multibot_common_proto protoreflect.FileDescriptor
View Source
var File_test_platform_multibot_follower_transitions_proto protoreflect.FileDescriptor
View Source
var File_test_platform_multibot_leader_transitions_proto protoreflect.FileDescriptor
View Source
var File_test_platform_multibot_requests_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type FollowerEvent

type FollowerEvent struct {

	// Types that are assignable to Event:
	//	*FollowerEvent_FinishedPrejob_
	//	*FollowerEvent_Died
	Event isFollowerEvent_Event `protobuf_oneof:"event"`
	// contains filtered or unexported fields
}

FollowerEvent is sent over the multibot Follower->Leader channel, to carry follower event information. The leader may use this to change state, depending on leader-specific logic and its internal state.

func (*FollowerEvent) Descriptor deprecated

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

Deprecated: Use FollowerEvent.ProtoReflect.Descriptor instead.

func (*FollowerEvent) GetDied

func (x *FollowerEvent) GetDied() bool

func (*FollowerEvent) GetEvent

func (m *FollowerEvent) GetEvent() isFollowerEvent_Event

func (*FollowerEvent) GetFinishedPrejob

func (x *FollowerEvent) GetFinishedPrejob() *FollowerEvent_FinishedPrejob

func (*FollowerEvent) ProtoMessage

func (*FollowerEvent) ProtoMessage()

func (*FollowerEvent) ProtoReflect

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

func (*FollowerEvent) Reset

func (x *FollowerEvent) Reset()

func (*FollowerEvent) String

func (x *FollowerEvent) String() string

type FollowerEvent_Died

type FollowerEvent_Died struct {
	Died bool `protobuf:"varint,2,opt,name=died,proto3,oneof"`
}

type FollowerEvent_FinishedPrejob

type FollowerEvent_FinishedPrejob struct {
	HostInfo *skylab_local_state.MultiBotHostInfo `protobuf:"bytes,1,opt,name=host_info,json=hostInfo,proto3" json:"host_info,omitempty"`
	// contains filtered or unexported fields
}

func (*FollowerEvent_FinishedPrejob) Descriptor deprecated

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

Deprecated: Use FollowerEvent_FinishedPrejob.ProtoReflect.Descriptor instead.

func (*FollowerEvent_FinishedPrejob) GetHostInfo

func (*FollowerEvent_FinishedPrejob) ProtoMessage

func (*FollowerEvent_FinishedPrejob) ProtoMessage()

func (*FollowerEvent_FinishedPrejob) ProtoReflect

func (*FollowerEvent_FinishedPrejob) Reset

func (x *FollowerEvent_FinishedPrejob) Reset()

func (*FollowerEvent_FinishedPrejob) String

type FollowerEvent_FinishedPrejob_

type FollowerEvent_FinishedPrejob_ struct {
	FinishedPrejob *FollowerEvent_FinishedPrejob `protobuf:"bytes,1,opt,name=finished_prejob,json=finishedPrejob,proto3,oneof"`
}

type FollowerRequest

type FollowerRequest struct {

	// Pubsub subscription to use for this follower task (pre-existing)
	SubscriptionName string `protobuf:"bytes,1,opt,name=subscription_name,json=subscriptionName,proto3" json:"subscription_name,omitempty"`
	// Attribute filter to apply to judge whether incoming messages are 'for you'
	IncomingFilter map[string]string `` /* 191-byte string literal not displayed */
	// Attributes to apply to outgoing messages to address them to the leader
	OutgoingAttributes map[string]string `` /* 203-byte string literal not displayed */
	// Prejob request parameters
	Prejob *phosphorus.PrejobRequest `protobuf:"bytes,4,opt,name=prejob,proto3" json:"prejob,omitempty"`
	// contains filtered or unexported fields
}

Internal per-bot request for follower task

func (*FollowerRequest) Descriptor deprecated

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

Deprecated: Use FollowerRequest.ProtoReflect.Descriptor instead.

func (*FollowerRequest) GetIncomingFilter

func (x *FollowerRequest) GetIncomingFilter() map[string]string

func (*FollowerRequest) GetOutgoingAttributes

func (x *FollowerRequest) GetOutgoingAttributes() map[string]string

func (*FollowerRequest) GetPrejob

func (x *FollowerRequest) GetPrejob() *phosphorus.PrejobRequest

func (*FollowerRequest) GetSubscriptionName

func (x *FollowerRequest) GetSubscriptionName() string

func (*FollowerRequest) ProtoMessage

func (*FollowerRequest) ProtoMessage()

func (*FollowerRequest) ProtoReflect

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

func (*FollowerRequest) Reset

func (x *FollowerRequest) Reset()

func (*FollowerRequest) String

func (x *FollowerRequest) String() string

type FollowerSpec

type FollowerSpec struct {
	StaticAttributes *FollowerSpec_StaticAttributes `protobuf:"bytes,1,opt,name=static_attributes,json=staticAttributes,proto3" json:"static_attributes,omitempty"`
	// Prejob work required, primarily provisionable attributes to ensure
	Prejob *skylab_test_runner.Request_Prejob `protobuf:"bytes,2,opt,name=prejob,proto3" json:"prejob,omitempty"`
	// Number of followers with these attributes, default to 1.
	Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

FollowerSpec contains the provisionable and nonprovisionable attributes for a follower swarming task.

func (*FollowerSpec) Descriptor deprecated

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

Deprecated: Use FollowerSpec.ProtoReflect.Descriptor instead.

func (*FollowerSpec) GetCount

func (x *FollowerSpec) GetCount() int32

func (*FollowerSpec) GetPrejob

func (*FollowerSpec) GetStaticAttributes

func (x *FollowerSpec) GetStaticAttributes() *FollowerSpec_StaticAttributes

func (*FollowerSpec) ProtoMessage

func (*FollowerSpec) ProtoMessage()

func (*FollowerSpec) ProtoReflect

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

func (*FollowerSpec) Reset

func (x *FollowerSpec) Reset()

func (*FollowerSpec) String

func (x *FollowerSpec) String() string

type FollowerSpec_StaticAttributes

type FollowerSpec_StaticAttributes struct {
	HardwareAttributes *test_platform.Request_Params_HardwareAttributes `protobuf:"bytes,1,opt,name=hardware_attributes,json=hardwareAttributes,proto3" json:"hardware_attributes,omitempty"`
	SoftwareAttributes *test_platform.Request_Params_SoftwareAttributes `protobuf:"bytes,2,opt,name=software_attributes,json=softwareAttributes,proto3" json:"software_attributes,omitempty"`
	// contains filtered or unexported fields
}

Nonprovisionable labels for followers

func (*FollowerSpec_StaticAttributes) Descriptor deprecated

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

Deprecated: Use FollowerSpec_StaticAttributes.ProtoReflect.Descriptor instead.

func (*FollowerSpec_StaticAttributes) GetHardwareAttributes

func (*FollowerSpec_StaticAttributes) GetSoftwareAttributes

func (*FollowerSpec_StaticAttributes) ProtoMessage

func (*FollowerSpec_StaticAttributes) ProtoMessage()

func (*FollowerSpec_StaticAttributes) ProtoReflect

func (*FollowerSpec_StaticAttributes) Reset

func (x *FollowerSpec_StaticAttributes) Reset()

func (*FollowerSpec_StaticAttributes) String

type FollowerStateChange

type FollowerStateChange struct {
	NewState FollowerStateChange_FollowerState `` /* 148-byte string literal not displayed */
	// contains filtered or unexported fields
}

FollowerStateChange is sent over the multibot Leader->Follower channel, to carry state change information. The follower will only respect forward state changes. The same message is used internally between follower states.

func (*FollowerStateChange) Descriptor deprecated

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

Deprecated: Use FollowerStateChange.ProtoReflect.Descriptor instead.

func (*FollowerStateChange) GetNewState

func (*FollowerStateChange) ProtoMessage

func (*FollowerStateChange) ProtoMessage()

func (*FollowerStateChange) ProtoReflect

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

func (*FollowerStateChange) Reset

func (x *FollowerStateChange) Reset()

func (*FollowerStateChange) String

func (x *FollowerStateChange) String() string

type FollowerStateChange_FollowerState

type FollowerStateChange_FollowerState int32
const (
	FollowerStateChange_STATE_UNDEFINED FollowerStateChange_FollowerState = 0
	// Follower task has started executing. Note: follower will enter this state
	// automatically once it starts.
	FollowerStateChange_STATE_STARTED FollowerStateChange_FollowerState = 16
	// Follower task is waiting; payload has not started running.
	// Note: follower will enter this state automatically after finishing
	// prejob work and informing leader.
	FollowerStateChange_STATE_WAITING_TO_RUN_PAYLOAD FollowerStateChange_FollowerState = 32
	// Follower task is waiting; payload is running on leader.
	FollowerStateChange_STATE_RUNNING_PAYLOAD FollowerStateChange_FollowerState = 48
	// Follower task is running any necessary cleanup, after which it will
	// terminate.
	FollowerStateChange_STATE_CLEANING FollowerStateChange_FollowerState = 64
)

func (FollowerStateChange_FollowerState) Descriptor

func (FollowerStateChange_FollowerState) Enum

func (FollowerStateChange_FollowerState) EnumDescriptor deprecated

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

Deprecated: Use FollowerStateChange_FollowerState.Descriptor instead.

func (FollowerStateChange_FollowerState) Number

func (FollowerStateChange_FollowerState) String

func (FollowerStateChange_FollowerState) Type

type FollowersState

type FollowersState struct {

	// Number of follower tasks the leader is still waiting for
	WaitingForFollowers int32          `protobuf:"varint,1,opt,name=waiting_for_followers,json=waitingForFollowers,proto3" json:"waiting_for_followers,omitempty"`
	FollowersHeard      *HostInfoStore `protobuf:"bytes,2,opt,name=followers_heard,json=followersHeard,proto3" json:"followers_heard,omitempty"`
	// contains filtered or unexported fields
}

State of followers still needed and information about those already retrieved

func (*FollowersState) Descriptor deprecated

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

Deprecated: Use FollowersState.ProtoReflect.Descriptor instead.

func (*FollowersState) GetFollowersHeard

func (x *FollowersState) GetFollowersHeard() *HostInfoStore

func (*FollowersState) GetWaitingForFollowers

func (x *FollowersState) GetWaitingForFollowers() int32

func (*FollowersState) ProtoMessage

func (*FollowersState) ProtoMessage()

func (*FollowersState) ProtoReflect

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

func (*FollowersState) Reset

func (x *FollowersState) Reset()

func (*FollowersState) String

func (x *FollowersState) String() string

type HostInfoStore

type HostInfoStore struct {
	HostInfos map[string]*skylab_local_state.AutotestHostInfo `` /* 176-byte string literal not displayed */
	// contains filtered or unexported fields
}

HostInfoStore stores Autotest host info blobs keyed by DUT name

func (*HostInfoStore) Descriptor deprecated

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

Deprecated: Use HostInfoStore.ProtoReflect.Descriptor instead.

func (*HostInfoStore) GetHostInfos

func (*HostInfoStore) ProtoMessage

func (*HostInfoStore) ProtoMessage()

func (*HostInfoStore) ProtoReflect

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

func (*HostInfoStore) Reset

func (x *HostInfoStore) Reset()

func (*HostInfoStore) String

func (x *HostInfoStore) String() string

type LeaderRequest

type LeaderRequest struct {

	// What test to run with the multi-bot task
	Payload *test_platform.Request_Test `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// What attributes to require and provision for follower tasks
	FollowerSpecs []*FollowerSpec `protobuf:"bytes,2,rep,name=follower_specs,json=followerSpecs,proto3" json:"follower_specs,omitempty"`
	// contains filtered or unexported fields
}

External API for requesting a multi-bot job

func (*LeaderRequest) Descriptor deprecated

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

Deprecated: Use LeaderRequest.ProtoReflect.Descriptor instead.

func (*LeaderRequest) GetFollowerSpecs

func (x *LeaderRequest) GetFollowerSpecs() []*FollowerSpec

func (*LeaderRequest) GetPayload

func (x *LeaderRequest) GetPayload() *test_platform.Request_Test

func (*LeaderRequest) ProtoMessage

func (*LeaderRequest) ProtoMessage()

func (*LeaderRequest) ProtoReflect

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

func (*LeaderRequest) Reset

func (x *LeaderRequest) Reset()

func (*LeaderRequest) String

func (x *LeaderRequest) String() string

type LeaderTransitionMessage

type LeaderTransitionMessage struct {
	NewState LeaderTransitionMessage_LeaderState `` /* 150-byte string literal not displayed */
	// Used only for the Waiting for Followers steps, contains the number of
	// followers still required and all gathered info for the ones already seen
	FollowerGathering *FollowersState `protobuf:"bytes,2,opt,name=follower_gathering,json=followerGathering,proto3" json:"follower_gathering,omitempty"`
	// contains filtered or unexported fields
}

LeaderTransitionMessage is used internally by the leader for all state transitions

func (*LeaderTransitionMessage) Descriptor deprecated

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

Deprecated: Use LeaderTransitionMessage.ProtoReflect.Descriptor instead.

func (*LeaderTransitionMessage) GetFollowerGathering

func (x *LeaderTransitionMessage) GetFollowerGathering() *FollowersState

func (*LeaderTransitionMessage) GetNewState

func (*LeaderTransitionMessage) ProtoMessage

func (*LeaderTransitionMessage) ProtoMessage()

func (*LeaderTransitionMessage) ProtoReflect

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

func (*LeaderTransitionMessage) Reset

func (x *LeaderTransitionMessage) Reset()

func (*LeaderTransitionMessage) String

func (x *LeaderTransitionMessage) String() string

type LeaderTransitionMessage_LeaderState

type LeaderTransitionMessage_LeaderState int32
const (
	LeaderTransitionMessage_STATE_UNDEFINED LeaderTransitionMessage_LeaderState = 0
	// Leader task has started executing and scheduling followers.
	LeaderTransitionMessage_STATE_SCHEDULING LeaderTransitionMessage_LeaderState = 16
	// Leader task is executing prejob work
	LeaderTransitionMessage_STATE_RUNNING_PREJOB LeaderTransitionMessage_LeaderState = 32
	// Leader task is waiting and collection host info from follower tasks
	LeaderTransitionMessage_STATE_WAITING_FOR_FOLLOWERS LeaderTransitionMessage_LeaderState = 48
	// Leader task is sending 'Payload Ready' messages to followers. It will
	// automatically enter this state when it has gathered all host info and
	// automatically exits it after sending the message.
	LeaderTransitionMessage_STATE_NOTIFYING_FOLLOWERS LeaderTransitionMessage_LeaderState = 64
	// Leader task is running payload; followers are waiting.
	LeaderTransitionMessage_STATE_RUNNING_PAYLOAD LeaderTransitionMessage_LeaderState = 80
	// Leader task is running any necessary cleanup, after which it will
	// terminate.
	LeaderTransitionMessage_STATE_CLEANING LeaderTransitionMessage_LeaderState = 96
)

func (LeaderTransitionMessage_LeaderState) Descriptor

func (LeaderTransitionMessage_LeaderState) Enum

func (LeaderTransitionMessage_LeaderState) EnumDescriptor deprecated

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

Deprecated: Use LeaderTransitionMessage_LeaderState.Descriptor instead.

func (LeaderTransitionMessage_LeaderState) Number

func (LeaderTransitionMessage_LeaderState) String

func (LeaderTransitionMessage_LeaderState) Type

type MultiBotConfig

type MultiBotConfig struct {

	// Pub/Sub topic name
	Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	// contains filtered or unexported fields
}

Stable configuration settings needed for multi-bot tasks, shared by leader and followers

func (*MultiBotConfig) Descriptor deprecated

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

Deprecated: Use MultiBotConfig.ProtoReflect.Descriptor instead.

func (*MultiBotConfig) GetTopic

func (x *MultiBotConfig) GetTopic() string

func (*MultiBotConfig) ProtoMessage

func (*MultiBotConfig) ProtoMessage()

func (*MultiBotConfig) ProtoReflect

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

func (*MultiBotConfig) Reset

func (x *MultiBotConfig) Reset()

func (*MultiBotConfig) String

func (x *MultiBotConfig) String() string

Jump to

Keyboard shortcuts

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