dm

package
v0.0.0-...-678bb0e Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package dm is a generated protocol buffer package.

It is generated from these files:

github.com/luci/luci-go/dm/api/service/v1/activate_execution.proto
github.com/luci/luci-go/dm/api/service/v1/ensure_graph_data.proto
github.com/luci/luci-go/dm/api/service/v1/finish_attempt.proto
github.com/luci/luci-go/dm/api/service/v1/graph_data.proto
github.com/luci/luci-go/dm/api/service/v1/graph_query.proto
github.com/luci/luci-go/dm/api/service/v1/service.proto
github.com/luci/luci-go/dm/api/service/v1/types.proto
github.com/luci/luci-go/dm/api/service/v1/walk_graph.proto

It has these top-level messages:

ActivateExecutionReq
TemplateInstantiation
EnsureGraphDataReq
EnsureGraphDataRsp
FinishAttemptReq
AbnormalFinish
Quest
JsonResult
Result
Attempt
Execution
GraphData
GraphQuery
MultiPropertyValue
PropertyValue
AttemptList
WalkGraphReq

Index

Constants

View Source
const (
	// DefaultLimitMaxDataSize is the default MaxDataSize value (16MB).
	DefaultLimitMaxDataSize = 16 * 1024 * 1024

	// MaxLimitMaxDataSize is the maximum MaxDataSize value (30MB).
	MaxLimitMaxDataSize = 30 * 1024 * 1024
)
View Source
const JSONNonNormalizedSizeFactor = 0.1

JSONNonNormalizedSizeFactor is the excess multiple of JSONObjectMaxLength that a non-normalized json object must be smaller than. Otherwise we won't attempt to normalize it at all.

View Source
const JSONObjectMaxLength = 256 * 1024

JSONObjectMaxLength is the maximum number of bytes that may be present in the Object field of a normalized JSONObject.

View Source
const MinimumActivationTokenLength = 32

MinimumActivationTokenLength is the minimum number of bytes in an appropriate ExecutionToken.

View Source
const QuestDescPayloadMaxLength = 256 * 1024

QuestDescPayloadMaxLength is the maximum length (in bytes) of an un-normalized Quest payload.

Variables

View Source
var AbnormalFinish_Status_name = map[int32]string{
	0: "INVALID",
	1: "FAILED",
	2: "CRASHED",
	3: "EXPIRED",
	4: "TIMED_OUT",
	5: "CANCELLED",
	6: "REJECTED",
	7: "MISSING",
	8: "RESULT_MALFORMED",
}
View Source
var AbnormalFinish_Status_value = map[string]int32{
	"INVALID":          0,
	"FAILED":           1,
	"CRASHED":          2,
	"EXPIRED":          3,
	"TIMED_OUT":        4,
	"CANCELLED":        5,
	"REJECTED":         6,
	"MISSING":          7,
	"RESULT_MALFORMED": 8,
}
View Source
var Attempt_Partial_Result_name = map[int32]string{
	0: "LOADED",
	1: "NOT_LOADED",
	2: "NOT_AUTHORIZED",
	3: "DATA_SIZE_LIMIT",
}
View Source
var Attempt_Partial_Result_value = map[string]int32{
	"LOADED":          0,
	"NOT_LOADED":      1,
	"NOT_AUTHORIZED":  2,
	"DATA_SIZE_LIMIT": 3,
}
View Source
var Attempt_State_name = map[int32]string{
	0: "SCHEDULING",
	1: "EXECUTING",
	2: "WAITING",
	3: "FINISHED",
	4: "ABNORMAL_FINISHED",
}
View Source
var Attempt_State_value = map[string]int32{
	"SCHEDULING":        0,
	"EXECUTING":         1,
	"WAITING":           2,
	"FINISHED":          3,
	"ABNORMAL_FINISHED": 4,
}
View Source
var Execution_State_name = map[int32]string{
	0: "SCHEDULING",
	1: "RUNNING",
	2: "STOPPING",
	3: "FINISHED",
	4: "ABNORMAL_FINISHED",
}
View Source
var Execution_State_value = map[string]int32{
	"SCHEDULING":        0,
	"RUNNING":           1,
	"STOPPING":          2,
	"FINISHED":          3,
	"ABNORMAL_FINISHED": 4,
}
View Source
var GraphQuery_Search_Domain_name = map[int32]string{
	0: "QUEST",
	1: "ATTEMPT",
}
View Source
var GraphQuery_Search_Domain_value = map[string]int32{
	"QUEST":   0,
	"ATTEMPT": 1,
}
View Source
var (
	// QuestIDLength is the number of encoded bytes to use. It removes the
	// single padding character.
	QuestIDLength = base64.URLEncoding.EncodedLen(sha256.Size) - 1
)
View Source
var WalkGraphReq_Mode_Direction_name = map[int32]string{
	0: "FORWARDS",
	1: "BACKWARDS",
	2: "BOTH",
}
View Source
var WalkGraphReq_Mode_Direction_value = map[string]int32{
	"FORWARDS":  0,
	"BACKWARDS": 1,
	"BOTH":      2,
}

Functions

func FileDescriptorSet

func FileDescriptorSet() *descriptor.FileDescriptorSet

FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.

Will not return nil.

Do NOT modify the returned descriptor.

func RegisterDepsServer

func RegisterDepsServer(s prpc.Registrar, srv DepsServer)

Types

type AbnormalFinish

type AbnormalFinish struct {
	Status AbnormalFinish_Status `protobuf:"varint,1,opt,name=status,enum=dm.AbnormalFinish_Status" json:"status,omitempty"`
	Reason string                `protobuf:"bytes,2,opt,name=reason" json:"reason,omitempty"`
}

func (*AbnormalFinish) Descriptor

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

func (*AbnormalFinish) FromProperty

func (p *AbnormalFinish) FromProperty(prop datastore.Property) error

FromProperty implements datastore.PropertyConverter. It parses a '[]byte' into an embedded 'AbnormalFinish' when used with the "github.com/luci/gae" library.

func (*AbnormalFinish) GetReason

func (m *AbnormalFinish) GetReason() string

func (*AbnormalFinish) GetStatus

func (m *AbnormalFinish) GetStatus() AbnormalFinish_Status

func (*AbnormalFinish) ProtoMessage

func (*AbnormalFinish) ProtoMessage()

func (*AbnormalFinish) Reset

func (m *AbnormalFinish) Reset()

func (*AbnormalFinish) String

func (m *AbnormalFinish) String() string

func (*AbnormalFinish) ToProperty

func (p *AbnormalFinish) ToProperty() (prop datastore.Property, err error)

ToProperty implements datastore.PropertyConverter. It causes an embedded 'AbnormalFinish' to serialize to an unindexed '[]byte' when used with the "github.com/luci/gae" library.

type AbnormalFinish_Status

type AbnormalFinish_Status int32
const (
	// This status is invalid and should not be used intentionally.
	//
	// It is a placeholder to identify 0-initialized AbnormalFinish structures.
	AbnormalFinish_INVALID AbnormalFinish_Status = 0
	// This entity has a failed result.
	//
	// Executions: the distributor reported that the task executed and failed, OR
	// the distributor reports success while the Execution is in the RUNNING
	// state.
	//
	// Attempts: the last Execution had a FAILED Status.
	//
	// Retryable.
	AbnormalFinish_FAILED AbnormalFinish_Status = 1
	// This entity failed in a bad way.
	//
	// Executions: The distributor told us that the job died violently while in
	// the SCHEDULING, RUNNING or STOPPING state.
	//
	// Attempts: the last Execution had a CRASHED Status.
	//
	// Retryable.
	AbnormalFinish_CRASHED AbnormalFinish_Status = 2
	// Waited too long for the job to start.
	//
	// Executions: the distributor couldn't start the job in time, OR DM failed
	// to get a status update from the distributor in time (e.g. the state was
	// SCHEDULING for too long).
	//
	// Attempts: the last Execution had an EXPIRED Status.
	//
	// Retryable.
	AbnormalFinish_EXPIRED AbnormalFinish_Status = 3
	// The job started, but took too long.
	//
	// Executions: the distributor started the job, but it couldn't complete in
	// time, OR DM failed to get a status update from the distributor in time
	// (e.g. the state was RUNNING for too long).
	//
	// Attempts: the last Execution had an TIMED_OUT Status.
	//
	// Retryable.
	AbnormalFinish_TIMED_OUT AbnormalFinish_Status = 4
	// The job was cancelled by an external entity (human, automated system).
	//
	// Executions: the distributor informing DM that the job was preemptively
	// cancelled.
	//
	// Attempts: the last Execution had a CANCELLED Status, or this Attempt
	// was cancelled via DM.
	AbnormalFinish_CANCELLED AbnormalFinish_Status = 5
	// The job was prevented from running by the distributor (quota, permissions,
	// etc.)
	//
	// Executions: the distributor refused to run this job.
	//
	// Attempts: the last Execution had a REJECTED Status.
	AbnormalFinish_REJECTED AbnormalFinish_Status = 6
	// The job is unrecognized.
	//
	// Executions: the distributor doesn't know about this job, or has forgotten
	// about it.
	//
	// Attempts: the last Execution had a MISSING Status.
	AbnormalFinish_MISSING AbnormalFinish_Status = 7
	// The distributor ran the job, but returned garbage.
	//
	// Executions: the distributor returned a nominally successful result, but
	// the Data portion of the result wasn't able to be normalized.
	//
	// Attempts: the last Execution had a RESULT_MALFORMED Status.
	AbnormalFinish_RESULT_MALFORMED AbnormalFinish_Status = 8
)

func (AbnormalFinish_Status) CouldRetry

func (s AbnormalFinish_Status) CouldRetry() bool

CouldRetry returns true iff this status code is retryable.

func (AbnormalFinish_Status) EnumDescriptor

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

func (AbnormalFinish_Status) String

func (x AbnormalFinish_Status) String() string

type ActivateExecutionReq

type ActivateExecutionReq struct {
	// Auth is the Execution_Auth containing the Activation Token, as provided
	// to the distributor when the Execution was created.
	Auth *Execution_Auth `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
	// ExecutionToken should be randomly generated by the machine running the
	// execution, or by the distributor service such that if two racing Executions
	// both attempt to Activate with the same ExecutionID and ActivationToken, the
	// ExecutionToken will (probably) be different for them so that only one will
	// win.
	ExecutionToken []byte `protobuf:"bytes,2,opt,name=execution_token,json=executionToken,proto3" json:"execution_token,omitempty"`
}

ActivateExecutionReq allows a currently-running Execution to activate itself. Doing this allows DM to know that the Execution has started, and also enables the Execution to access other APIs like WalkGraph, AddDeps, and FinishAttempt.

ActivateExecution must be called with the ExecutionID and Activation token that DM provided when the Execution was started with the distributor.

If the Execution has not been activated, the Execution will be marked as 'activating' and this will return an OK code. At this point, your client may use the ExecutionToken with any RPCs that have an ExecutionAuth field.

This RPC may return:

  • OK - The Execution is now activated.
  • InvalidArgmument - The request was malformed. Retrying will not help.
  • PermissionDenied - The provided activation token was incorrect. Retrying will not help.
  • AlreadyExists - The activation token was correct, but some other entity already activated this Execution. The client should cease operations. Retrying will not help.

All other errors should be retried with the exact same ActivateExecutionReq data.

func (*ActivateExecutionReq) Descriptor

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

func (*ActivateExecutionReq) GetAuth

func (m *ActivateExecutionReq) GetAuth() *Execution_Auth

func (*ActivateExecutionReq) GetExecutionToken

func (m *ActivateExecutionReq) GetExecutionToken() []byte

func (*ActivateExecutionReq) Normalize

func (a *ActivateExecutionReq) Normalize() error

Normalize returns an error iff the ActivateExecutionReq has bad form (nils, insufficient activation token length, etc.

func (*ActivateExecutionReq) ProtoMessage

func (*ActivateExecutionReq) ProtoMessage()

func (*ActivateExecutionReq) Reset

func (m *ActivateExecutionReq) Reset()

func (*ActivateExecutionReq) String

func (m *ActivateExecutionReq) String() string

type Attempt

type Attempt struct {
	Id *Attempt_ID `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// DNE is set to true if this Attempt does not exist. None of the following
	// fields are valid if this is set to true.
	DNE  bool          `protobuf:"varint,2,opt,name=DNE" json:"DNE,omitempty"`
	Data *Attempt_Data `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
	// key is the `id` field of the Execution.ID
	Executions map[uint32]*Execution `` /* 141-byte string literal not displayed */
	FwdDeps    *AttemptList          `protobuf:"bytes,5,opt,name=fwd_deps,json=fwdDeps" json:"fwd_deps,omitempty"`
	BackDeps   *AttemptList          `protobuf:"bytes,6,opt,name=back_deps,json=backDeps" json:"back_deps,omitempty"`
	// Partial values are true iff the request asked for AttemptData, Executions
	// or Deps, but wasn't able to completely fill them. If Partial is omitted,
	// it means that no partial data exists in this Attempt.
	Partial *Attempt_Partial `protobuf:"bytes,16,opt,name=partial" json:"partial,omitempty"`
}

func NewAttemptAbnormalFinish

func NewAttemptAbnormalFinish(af *AbnormalFinish) *Attempt

NewAttemptAbnormalFinish creates an Attempt in the ABNORMAL_FINISH state.

func NewAttemptExecuting

func NewAttemptExecuting(curExID uint32) *Attempt

NewAttemptExecuting creates an Attempt in the EXECUTING state.

func NewAttemptFinished

func NewAttemptFinished(result *JsonResult) *Attempt

NewAttemptFinished creates an Attempt in the FINISHED state.

func NewAttemptScheduling

func NewAttemptScheduling() *Attempt

NewAttemptScheduling creates an Attempt in the SCHEDULING state.

func NewAttemptWaiting

func NewAttemptWaiting(numWaiting uint32) *Attempt

NewAttemptWaiting creates an Attempt in the WAITING state.

func (*Attempt) Descriptor

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

func (*Attempt) GetBackDeps

func (m *Attempt) GetBackDeps() *AttemptList

func (*Attempt) GetDNE

func (m *Attempt) GetDNE() bool

func (*Attempt) GetData

func (m *Attempt) GetData() *Attempt_Data

func (*Attempt) GetExecutions

func (m *Attempt) GetExecutions() map[uint32]*Execution

func (*Attempt) GetFwdDeps

func (m *Attempt) GetFwdDeps() *AttemptList

func (*Attempt) GetId

func (m *Attempt) GetId() *Attempt_ID

func (*Attempt) GetPartial

func (m *Attempt) GetPartial() *Attempt_Partial

func (*Attempt) NormalizePartial

func (d *Attempt) NormalizePartial()

NormalizePartial will nil out the Partial field for this Attempt if all Partial fields are false.

func (*Attempt) ProtoMessage

func (*Attempt) ProtoMessage()

func (*Attempt) PurgeTimestamps

func (a *Attempt) PurgeTimestamps()

PurgeTimestamps implements TimestampPurger.

func (*Attempt) Reset

func (m *Attempt) Reset()

func (*Attempt) String

func (m *Attempt) String() string

func (*Attempt) UpdateWith

func (a *Attempt) UpdateWith(other *Attempt)

UpdateWith updates this Attempt with data from other.

type AttemptList

type AttemptList struct {
	// To is a map of quests-to-attempts to depend on. So if you want to depend
	// on the attempt "foo|1", "foo|2" and "bar|1", this would look like:
	//   {
	//     "foo": [1, 2],
	//     "bar": [1],
	//   }
	To map[string]*AttemptList_Nums `protobuf:"bytes,2,rep,name=to" json:"to,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}

AttemptList is logically a listing of unique attempts, which has a compact representation in the common scenario of listing multiple attempts of the same quest(s).

func NewAttemptList

func NewAttemptList(data map[string][]uint32) *AttemptList

NewAttemptList is a convenience method for making a normalized *AttemptList with a pre-normalized literal map of quest -> attempt nums.

If the provided data is invalid, this method will panic.

func (*AttemptList) AddAIDs

func (a *AttemptList) AddAIDs(aids ...*Attempt_ID)

AddAIDs adds the given Attempt_ID to the AttemptList

func (*AttemptList) Descriptor

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

func (*AttemptList) Dup

func (a *AttemptList) Dup() *AttemptList

Dup does a deep copy of this AttemptList.

func (*AttemptList) GetTo

func (m *AttemptList) GetTo() map[string]*AttemptList_Nums

func (*AttemptList) Normalize

func (a *AttemptList) Normalize() error

Normalize sorts and uniq's attempt nums

func (*AttemptList) ProtoMessage

func (*AttemptList) ProtoMessage()

func (*AttemptList) Reset

func (m *AttemptList) Reset()

func (*AttemptList) String

func (m *AttemptList) String() string

func (*AttemptList) UpdateWith

func (a *AttemptList) UpdateWith(o *AttemptList)

UpdateWith updates this AttemptList with all the entries in the other AttemptList.

type AttemptList_Nums

type AttemptList_Nums struct {
	Nums []uint32 `protobuf:"varint,1,rep,packed,name=nums" json:"nums,omitempty"`
}

func (*AttemptList_Nums) Descriptor

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

func (*AttemptList_Nums) GetNums

func (m *AttemptList_Nums) GetNums() []uint32

func (*AttemptList_Nums) Normalize

func (a *AttemptList_Nums) Normalize() error

Normalize sorts and uniq's attempt nums. If Nums equals [0], [] or nil, it implies all attempts for the quest and will be normalized to nil.

It is an error for Nums to contain 0 as well as other numbers.

func (*AttemptList_Nums) ProtoMessage

func (*AttemptList_Nums) ProtoMessage()

func (*AttemptList_Nums) Reset

func (m *AttemptList_Nums) Reset()

func (*AttemptList_Nums) String

func (m *AttemptList_Nums) String() string

type Attempt_Data

type Attempt_Data struct {
	Created       *google_protobuf1.Timestamp `protobuf:"bytes,1,opt,name=created" json:"created,omitempty"`
	Modified      *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=modified" json:"modified,omitempty"`
	NumExecutions uint32                      `protobuf:"varint,3,opt,name=num_executions,json=numExecutions" json:"num_executions,omitempty"`
	// Types that are valid to be assigned to AttemptType:
	//	*Attempt_Data_Scheduling_
	//	*Attempt_Data_Executing_
	//	*Attempt_Data_Waiting_
	//	*Attempt_Data_Finished_
	//	*Attempt_Data_AbnormalFinish
	AttemptType isAttempt_Data_AttemptType `protobuf_oneof:"attempt_type"`
}

func (*Attempt_Data) Descriptor

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

func (*Attempt_Data) GetAbnormalFinish

func (m *Attempt_Data) GetAbnormalFinish() *AbnormalFinish

func (*Attempt_Data) GetAttemptType

func (m *Attempt_Data) GetAttemptType() isAttempt_Data_AttemptType

func (*Attempt_Data) GetCreated

func (m *Attempt_Data) GetCreated() *google_protobuf1.Timestamp

func (*Attempt_Data) GetExecuting

func (m *Attempt_Data) GetExecuting() *Attempt_Data_Executing

func (*Attempt_Data) GetFinished

func (m *Attempt_Data) GetFinished() *Attempt_Data_Finished

func (*Attempt_Data) GetModified

func (m *Attempt_Data) GetModified() *google_protobuf1.Timestamp

func (*Attempt_Data) GetNumExecutions

func (m *Attempt_Data) GetNumExecutions() uint32

func (*Attempt_Data) GetScheduling

func (m *Attempt_Data) GetScheduling() *Attempt_Data_Scheduling

func (*Attempt_Data) GetWaiting

func (m *Attempt_Data) GetWaiting() *Attempt_Data_Waiting

func (*Attempt_Data) ProtoMessage

func (*Attempt_Data) ProtoMessage()

func (*Attempt_Data) PurgeTimestamps

func (ad *Attempt_Data) PurgeTimestamps()

PurgeTimestamps implements TimestampPurger.

func (*Attempt_Data) Reset

func (m *Attempt_Data) Reset()

func (*Attempt_Data) State

func (d *Attempt_Data) State() Attempt_State

State computes the Attempt_State for the current Attempt_Data

func (*Attempt_Data) String

func (m *Attempt_Data) String() string

func (*Attempt_Data) UpdateWith

func (a *Attempt_Data) UpdateWith(other *Attempt_Data)

UpdateWith updates this Attempt_Data with data from other.

func (*Attempt_Data) XXX_OneofFuncs

func (*Attempt_Data) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Attempt_Data_AbnormalFinish

type Attempt_Data_AbnormalFinish struct {
	AbnormalFinish *AbnormalFinish `protobuf:"bytes,9,opt,name=abnormal_finish,json=abnormalFinish,oneof"`
}

type Attempt_Data_Executing

type Attempt_Data_Executing struct {
	CurExecutionId uint32 `protobuf:"varint,1,opt,name=cur_execution_id,json=curExecutionId" json:"cur_execution_id,omitempty"`
}

This attempt has a live Execution (with the specified ID). Check the Execution state for more information.

func (*Attempt_Data_Executing) Descriptor

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

func (*Attempt_Data_Executing) GetCurExecutionId

func (m *Attempt_Data_Executing) GetCurExecutionId() uint32

func (*Attempt_Data_Executing) ProtoMessage

func (*Attempt_Data_Executing) ProtoMessage()

func (*Attempt_Data_Executing) Reset

func (m *Attempt_Data_Executing) Reset()

func (*Attempt_Data_Executing) String

func (m *Attempt_Data_Executing) String() string

type Attempt_Data_Executing_

type Attempt_Data_Executing_ struct {
	Executing *Attempt_Data_Executing `protobuf:"bytes,6,opt,name=executing,oneof"`
}

type Attempt_Data_Finished

type Attempt_Data_Finished struct {
	// The result of the Attempt. To obtain the distributor specific result
	// for the last execution, make sure to include at least one Execution in
	// your query.
	//
	// Only if `include.attempt.data == true`, will the response include
	// data.object.
	Data *JsonResult `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
}

This attempt is complete.

func (*Attempt_Data_Finished) Descriptor

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

func (*Attempt_Data_Finished) GetData

func (m *Attempt_Data_Finished) GetData() *JsonResult

func (*Attempt_Data_Finished) ProtoMessage

func (*Attempt_Data_Finished) ProtoMessage()

func (*Attempt_Data_Finished) Reset

func (m *Attempt_Data_Finished) Reset()

func (*Attempt_Data_Finished) String

func (m *Attempt_Data_Finished) String() string

type Attempt_Data_Finished_

type Attempt_Data_Finished_ struct {
	Finished *Attempt_Data_Finished `protobuf:"bytes,8,opt,name=finished,oneof"`
}

func (*Attempt_Data_Finished_) PurgeTimestamps

func (f *Attempt_Data_Finished_) PurgeTimestamps()

PurgeTimestamps implements TimestampPurger.

type Attempt_Data_Scheduling

type Attempt_Data_Scheduling struct {
}

This attempt is ready to be Executed, but hasn't been sent to the distributor yet.

func (*Attempt_Data_Scheduling) Descriptor

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

func (*Attempt_Data_Scheduling) ProtoMessage

func (*Attempt_Data_Scheduling) ProtoMessage()

func (*Attempt_Data_Scheduling) Reset

func (m *Attempt_Data_Scheduling) Reset()

func (*Attempt_Data_Scheduling) String

func (m *Attempt_Data_Scheduling) String() string

type Attempt_Data_Scheduling_

type Attempt_Data_Scheduling_ struct {
	Scheduling *Attempt_Data_Scheduling `protobuf:"bytes,5,opt,name=scheduling,oneof"`
}

type Attempt_Data_Waiting

type Attempt_Data_Waiting struct {
	NumWaiting uint32 `protobuf:"varint,1,opt,name=num_waiting,json=numWaiting" json:"num_waiting,omitempty"`
}

This attempt's last Execution stopped by adding dependencies.

func (*Attempt_Data_Waiting) Descriptor

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

func (*Attempt_Data_Waiting) GetNumWaiting

func (m *Attempt_Data_Waiting) GetNumWaiting() uint32

func (*Attempt_Data_Waiting) ProtoMessage

func (*Attempt_Data_Waiting) ProtoMessage()

func (*Attempt_Data_Waiting) Reset

func (m *Attempt_Data_Waiting) Reset()

func (*Attempt_Data_Waiting) String

func (m *Attempt_Data_Waiting) String() string

type Attempt_Data_Waiting_

type Attempt_Data_Waiting_ struct {
	Waiting *Attempt_Data_Waiting `protobuf:"bytes,7,opt,name=waiting,oneof"`
}

type Attempt_ID

type Attempt_ID struct {
	Quest string `protobuf:"bytes,1,opt,name=quest" json:"quest,omitempty"`
	Id    uint32 `protobuf:"varint,2,opt,name=id" json:"id,omitempty"`
}

func NewAttemptID

func NewAttemptID(qst string, aid uint32) *Attempt_ID

NewAttemptID is a shorthand to New a new *Attempt_ID

func (*Attempt_ID) DMEncoded

func (a *Attempt_ID) DMEncoded() string

DMEncoded returns the encoded string id for this Attempt. Numeric values are inverted if flip is true.

func (*Attempt_ID) Descriptor

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

func (*Attempt_ID) Equals

func (a *Attempt_ID) Equals(o *Attempt_ID) bool

Equals returns true iff the two Attempt_IDs are equivalent.

func (*Attempt_ID) Execution

func (a *Attempt_ID) Execution(eid uint32) *Execution_ID

Execution returns an Execution_ID for this Attempt.

func (*Attempt_ID) FromProperty

func (a *Attempt_ID) FromProperty(p datastore.Property) error

FromProperty implements datastore.PropertyConverter

func (*Attempt_ID) GetId

func (m *Attempt_ID) GetId() uint32

func (*Attempt_ID) GetQuest

func (m *Attempt_ID) GetQuest() string

func (*Attempt_ID) ProtoMessage

func (*Attempt_ID) ProtoMessage()

func (*Attempt_ID) QuestID

func (a *Attempt_ID) QuestID() *Quest_ID

QuestID is a helper function to obtain the *Quest_ID from this Attempt_ID.

func (*Attempt_ID) Reset

func (m *Attempt_ID) Reset()

func (*Attempt_ID) SetDMEncoded

func (a *Attempt_ID) SetDMEncoded(val string) error

SetDMEncoded decodes val into this Attempt_ID, returning an error if there's a problem. Numeric values are inverted if flip is true.

func (*Attempt_ID) String

func (m *Attempt_ID) String() string

func (*Attempt_ID) ToProperty

func (a *Attempt_ID) ToProperty() (datastore.Property, error)

ToProperty implements datastore.PropertyConverter for the purpose of embedding this Attempt_ID as the ID of a luci/gae compatible datastore object. The numerical id field is stored as an inverted, hex-encoded string, so that Attempt_ID{"quest", 1} would encode as "quest|fffffffe". This is done so that the __key__ ordering in the dm application prefers to order the most recent attempts first.

The go representation will always have the normal non-flipped numerical id.

type Attempt_Partial

type Attempt_Partial struct {
	// Data is true iff the AttemptData should have been filled, but wasn't
	Data bool `protobuf:"varint,1,opt,name=data" json:"data,omitempty"`
	// Executions is true iff the Executions were requested, but not all of
	// them could be loaded.
	Executions bool `protobuf:"varint,2,opt,name=executions" json:"executions,omitempty"`
	// FwdDeps is true iff FwdDeps were requested, but not all of them could be
	// loaded.
	FwdDeps bool `protobuf:"varint,3,opt,name=fwd_deps,json=fwdDeps" json:"fwd_deps,omitempty"`
	// BackDeps is true iff BackDeps were requested, but not all of them could be
	// loaded.
	BackDeps bool `protobuf:"varint,4,opt,name=back_deps,json=backDeps" json:"back_deps,omitempty"`
	// result is set if AttemptResults were requested, and the attempt_type is
	// Finished, but for some reason the result but wasn't loaded.
	Result Attempt_Partial_Result `protobuf:"varint,5,opt,name=result,enum=dm.Attempt_Partial_Result" json:"result,omitempty"`
}

func (*Attempt_Partial) Any

func (p *Attempt_Partial) Any() bool

Any returns true iff any of the Partial fields are true such that they could be successfully loaded on a subsequent query.

func (*Attempt_Partial) Descriptor

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

func (*Attempt_Partial) GetBackDeps

func (m *Attempt_Partial) GetBackDeps() bool

func (*Attempt_Partial) GetData

func (m *Attempt_Partial) GetData() bool

func (*Attempt_Partial) GetExecutions

func (m *Attempt_Partial) GetExecutions() bool

func (*Attempt_Partial) GetFwdDeps

func (m *Attempt_Partial) GetFwdDeps() bool

func (*Attempt_Partial) GetResult

func (m *Attempt_Partial) GetResult() Attempt_Partial_Result

func (*Attempt_Partial) ProtoMessage

func (*Attempt_Partial) ProtoMessage()

func (*Attempt_Partial) Reset

func (m *Attempt_Partial) Reset()

func (*Attempt_Partial) String

func (m *Attempt_Partial) String() string

type Attempt_Partial_Result

type Attempt_Partial_Result int32
const (
	// LOADED implies that the result was, in fact, loaded.
	Attempt_Partial_LOADED Attempt_Partial_Result = 0
	// NOT_LOADED is set if the result failed to load because there was
	// a transient error or the request ran out of time.
	Attempt_Partial_NOT_LOADED Attempt_Partial_Result = 1
	// NOT_AUTHORIZED is set if the query was authenticated from an Execution
	// whose Attempt doesn't depend on this one.
	Attempt_Partial_NOT_AUTHORIZED Attempt_Partial_Result = 2
	// DATA_SIZE_LIMIT is set if the max_data_size limit was reached.
	Attempt_Partial_DATA_SIZE_LIMIT Attempt_Partial_Result = 3
)

func (Attempt_Partial_Result) EnumDescriptor

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

func (Attempt_Partial_Result) String

func (x Attempt_Partial_Result) String() string

type Attempt_State

type Attempt_State int32
const (
	// The Attempt is waiting to be Executed.
	Attempt_SCHEDULING Attempt_State = 0
	// The Attempt is currently waiting for its current Execution to finish.
	Attempt_EXECUTING Attempt_State = 1
	// The Attempt is waiting for dependent Attempts to be resolved.
	Attempt_WAITING Attempt_State = 2
	// The Attempt is in its final state.
	Attempt_FINISHED Attempt_State = 3
	// The Attempt is in an abnormal final state.
	Attempt_ABNORMAL_FINISHED Attempt_State = 4
)

func (Attempt_State) EnumDescriptor

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

func (*Attempt_State) Evolve

func (s *Attempt_State) Evolve(newState Attempt_State) error

Evolve attempts to evolve the state of this Attempt. If the state evolution is not allowed (e.g. invalid state transition), this returns an error.

func (*Attempt_State) MustEvolve

func (s *Attempt_State) MustEvolve(newState Attempt_State)

MustEvolve is a panic'ing version of Evolve.

func (Attempt_State) String

func (x Attempt_State) String() string

func (Attempt_State) Terminal

func (s Attempt_State) Terminal() bool

Terminal returns true iff there are no valid evolutions from the current state.

type DecoratedDeps

type DecoratedDeps struct {
	// Service is the service to decorate.
	Service DepsServer
	// Prelude is called for each method before forwarding the call to Service.
	// If Prelude returns an error, then the call is skipped and the error is
	// processed via the Postlude (if one is defined), or it is returned directly.
	Prelude func(c context.Context, methodName string, req proto.Message) (context.Context, error)
	// Postlude is called for each method after Service has processed the call, or
	// after the Prelude has returned an error. This takes the the Service's
	// response proto (which may be nil) and/or any error. The decorated
	// service will return the response (possibly mutated) and error that Postlude
	// returns.
	Postlude func(c context.Context, methodName string, rsp proto.Message, err error) error
}

func (*DecoratedDeps) ActivateExecution

func (s *DecoratedDeps) ActivateExecution(c context.Context, req *ActivateExecutionReq) (rsp *google_protobuf2.Empty, err error)

func (*DecoratedDeps) EnsureGraphData

func (s *DecoratedDeps) EnsureGraphData(c context.Context, req *EnsureGraphDataReq) (rsp *EnsureGraphDataRsp, err error)

func (*DecoratedDeps) FinishAttempt

func (s *DecoratedDeps) FinishAttempt(c context.Context, req *FinishAttemptReq) (rsp *google_protobuf2.Empty, err error)

func (*DecoratedDeps) WalkGraph

func (s *DecoratedDeps) WalkGraph(c context.Context, req *WalkGraphReq) (rsp *GraphData, err error)

type DepsClient

type DepsClient interface {
	// allows you to add additional data to the current dependency graph.
	EnsureGraphData(ctx context.Context, in *EnsureGraphDataReq, opts ...grpc.CallOption) (*EnsureGraphDataRsp, error)
	// is called by Execution clients to activate themselves with DM.
	ActivateExecution(ctx context.Context, in *ActivateExecutionReq, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	// is called by Execution clients to indicate that an Attempt is finished.
	FinishAttempt(ctx context.Context, in *FinishAttemptReq, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	// runs queries, and walks along the dependency graph from the query results.
	WalkGraph(ctx context.Context, in *WalkGraphReq, opts ...grpc.CallOption) (*GraphData, error)
}

func NewDepsClient

func NewDepsClient(cc *grpc.ClientConn) DepsClient

func NewDepsPRPCClient

func NewDepsPRPCClient(client *prpc.Client) DepsClient

type DepsServer

type DepsServer interface {
	// allows you to add additional data to the current dependency graph.
	EnsureGraphData(context.Context, *EnsureGraphDataReq) (*EnsureGraphDataRsp, error)
	// is called by Execution clients to activate themselves with DM.
	ActivateExecution(context.Context, *ActivateExecutionReq) (*google_protobuf2.Empty, error)
	// is called by Execution clients to indicate that an Attempt is finished.
	FinishAttempt(context.Context, *FinishAttemptReq) (*google_protobuf2.Empty, error)
	// runs queries, and walks along the dependency graph from the query results.
	WalkGraph(context.Context, *WalkGraphReq) (*GraphData, error)
}

type EnsureGraphDataReq

type EnsureGraphDataReq struct {
	// Quest is a list of quest descriptors. DM will ensure that the
	// corresponding Quests exist. If they don't, they'll be created.
	Quest []*Quest_Desc `protobuf:"bytes,1,rep,name=quest" json:"quest,omitempty"`
	// QuestAttempt allows the addition of attempts which are derived from
	// the quest bodies provided above.
	// Each entry here maps 1:1 with the equivalent quest.
	QuestAttempt []*AttemptList_Nums `protobuf:"bytes,2,rep,name=quest_attempt,json=questAttempt" json:"quest_attempt,omitempty"`
	// TemplateQuest allows the addition of quests which are derived from
	// Templates, as defined on a per-project basis.
	TemplateQuest []*TemplateInstantiation `protobuf:"bytes,3,rep,name=template_quest,json=templateQuest" json:"template_quest,omitempty"`
	// TemplateAttempt allows the addition of attempts which are derived from
	// Templates. This must be equal in length to template_quest.
	// Each entry here maps 1:1 with the equivalent quest in template_quest.
	TemplateAttempt []*AttemptList_Nums `protobuf:"bytes,4,rep,name=template_attempt,json=templateAttempt" json:"template_attempt,omitempty"`
	// RawAttempts is a list that asserts that the following attempts should
	// exist. The quest ids in this list must be already-known to DM, NOT
	// included in the quest field above. This is useful when you know the ID of
	// the Quest, but not the actual definition of the quest.
	RawAttempts *AttemptList `protobuf:"bytes,5,opt,name=raw_attempts,json=rawAttempts" json:"raw_attempts,omitempty"`
	// ForExecution is an authentication pair (Execution_ID, Token).
	//
	// If this is provided then it will serve as authorization for the creation of
	// any `quests` included, and any `attempts` indicated will be set as
	// dependencies for the execution.
	//
	// If this omitted, then the request requires some user/bot authentication,
	// and any quests/attempts provided will be made standalone (e.g. nothing will
	// depend on them).
	ForExecution *Execution_Auth             `protobuf:"bytes,6,opt,name=for_execution,json=forExecution" json:"for_execution,omitempty"`
	Limit        *EnsureGraphDataReq_Limit   `protobuf:"bytes,7,opt,name=limit" json:"limit,omitempty"`
	Include      *EnsureGraphDataReq_Include `protobuf:"bytes,8,opt,name=include" json:"include,omitempty"`
}

EnsureGraphDataReq allows you to assert the existence of Attempts in DM's graph, and allows you to declare dependencies from one Attempt to another.

You can declare Attempts by any combination of:

  • Providing a quest description plus a list of Attempt numbers for that quest.
  • Providing a template instantiation (for a project-declared quest template) plus a list of Attempt numbers for that quest.
  • Providing a raw set of quest_id -> attempt numbers for quests that you already know that DM has a definition for.

In response, DM will tell you what the IDs of all supplied Quests/Attempts are.

To create a dependencies, call this method while running as part of an execution by filling the for_execution field. All attempts named as described above will become dependencies for the indicated execution. It is only possible for a currently-running execution to create dependencies for its own Attempt. In particular, it is not possible to create dependencies as a non-execution user (e.g. a human), nor is it possible for an execution to create attempts on behalf of some other execution.

If the attempts were being created as dependencies, and were already in the Finished state, this request can also opt to include the AttemptResults directly.

func (*EnsureGraphDataReq) Descriptor

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

func (*EnsureGraphDataReq) GetForExecution

func (m *EnsureGraphDataReq) GetForExecution() *Execution_Auth

func (*EnsureGraphDataReq) GetInclude

func (*EnsureGraphDataReq) GetLimit

func (*EnsureGraphDataReq) GetQuest

func (m *EnsureGraphDataReq) GetQuest() []*Quest_Desc

func (*EnsureGraphDataReq) GetQuestAttempt

func (m *EnsureGraphDataReq) GetQuestAttempt() []*AttemptList_Nums

func (*EnsureGraphDataReq) GetRawAttempts

func (m *EnsureGraphDataReq) GetRawAttempts() *AttemptList

func (*EnsureGraphDataReq) GetTemplateAttempt

func (m *EnsureGraphDataReq) GetTemplateAttempt() []*AttemptList_Nums

func (*EnsureGraphDataReq) GetTemplateQuest

func (m *EnsureGraphDataReq) GetTemplateQuest() []*TemplateInstantiation

func (*EnsureGraphDataReq) Normalize

func (r *EnsureGraphDataReq) Normalize() error

Normalize returns an error iff the request is invalid.

func (*EnsureGraphDataReq) ProtoMessage

func (*EnsureGraphDataReq) ProtoMessage()

func (*EnsureGraphDataReq) Reset

func (m *EnsureGraphDataReq) Reset()

func (*EnsureGraphDataReq) String

func (m *EnsureGraphDataReq) String() string

type EnsureGraphDataReq_Include

type EnsureGraphDataReq_Include struct {
	Attempt *EnsureGraphDataReq_Include_Options `protobuf:"bytes,4,opt,name=attempt" json:"attempt,omitempty"`
}

func (*EnsureGraphDataReq_Include) Descriptor

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

func (*EnsureGraphDataReq_Include) GetAttempt

func (*EnsureGraphDataReq_Include) ProtoMessage

func (*EnsureGraphDataReq_Include) ProtoMessage()

func (*EnsureGraphDataReq_Include) Reset

func (m *EnsureGraphDataReq_Include) Reset()

func (*EnsureGraphDataReq_Include) String

func (m *EnsureGraphDataReq_Include) String() string

type EnsureGraphDataReq_Include_Options

type EnsureGraphDataReq_Include_Options struct {
	// Instructs finished objects to include the Result field.
	Result bool `protobuf:"varint,3,opt,name=result" json:"result,omitempty"`
}

func (*EnsureGraphDataReq_Include_Options) Descriptor

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

func (*EnsureGraphDataReq_Include_Options) GetResult

func (*EnsureGraphDataReq_Include_Options) ProtoMessage

func (*EnsureGraphDataReq_Include_Options) ProtoMessage()

func (*EnsureGraphDataReq_Include_Options) Reset

func (*EnsureGraphDataReq_Include_Options) String

type EnsureGraphDataReq_Limit

type EnsureGraphDataReq_Limit struct {
	// MaxDataSize sets the maximum amount of 'Data' (in bytes) that can be
	// returned, if include.attempt_result is set. If this limit is hit, then
	// the appropriate 'partial' value will be set for that object, but the base
	// object would still be included in the result.
	//
	// If this limit is 0, a default limit of 16MB will be used. If this limit
	// exceeds 30MB, it will be reduced to 30MB.
	MaxDataSize uint32 `protobuf:"varint,3,opt,name=max_data_size,json=maxDataSize" json:"max_data_size,omitempty"`
}

func (*EnsureGraphDataReq_Limit) Descriptor

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

func (*EnsureGraphDataReq_Limit) GetMaxDataSize

func (m *EnsureGraphDataReq_Limit) GetMaxDataSize() uint32

func (*EnsureGraphDataReq_Limit) ProtoMessage

func (*EnsureGraphDataReq_Limit) ProtoMessage()

func (*EnsureGraphDataReq_Limit) Reset

func (m *EnsureGraphDataReq_Limit) Reset()

func (*EnsureGraphDataReq_Limit) String

func (m *EnsureGraphDataReq_Limit) String() string

type EnsureGraphDataRsp

type EnsureGraphDataRsp struct {
	// accepted is true when all new graph data was journaled successfully. This
	// means that `quests`, `attempts`, `template_quest`, `template_attempt` were
	// all well-formed and are scheduled to be added. They will 'eventually' be
	// readable via other APIs (like WalkGraph), but when they are, they'll have
	// the IDs reflected in this response.
	//
	// If `attempts` referrs to quests that don't exist and weren't provided in
	// `quests`, those quests will be listed in `result` with the DNE flag set.
	//
	// If `template_quest` had errors (missing template, bad params, etc.), the
	// errors will be located in `template_error`. If all of the templates parsed
	// successfully, the quest ids for those rendered `template_quest` will be in
	// `template_ids`.
	Accepted bool `protobuf:"varint,1,opt,name=accepted" json:"accepted,omitempty"`
	// quest_ids will be populated with the Quest.IDs of any quests defined
	// by quest in the initial request. Its length is guaranteed to match
	// the length of quest, if there were no errors.
	QuestIds []*Quest_ID `protobuf:"bytes,2,rep,name=quest_ids,json=questIds" json:"quest_ids,omitempty"`
	// template_ids will be populated with the Quest.IDs of any templates defined
	// by template_quest in the initial request. Its length is guaranteed to match
	// the length of template_quest, if there were no errors.
	TemplateIds []*Quest_ID `protobuf:"bytes,3,rep,name=template_ids,json=templateIds" json:"template_ids,omitempty"`
	// template_error is either empty if there were no template errors, or the
	// length of template_quest. Non-empty strings are errors.
	TemplateError []string `protobuf:"bytes,4,rep,name=template_error,json=templateError" json:"template_error,omitempty"`
	// result holds the graph data pertaining to the request, containing any
	// graph state that already existed at the time of the call. Any new data
	// that was added to the graph state (accepted==true) will appear with
	// `DNE==true`.
	//
	// Quest data will always be returned for any Quests which exist.
	//
	// If accepted==false, you can inspect this to determine why:
	//   * Quests (without data) mentioned by the `attempts` field that do not
	//     exist will have `DNE==true`.
	//
	// This also can be used to make adding dependencies a stateless
	// single-request action:
	//   * Attempts requested (assuming the corresponding Quest exists) will
	//     contain their current state. If Include.AttemptResult was true, the
	//     results will be populated (with the size limit mentioned in the request
	//     documentation).
	Result *GraphData `protobuf:"bytes,5,opt,name=result" json:"result,omitempty"`
	// (if `for_execution` was specified) ShouldHalt indicates that the request
	// was accepted by DM, and the execution should halt (DM will re-execute the
	// Attempt when it becomes unblocked). If this is true, then the execution's
	// auth Token is also revoked and will no longer work for futher API calls.
	//
	// If `for_execution` was provided in the request and this is false, it means
	// that the execution may continue executing.
	ShouldHalt bool `protobuf:"varint,6,opt,name=should_halt,json=shouldHalt" json:"should_halt,omitempty"`
}

func (*EnsureGraphDataRsp) Descriptor

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

func (*EnsureGraphDataRsp) GetAccepted

func (m *EnsureGraphDataRsp) GetAccepted() bool

func (*EnsureGraphDataRsp) GetQuestIds

func (m *EnsureGraphDataRsp) GetQuestIds() []*Quest_ID

func (*EnsureGraphDataRsp) GetResult

func (m *EnsureGraphDataRsp) GetResult() *GraphData

func (*EnsureGraphDataRsp) GetShouldHalt

func (m *EnsureGraphDataRsp) GetShouldHalt() bool

func (*EnsureGraphDataRsp) GetTemplateError

func (m *EnsureGraphDataRsp) GetTemplateError() []string

func (*EnsureGraphDataRsp) GetTemplateIds

func (m *EnsureGraphDataRsp) GetTemplateIds() []*Quest_ID

func (*EnsureGraphDataRsp) ProtoMessage

func (*EnsureGraphDataRsp) ProtoMessage()

func (*EnsureGraphDataRsp) Reset

func (m *EnsureGraphDataRsp) Reset()

func (*EnsureGraphDataRsp) String

func (m *EnsureGraphDataRsp) String() string

type Execution

type Execution struct {
	Id   *Execution_ID   `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Data *Execution_Data `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
	// Partial is true iff the request asked for Executions, but wasn't able to
	// completely fill them.
	Partial bool `protobuf:"varint,16,opt,name=partial" json:"partial,omitempty"`
}

func NewExecutionAbnormalFinish

func NewExecutionAbnormalFinish(af *AbnormalFinish) *Execution

NewExecutionAbnormalFinish creates an Execution in the ABNORMAL_FINISH state.

func NewExecutionFinished

func NewExecutionFinished(result *JsonResult) *Execution

NewExecutionFinished creates an Execution in the FINISHED state.

func NewExecutionRunning

func NewExecutionRunning() *Execution

NewExecutionRunning creates an Execution in the RUNNING state.

func NewExecutionScheduling

func NewExecutionScheduling() *Execution

NewExecutionScheduling creates an Execution in the SCHEDULING state.

func NewExecutionStopping

func NewExecutionStopping() *Execution

NewExecutionStopping creates an Execution in the STOPPING state.

func (*Execution) Descriptor

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

func (*Execution) GetData

func (m *Execution) GetData() *Execution_Data

func (*Execution) GetId

func (m *Execution) GetId() *Execution_ID

func (*Execution) GetPartial

func (m *Execution) GetPartial() bool

func (*Execution) ProtoMessage

func (*Execution) ProtoMessage()

func (*Execution) PurgeTimestamps

func (e *Execution) PurgeTimestamps()

PurgeTimestamps implements TimestampPurger.

func (*Execution) Reset

func (m *Execution) Reset()

func (*Execution) String

func (m *Execution) String() string

func (*Execution) UpdateWith

func (e *Execution) UpdateWith(other *Execution)

UpdateWith updates this Execution with data from other.

type Execution_Auth

type Execution_Auth struct {
	Id    *Execution_ID `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Token []byte        `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
}

Execution_Auth is a tuple of the requesting ExecutionID and the activated Execution Token (see the ActivateExecution rpc).

func (*Execution_Auth) Descriptor

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

func (*Execution_Auth) FromProperty

func (p *Execution_Auth) FromProperty(prop datastore.Property) error

FromProperty implements datastore.PropertyConverter. It parses a '[]byte' into an embedded 'Execution_Auth' when used with the "github.com/luci/gae" library.

func (*Execution_Auth) GetId

func (m *Execution_Auth) GetId() *Execution_ID

func (*Execution_Auth) GetToken

func (m *Execution_Auth) GetToken() []byte

func (*Execution_Auth) Normalize

func (a *Execution_Auth) Normalize() error

Normalize returns an error iff the Execution_Auth has invalid form (e.g. contains nils).

func (*Execution_Auth) ProtoMessage

func (*Execution_Auth) ProtoMessage()

func (*Execution_Auth) Reset

func (m *Execution_Auth) Reset()

func (*Execution_Auth) String

func (m *Execution_Auth) String() string

func (*Execution_Auth) ToProperty

func (p *Execution_Auth) ToProperty() (prop datastore.Property, err error)

ToProperty implements datastore.PropertyConverter. It causes an embedded 'Execution_Auth' to serialize to an unindexed '[]byte' when used with the "github.com/luci/gae" library.

type Execution_Data

type Execution_Data struct {
	Created         *google_protobuf1.Timestamp     `protobuf:"bytes,1,opt,name=created" json:"created,omitempty"`
	Modified        *google_protobuf1.Timestamp     `protobuf:"bytes,2,opt,name=modified" json:"modified,omitempty"`
	DistributorInfo *Execution_Data_DistributorInfo `protobuf:"bytes,3,opt,name=distributor_info,json=distributorInfo" json:"distributor_info,omitempty"`
	// Types that are valid to be assigned to ExecutionType:
	//	*Execution_Data_Scheduling_
	//	*Execution_Data_Running_
	//	*Execution_Data_Stopping_
	//	*Execution_Data_Finished_
	//	*Execution_Data_AbnormalFinish
	ExecutionType isExecution_Data_ExecutionType `protobuf_oneof:"execution_type"`
}

func (*Execution_Data) Descriptor

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

func (*Execution_Data) GetAbnormalFinish

func (m *Execution_Data) GetAbnormalFinish() *AbnormalFinish

func (*Execution_Data) GetCreated

func (m *Execution_Data) GetCreated() *google_protobuf1.Timestamp

func (*Execution_Data) GetDistributorInfo

func (m *Execution_Data) GetDistributorInfo() *Execution_Data_DistributorInfo

func (*Execution_Data) GetExecutionType

func (m *Execution_Data) GetExecutionType() isExecution_Data_ExecutionType

func (*Execution_Data) GetFinished

func (m *Execution_Data) GetFinished() *Execution_Data_Finished

func (*Execution_Data) GetModified

func (m *Execution_Data) GetModified() *google_protobuf1.Timestamp

func (*Execution_Data) GetRunning

func (m *Execution_Data) GetRunning() *Execution_Data_Running

func (*Execution_Data) GetScheduling

func (m *Execution_Data) GetScheduling() *Execution_Data_Scheduling

func (*Execution_Data) GetStopping

func (m *Execution_Data) GetStopping() *Execution_Data_Stopping

func (*Execution_Data) ProtoMessage

func (*Execution_Data) ProtoMessage()

func (*Execution_Data) PurgeTimestamps

func (ed *Execution_Data) PurgeTimestamps()

PurgeTimestamps implements TimestampPurger.

func (*Execution_Data) Reset

func (m *Execution_Data) Reset()

func (*Execution_Data) State

func (d *Execution_Data) State() Execution_State

State computes the Execution_State for the current Execution_Data

func (*Execution_Data) String

func (m *Execution_Data) String() string

func (*Execution_Data) UpdateWith

func (e *Execution_Data) UpdateWith(other *Execution_Data)

UpdateWith updates this Execution_Data with data from other.

func (*Execution_Data) XXX_OneofFuncs

func (*Execution_Data) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Execution_Data_AbnormalFinish

type Execution_Data_AbnormalFinish struct {
	AbnormalFinish *AbnormalFinish `protobuf:"bytes,8,opt,name=abnormal_finish,json=abnormalFinish,oneof"`
}

type Execution_Data_DistributorInfo

type Execution_Data_DistributorInfo struct {
	ConfigName    string `protobuf:"bytes,1,opt,name=config_name,json=configName" json:"config_name,omitempty"`
	ConfigVersion string `protobuf:"bytes,2,opt,name=config_version,json=configVersion" json:"config_version,omitempty"`
	Token         string `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"`
	Url           string `protobuf:"bytes,4,opt,name=url" json:"url,omitempty"`
}

func (*Execution_Data_DistributorInfo) Descriptor

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

func (*Execution_Data_DistributorInfo) GetConfigName

func (m *Execution_Data_DistributorInfo) GetConfigName() string

func (*Execution_Data_DistributorInfo) GetConfigVersion

func (m *Execution_Data_DistributorInfo) GetConfigVersion() string

func (*Execution_Data_DistributorInfo) GetToken

func (m *Execution_Data_DistributorInfo) GetToken() string

func (*Execution_Data_DistributorInfo) GetUrl

func (*Execution_Data_DistributorInfo) ProtoMessage

func (*Execution_Data_DistributorInfo) ProtoMessage()

func (*Execution_Data_DistributorInfo) Reset

func (m *Execution_Data_DistributorInfo) Reset()

func (*Execution_Data_DistributorInfo) String

type Execution_Data_Finished

type Execution_Data_Finished struct {
	Data *JsonResult `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
}

func (*Execution_Data_Finished) Descriptor

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

func (*Execution_Data_Finished) GetData

func (m *Execution_Data_Finished) GetData() *JsonResult

func (*Execution_Data_Finished) ProtoMessage

func (*Execution_Data_Finished) ProtoMessage()

func (*Execution_Data_Finished) Reset

func (m *Execution_Data_Finished) Reset()

func (*Execution_Data_Finished) String

func (m *Execution_Data_Finished) String() string

type Execution_Data_Finished_

type Execution_Data_Finished_ struct {
	Finished *Execution_Data_Finished `protobuf:"bytes,7,opt,name=finished,oneof"`
}

type Execution_Data_Running

type Execution_Data_Running struct {
}

func (*Execution_Data_Running) Descriptor

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

func (*Execution_Data_Running) ProtoMessage

func (*Execution_Data_Running) ProtoMessage()

func (*Execution_Data_Running) Reset

func (m *Execution_Data_Running) Reset()

func (*Execution_Data_Running) String

func (m *Execution_Data_Running) String() string

type Execution_Data_Running_

type Execution_Data_Running_ struct {
	Running *Execution_Data_Running `protobuf:"bytes,5,opt,name=running,oneof"`
}

type Execution_Data_Scheduling

type Execution_Data_Scheduling struct {
}

func (*Execution_Data_Scheduling) Descriptor

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

func (*Execution_Data_Scheduling) ProtoMessage

func (*Execution_Data_Scheduling) ProtoMessage()

func (*Execution_Data_Scheduling) Reset

func (m *Execution_Data_Scheduling) Reset()

func (*Execution_Data_Scheduling) String

func (m *Execution_Data_Scheduling) String() string

type Execution_Data_Scheduling_

type Execution_Data_Scheduling_ struct {
	Scheduling *Execution_Data_Scheduling `protobuf:"bytes,4,opt,name=scheduling,oneof"`
}

type Execution_Data_Stopping

type Execution_Data_Stopping struct {
}

func (*Execution_Data_Stopping) Descriptor

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

func (*Execution_Data_Stopping) ProtoMessage

func (*Execution_Data_Stopping) ProtoMessage()

func (*Execution_Data_Stopping) Reset

func (m *Execution_Data_Stopping) Reset()

func (*Execution_Data_Stopping) String

func (m *Execution_Data_Stopping) String() string

type Execution_Data_Stopping_

type Execution_Data_Stopping_ struct {
	Stopping *Execution_Data_Stopping `protobuf:"bytes,6,opt,name=stopping,oneof"`
}

type Execution_ID

type Execution_ID struct {
	Quest   string `protobuf:"bytes,1,opt,name=quest" json:"quest,omitempty"`
	Attempt uint32 `protobuf:"varint,2,opt,name=attempt" json:"attempt,omitempty"`
	Id      uint32 `protobuf:"varint,3,opt,name=id" json:"id,omitempty"`
}

func NewExecutionID

func NewExecutionID(qst string, aid, eid uint32) *Execution_ID

NewExecutionID is a shorthand to New a new *Execution_ID

func (*Execution_ID) AttemptID

func (e *Execution_ID) AttemptID() *Attempt_ID

AttemptID is a helper function to obtain the *Attempt_ID from this Execution_ID.

func (*Execution_ID) Descriptor

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

func (*Execution_ID) Equals

func (e *Execution_ID) Equals(o *Execution_ID) bool

Equals returns true iff the two Execution_IDs are equivalent.

func (*Execution_ID) GetAttempt

func (m *Execution_ID) GetAttempt() uint32

func (*Execution_ID) GetId

func (m *Execution_ID) GetId() uint32

func (*Execution_ID) GetQuest

func (m *Execution_ID) GetQuest() string

func (*Execution_ID) ProtoMessage

func (*Execution_ID) ProtoMessage()

func (*Execution_ID) QuestID

func (e *Execution_ID) QuestID() *Quest_ID

QuestID is a helper function to obtain the *Quest_ID from this Execution_ID.

func (*Execution_ID) Reset

func (m *Execution_ID) Reset()

func (*Execution_ID) String

func (m *Execution_ID) String() string

type Execution_State

type Execution_State int32
const (
	// The execution has been accepted by the distributor, but is not running
	// yet.
	Execution_SCHEDULING Execution_State = 0
	// The execution is running (has activated with DM).
	Execution_RUNNING Execution_State = 1
	// The execution has been told to stop by DM, but we haven't heard from
	// the distributor yet.
	Execution_STOPPING Execution_State = 2
	// The execution is in its final state.
	Execution_FINISHED Execution_State = 3
	// The execution is in an abnormal final state
	Execution_ABNORMAL_FINISHED Execution_State = 4
)

func (Execution_State) EnumDescriptor

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

func (*Execution_State) Evolve

func (s *Execution_State) Evolve(newState Execution_State) error

Evolve attempts to evolve the state of this Attempt. If the state evolution is not allowed (e.g. invalid state transition), this returns an error.

func (*Execution_State) MustEvolve

func (s *Execution_State) MustEvolve(newState Execution_State)

MustEvolve is a panic'ing version of Evolve.

func (Execution_State) String

func (x Execution_State) String() string

func (Execution_State) Terminal

func (s Execution_State) Terminal() bool

Terminal returns true iff there are no valid evolutions from the current state.

type FinishAttemptReq

type FinishAttemptReq struct {
	// required
	Auth *Execution_Auth `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
	// The result data for this Attempt. The `size` field is recalculated after
	// the data field is normalized, and may be omitted.
	Data *JsonResult `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
}

FinishAttemptReq sets the final result of an Attempt.

func (*FinishAttemptReq) Descriptor

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

func (*FinishAttemptReq) GetAuth

func (m *FinishAttemptReq) GetAuth() *Execution_Auth

func (*FinishAttemptReq) GetData

func (m *FinishAttemptReq) GetData() *JsonResult

func (*FinishAttemptReq) Normalize

func (a *FinishAttemptReq) Normalize() error

Normalize returns an error iff the ActivateExecutionReq has bad form (nils, insufficient activation token length, etc.

func (*FinishAttemptReq) ProtoMessage

func (*FinishAttemptReq) ProtoMessage()

func (*FinishAttemptReq) Reset

func (m *FinishAttemptReq) Reset()

func (*FinishAttemptReq) String

func (m *FinishAttemptReq) String() string

type GraphData

type GraphData struct {
	// Quests is the main entry point for all the graph data.
	// key is the `id` field of the QuestID
	Quests map[string]*Quest `` /* 132-byte string literal not displayed */
	// HadErrors is set to true if the data represented here is a partial view
	// of the requested data due to internal errors. The request may be repeated
	// or the client may chose to make smaller queries into the portions of the
	// graph that are missing.
	//
	// If HadErrors is set HadMore will also be set.
	HadErrors bool `protobuf:"varint,2,opt,name=had_errors,json=hadErrors" json:"had_errors,omitempty"`
	// HadMore is set to true if the request stopped short of the full query
	// result set due to things like:
	//   * max response size limit
	//   * max time limit (e.g. WalkGraphReq.MaxTime) being hit
	//   * non-terminal errors encountered during the request (HadErrors will also
	//     be true in this case).
	//
	// Note that this is different than the Partial booleans: This refers
	// specifically to situations when Queries do not run to completion.
	HadMore bool `protobuf:"varint,3,opt,name=had_more,json=hadMore" json:"had_more,omitempty"`
}

GraphData defines all of the DM graph data that may be returned from DM.

Currently only WalkGraph returns GraphData, but in the future other APIs will explore the graph in other ways, and they'll return this same data structure.

The design of this message is intended to allow clients to easily accumulate various GraphData from different sources in order to maintain an in-memory cache of data that exists in DM, where that data is discovered across multiple RPCs.

func (*GraphData) Descriptor

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

func (*GraphData) GetHadErrors

func (m *GraphData) GetHadErrors() bool

func (*GraphData) GetHadMore

func (m *GraphData) GetHadMore() bool

func (*GraphData) GetQuest

func (g *GraphData) GetQuest(qid string) (*Quest, bool)

GetQuest gets the specified quest from GraphData, if it's already there. If it's not, then a new Quest will be created, added, and returned.

If the Quests map is uninitialized, this will initialize it.

func (*GraphData) GetQuests

func (m *GraphData) GetQuests() map[string]*Quest

func (*GraphData) ProtoMessage

func (*GraphData) ProtoMessage()

func (*GraphData) PurgeTimestamps

func (g *GraphData) PurgeTimestamps()

PurgeTimestamps implements TimestampPurger.

func (*GraphData) Reset

func (m *GraphData) Reset()

func (*GraphData) String

func (m *GraphData) String() string

func (*GraphData) ToQuery

func (g *GraphData) ToQuery() (ret *GraphQuery)

ToQuery generates a new GraphQuery.

This generates a GraphQuery that queries for any Attempts which are marked as Partial in the current GraphData.

func (*GraphData) UpdateWith

func (g *GraphData) UpdateWith(other *GraphData)

UpdateWith updates this GraphData with all of the data contained in other. Assumes that any mutable data in other is more up-to-date than the data in g.

type GraphQuery

type GraphQuery struct {
	// AttemptList allows you to list one or more specific attempts as the result
	// of the query. If a quest contains the attempt number 0, or is empty, it
	// means 'all attempts for this quest'.
	AttemptList *AttemptList `protobuf:"bytes,1,opt,name=attempt_list,json=attemptList" json:"attempt_list,omitempty"`
	// attempt_range allows you to list a range of attempts in a single quest.
	// low must be > 0, and high must be > low. The range is [low, high). High may
	// be higher than the highest attempt, and low may be lower than the lowest
	// attempt (but not 0).
	AttemptRange []*GraphQuery_AttemptRange `protobuf:"bytes,2,rep,name=attempt_range,json=attemptRange" json:"attempt_range,omitempty"`
	Search       []*GraphQuery_Search       `protobuf:"bytes,3,rep,name=search" json:"search,omitempty"`
}

GraphQuery represents a single query into the state of DM's dependency graph. It's a required parameter for WalkGraphReq.

func AttemptListQuery

func AttemptListQuery(fanout *AttemptList) *GraphQuery

AttemptListQuery returns a new GraphQuery for the given AttemptList.

func AttemptListQueryL

func AttemptListQueryL(fanout map[string][]uint32) *GraphQuery

AttemptListQueryL returns a new GraphQuery for the given AttemptList literal.

func AttemptRangeQuery

func AttemptRangeQuery(quest string, low, high uint32) *GraphQuery

AttemptRangeQuery returns a new GraphQuery for the given AttemptRange specification.

func (*GraphQuery) Descriptor

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

func (*GraphQuery) GetAttemptList

func (m *GraphQuery) GetAttemptList() *AttemptList

func (*GraphQuery) GetAttemptRange

func (m *GraphQuery) GetAttemptRange() []*GraphQuery_AttemptRange

func (*GraphQuery) GetSearch

func (m *GraphQuery) GetSearch() []*GraphQuery_Search

func (*GraphQuery) Normalize

func (g *GraphQuery) Normalize() error

Normalize returns an error iff this GraphQuery is not valid.

func (*GraphQuery) ProtoMessage

func (*GraphQuery) ProtoMessage()

func (*GraphQuery) Reset

func (m *GraphQuery) Reset()

func (*GraphQuery) String

func (m *GraphQuery) String() string

type GraphQuery_AttemptRange

type GraphQuery_AttemptRange struct {
	Quest string `protobuf:"bytes,1,opt,name=quest" json:"quest,omitempty"`
	Low   uint32 `protobuf:"varint,2,opt,name=low" json:"low,omitempty"`
	High  uint32 `protobuf:"varint,3,opt,name=high" json:"high,omitempty"`
}

func (*GraphQuery_AttemptRange) Descriptor

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

func (*GraphQuery_AttemptRange) GetHigh

func (m *GraphQuery_AttemptRange) GetHigh() uint32

func (*GraphQuery_AttemptRange) GetLow

func (m *GraphQuery_AttemptRange) GetLow() uint32

func (*GraphQuery_AttemptRange) GetQuest

func (m *GraphQuery_AttemptRange) GetQuest() string

func (*GraphQuery_AttemptRange) Normalize

func (al *GraphQuery_AttemptRange) Normalize() error

Normalize returns nil iff this AttemptRange is in a bad state.

func (*GraphQuery_AttemptRange) ProtoMessage

func (*GraphQuery_AttemptRange) ProtoMessage()

func (*GraphQuery_AttemptRange) Reset

func (m *GraphQuery_AttemptRange) Reset()

func (*GraphQuery_AttemptRange) String

func (m *GraphQuery_AttemptRange) String() string
type GraphQuery_Search struct {
	// Domain indicates which class of objects your query applies to. The fields
	// available to query are defined by the `data` field in the corresponding
	// GraphData message.
	//
	// Additionally `Attempt` has a special field $quest whose subfields are
	// queriable in the exact same way that a search in a Quest domain works.
	Domain GraphQuery_Search_Domain `protobuf:"varint,1,opt,name=domain,enum=dm.GraphQuery_Search_Domain" json:"domain,omitempty"`
	// Start and End are optional restrictions on the first sort property. For
	// now, these are just restrictions on the 'created' timestamp for either
	// the Quest or Attempt, depending on the SearchDomain.
	Start *PropertyValue `protobuf:"bytes,3,opt,name=start" json:"start,omitempty"`
	End   *PropertyValue `protobuf:"bytes,4,opt,name=end" json:"end,omitempty"`
	// ApproxFilters allows you to filter on 'approximate' fields. Approximate
	// fields are the json path to the value, without any array subscripts. For
	// example, if your document looked like:
	//
	//   {
	//     "some": ["list", {"of": ["data", "and", "stuff"]}],
	//   }
	//
	// Then the following approximate filters would match:
	//   "some" = ["list"]
	//   "some.of" = ["data"]
	//   "some.of" = ["and"]
	//   "some.of" = ["stuff"]
	//   "some.of" = ["stuff", "and"]
	//   "some.of" = ["stuff", "and", "data"]
	//
	// This is useful for filtering documents where the order of parameters
	// in a list or sublist isn't known, or doesn't matter.
	ApproxFilters map[string]*MultiPropertyValue `` /* 167-byte string literal not displayed */
	// ExactFilters allows you to filter on 'exact' fields. Exact fields are the
	// json path to the value, including array subscripts. For example if your
	// document looked like:
	//
	//   {
	//     "some": ["list", {"of": ["data", "and", "stuff"]}],
	//   }
	//
	// Then the following exact filters would match:
	//   "some[0]" = "list"
	//   "some[1].of[0]" = "data"
	//   "some[1].of[1]" = "and"
	//   "some[1].of[2]" = "stuff"
	//
	// This is useful for filtering documents where the order of parameters
	// in a list or sublist matters.
	ExactFilters map[string]*PropertyValue `` /* 164-byte string literal not displayed */
}

A Search allows you to query objects whose properties match all of the provided filters. Filters take the form of a dot-delimited path. For example, say that we had the following objects:

Quest(id=deadbeef):
  created = <timestamp>  #sort
  descriptor.distributor_config_name = "foo"
  descriptor.json_payload = {
    "key": "value",
    "multi": ["some", 10, "values", true],
    "sub": [{"msg": 11}, {"msg": 12}],
  }

Attempt(id=deadbeef|1):
  created = <timestamp>  #sort
  attempt_type = Finished
  finished.expiration = <timestamp>
  finished.json_result = {
    "rslt": "yes",
    "ok": true,
  }

Then you could query (in pseudo-proto):

domain: Attempt
approx_filters: {
  "attempt_type": ["Finished"],
  "$quest.descriptor.json_payload.multi": [true, 10],
  "$quest.descriptor.json_payload.sub.msg": [11, 10],
  "finished.json_result.ok": [true],
}

Or:

domain: Attempt
exact_filters: {
  "$quest.descriptor.json_payload.multi[1]": [10],
  "$quest.descriptor.json_payload.sub[0].msg": [11],
}

Literal '.' and '[' characters may be escaped with a backslash.

func (*GraphQuery_Search) Descriptor

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

func (*GraphQuery_Search) GetApproxFilters

func (m *GraphQuery_Search) GetApproxFilters() map[string]*MultiPropertyValue

func (*GraphQuery_Search) GetDomain

func (*GraphQuery_Search) GetEnd

func (m *GraphQuery_Search) GetEnd() *PropertyValue

func (*GraphQuery_Search) GetExactFilters

func (m *GraphQuery_Search) GetExactFilters() map[string]*PropertyValue

func (*GraphQuery_Search) GetStart

func (m *GraphQuery_Search) GetStart() *PropertyValue

func (*GraphQuery_Search) Normalize

func (s *GraphQuery_Search) Normalize() error

Normalize returns nil iff this Search is in a bad state.

func (*GraphQuery_Search) ProtoMessage

func (*GraphQuery_Search) ProtoMessage()

func (*GraphQuery_Search) Reset

func (m *GraphQuery_Search) Reset()

func (*GraphQuery_Search) String

func (m *GraphQuery_Search) String() string

type GraphQuery_Search_Domain

type GraphQuery_Search_Domain int32
const (
	GraphQuery_Search_QUEST   GraphQuery_Search_Domain = 0
	GraphQuery_Search_ATTEMPT GraphQuery_Search_Domain = 1
)

func (GraphQuery_Search_Domain) EnumDescriptor

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

func (GraphQuery_Search_Domain) String

func (x GraphQuery_Search_Domain) String() string

type JsonResult

type JsonResult struct {
	// Guaranteed to be a JSON object `{...}` or the empty string (if this is part
	// of a Partial result from e.g. a WalkGraph RPC).
	Object string `protobuf:"bytes,1,opt,name=object" json:"object,omitempty"`
	// The length of data. If this message is non-nil, this will have a value even
	// if object is empty (e.g. for a partial result). This is useful for query
	// results where you either opt to not load the data (include.*.data ==
	// false), or the response exceeds the size limit (so you can see how big the
	// data would have been if the limit wasn't exceeded).
	Size uint32 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
	// The timestamp of when this JsonResult's contents expire. If omitted, it
	// should be assumed that the contents never expire.
	Expiration *google_protobuf1.Timestamp `protobuf:"bytes,3,opt,name=expiration" json:"expiration,omitempty"`
}

JsonResult represents a free-form JSON object. It has a maximum size of 256KB normalized (no extra whitespace). DM will normalize incoming JSONObjects before recalculating their size.

func NewDatalessJsonResult

func NewDatalessJsonResult(size uint32, exps ...time.Time) *JsonResult

NewDatalessJsonResult creates a new JsonResult object without data and with optional expiration time.

func NewJsonResult

func NewJsonResult(data string, exps ...time.Time) *JsonResult

NewJsonResult creates a new JsonResult object with optional expiration time.

func (*JsonResult) Descriptor

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

func (*JsonResult) FromProperty

func (p *JsonResult) FromProperty(prop datastore.Property) error

FromProperty implements datastore.PropertyConverter. It parses a '[]byte' into an embedded 'JsonResult' when used with the "github.com/luci/gae" library.

func (*JsonResult) GetExpiration

func (m *JsonResult) GetExpiration() *google_protobuf1.Timestamp

func (*JsonResult) GetObject

func (m *JsonResult) GetObject() string

func (*JsonResult) GetSize

func (m *JsonResult) GetSize() uint32

func (*JsonResult) Normalize

func (j *JsonResult) Normalize() error

Normalize normalizes the JSONObject (ensures it's an object, removes whitespace, sorts keys, normalizes Size value, etc.)

func (*JsonResult) ProtoMessage

func (*JsonResult) ProtoMessage()

func (*JsonResult) Reset

func (m *JsonResult) Reset()

func (*JsonResult) String

func (m *JsonResult) String() string

func (*JsonResult) ToProperty

func (p *JsonResult) ToProperty() (prop datastore.Property, err error)

ToProperty implements datastore.PropertyConverter. It causes an embedded 'JsonResult' to serialize to an unindexed '[]byte' when used with the "github.com/luci/gae" library.

type MultiPropertyValue

type MultiPropertyValue struct {
	Values []*PropertyValue `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
}

func (*MultiPropertyValue) Descriptor

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

func (*MultiPropertyValue) GetValues

func (m *MultiPropertyValue) GetValues() []*PropertyValue

func (*MultiPropertyValue) ProtoMessage

func (*MultiPropertyValue) ProtoMessage()

func (*MultiPropertyValue) Reset

func (m *MultiPropertyValue) Reset()

func (*MultiPropertyValue) String

func (m *MultiPropertyValue) String() string

type PropertyValue

type PropertyValue struct {
	// Types that are valid to be assigned to Value:
	//	*PropertyValue_Str
	//	*PropertyValue_Dat
	//	*PropertyValue_Num
	//	*PropertyValue_Bin
	//	*PropertyValue_Time
	//	*PropertyValue_Null
	Value isPropertyValue_Value `protobuf_oneof:"value"`
}

func (*PropertyValue) Descriptor

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

func (*PropertyValue) GetBin

func (m *PropertyValue) GetBin() bool

func (*PropertyValue) GetDat

func (m *PropertyValue) GetDat() []byte

func (*PropertyValue) GetNull

func (m *PropertyValue) GetNull() *google_protobuf2.Empty

func (*PropertyValue) GetNum

func (m *PropertyValue) GetNum() int64

func (*PropertyValue) GetStr

func (m *PropertyValue) GetStr() string

func (*PropertyValue) GetTime

func (*PropertyValue) GetValue

func (m *PropertyValue) GetValue() isPropertyValue_Value

func (*PropertyValue) ProtoMessage

func (*PropertyValue) ProtoMessage()

func (*PropertyValue) Reset

func (m *PropertyValue) Reset()

func (*PropertyValue) String

func (m *PropertyValue) String() string

func (*PropertyValue) XXX_OneofFuncs

func (*PropertyValue) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type PropertyValue_Bin

type PropertyValue_Bin struct {
	Bin bool `protobuf:"varint,5,opt,name=bin,oneof"`
}

type PropertyValue_Dat

type PropertyValue_Dat struct {
	Dat []byte `protobuf:"bytes,2,opt,name=dat,proto3,oneof"`
}

type PropertyValue_Null

type PropertyValue_Null struct {
	Null *google_protobuf2.Empty `protobuf:"bytes,7,opt,name=null,oneof"`
}

type PropertyValue_Num

type PropertyValue_Num struct {
	Num int64 `protobuf:"varint,3,opt,name=num,oneof"`
}

type PropertyValue_Str

type PropertyValue_Str struct {
	Str string `protobuf:"bytes,1,opt,name=str,oneof"`
}

type PropertyValue_Time

type PropertyValue_Time struct {
	Time *google_protobuf1.Timestamp `protobuf:"bytes,6,opt,name=time,oneof"`
}

type Quest

type Quest struct {
	Id *Quest_ID `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// DNE is set to true if this Quest does not exist. None of the following
	// fields are valid if this is set to true.
	DNE  bool        `protobuf:"varint,2,opt,name=DNE" json:"DNE,omitempty"`
	Data *Quest_Data `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
	// key is the `id` field of the Attempt.ID
	Attempts map[uint32]*Attempt `` /* 137-byte string literal not displayed */
	// Partial is true iff the request asked for QuestData, but wasn't able to
	// completely fill it.
	Partial bool `protobuf:"varint,16,opt,name=partial" json:"partial,omitempty"`
}

func (*Quest) Descriptor

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

func (*Quest) GetAttempts

func (m *Quest) GetAttempts() map[uint32]*Attempt

func (*Quest) GetDNE

func (m *Quest) GetDNE() bool

func (*Quest) GetData

func (m *Quest) GetData() *Quest_Data

func (*Quest) GetId

func (m *Quest) GetId() *Quest_ID

func (*Quest) GetPartial

func (m *Quest) GetPartial() bool

func (*Quest) ProtoMessage

func (*Quest) ProtoMessage()

func (*Quest) PurgeTimestamps

func (q *Quest) PurgeTimestamps()

PurgeTimestamps implements TimestampPurger.

func (*Quest) Reset

func (m *Quest) Reset()

func (*Quest) String

func (m *Quest) String() string

func (*Quest) UpdateWith

func (q *Quest) UpdateWith(o *Quest)

UpdateWith updates this Quest with data from other.

type QuestTemplateSpecs

type QuestTemplateSpecs []*Quest_TemplateSpec

QuestTemplateSpecs is a sortable slice of *Quest_TemplateSpec.

func (QuestTemplateSpecs) Len

func (s QuestTemplateSpecs) Len() int

func (QuestTemplateSpecs) Less

func (s QuestTemplateSpecs) Less(i, j int) bool

func (QuestTemplateSpecs) Swap

func (s QuestTemplateSpecs) Swap(i, j int)

type Quest_Data

type Quest_Data struct {
	Created *google_protobuf1.Timestamp `protobuf:"bytes,1,opt,name=created" json:"created,omitempty"`
	Desc    *Quest_Desc                 `protobuf:"bytes,2,opt,name=desc" json:"desc,omitempty"`
	BuiltBy []*Quest_TemplateSpec       `protobuf:"bytes,3,rep,name=built_by,json=builtBy" json:"built_by,omitempty"`
}

func (*Quest_Data) Descriptor

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

func (*Quest_Data) GetBuiltBy

func (m *Quest_Data) GetBuiltBy() []*Quest_TemplateSpec

func (*Quest_Data) GetCreated

func (m *Quest_Data) GetCreated() *google_protobuf1.Timestamp

func (*Quest_Data) GetDesc

func (m *Quest_Data) GetDesc() *Quest_Desc

func (*Quest_Data) ProtoMessage

func (*Quest_Data) ProtoMessage()

func (*Quest_Data) PurgeTimestamps

func (qd *Quest_Data) PurgeTimestamps()

PurgeTimestamps implements TimestampPurger.

func (*Quest_Data) Reset

func (m *Quest_Data) Reset()

func (*Quest_Data) String

func (m *Quest_Data) String() string

func (*Quest_Data) UpdateWith

func (q *Quest_Data) UpdateWith(other *Quest_Data)

UpdateWith updates this Quest_Data with data from other.

type Quest_Desc

type Quest_Desc struct {
	// This names a specific distributor configuration (or alias) in the
	// service's distributors.cfg file. This will be used to look up the
	// distributor's implementation and connection information when Attempts for
	// this Quest are Executed.
	DistributorConfigName string `protobuf:"bytes,1,opt,name=distributor_config_name,json=distributorConfigName" json:"distributor_config_name,omitempty"`
	// A JSON object which corresponds to the input parameters for the job.
	// These will be passed in a distributor-specific way to the job. This is
	// a freeform JSON object, and must parse as such, but otherwise doesn't
	// necessarily have a server-enforced schema.
	//
	// The distributor implementation in DM will not use the contents of these
	// to make any scheduling decisions.
	//
	// The distributor MAY choose to validate some schema for these parameters.
	Parameters string `protobuf:"bytes,2,opt,name=parameters" json:"parameters,omitempty"`
	// A JSON object which corresponds to the distributor-specific parameters
	// for the job.
	//
	// The distributor defines and validates the schema for these, and will use
	// the values herein to make decisions about how the job is run. It is up to
	// the distributor whether these values are passed on to the job, and if so
	// in what form.
	DistributorParameters string `protobuf:"bytes,3,opt,name=distributor_parameters,json=distributorParameters" json:"distributor_parameters,omitempty"`
	// This is metadata which doesn't affect the functionality of the payload,
	// but does affect how DM interacts with the distributor when scheduling
	// Executions.
	Meta *Quest_Desc_Meta `protobuf:"bytes,4,opt,name=meta" json:"meta,omitempty"`
}

func NewQuestDesc

func NewQuestDesc(cfg string, params, distParams string, meta *Quest_Desc_Meta) *Quest_Desc

NewQuestDesc is a shorthand method for building a new *Quest_Desc.

func (*Quest_Desc) Descriptor

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

func (*Quest_Desc) FromProperty

func (p *Quest_Desc) FromProperty(prop datastore.Property) error

FromProperty implements datastore.PropertyConverter. It parses a '[]byte' into an embedded 'Quest_Desc' when used with the "github.com/luci/gae" library.

func (*Quest_Desc) GetDistributorConfigName

func (m *Quest_Desc) GetDistributorConfigName() string

func (*Quest_Desc) GetDistributorParameters

func (m *Quest_Desc) GetDistributorParameters() string

func (*Quest_Desc) GetMeta

func (m *Quest_Desc) GetMeta() *Quest_Desc_Meta

func (*Quest_Desc) GetParameters

func (m *Quest_Desc) GetParameters() string

func (*Quest_Desc) Normalize

func (q *Quest_Desc) Normalize() error

Normalize returns an error iff the Quest_Desc is invalid.

func (*Quest_Desc) ProtoMessage

func (*Quest_Desc) ProtoMessage()

func (*Quest_Desc) QuestID

func (q *Quest_Desc) QuestID() string

QuestID computes the DM compatible quest ID for this Quest_Desc. The Quest_Desc should already be Normalize()'d.

func (*Quest_Desc) Reset

func (m *Quest_Desc) Reset()

func (*Quest_Desc) String

func (m *Quest_Desc) String() string

func (*Quest_Desc) ToProperty

func (p *Quest_Desc) ToProperty() (prop datastore.Property, err error)

ToProperty implements datastore.PropertyConverter. It causes an embedded 'Quest_Desc' to serialize to an unindexed '[]byte' when used with the "github.com/luci/gae" library.

type Quest_Desc_Meta

type Quest_Desc_Meta struct {
	// This names the user/service account for all Attempts on this quest. You
	// must have permission to use this account when creating the Quest and/or
	// Attempts.
	AsAccount string `protobuf:"bytes,1,opt,name=as_account,json=asAccount" json:"as_account,omitempty"`
	// This affects how DM will retry the job payload in various exceptional
	// circumstances.
	Retry    *Quest_Desc_Meta_Retry    `protobuf:"bytes,2,opt,name=retry" json:"retry,omitempty"`
	Timeouts *Quest_Desc_Meta_Timeouts `protobuf:"bytes,3,opt,name=timeouts" json:"timeouts,omitempty"`
}

func (*Quest_Desc_Meta) Descriptor

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

func (*Quest_Desc_Meta) GetAsAccount

func (m *Quest_Desc_Meta) GetAsAccount() string

func (*Quest_Desc_Meta) GetRetry

func (m *Quest_Desc_Meta) GetRetry() *Quest_Desc_Meta_Retry

func (*Quest_Desc_Meta) GetTimeouts

func (m *Quest_Desc_Meta) GetTimeouts() *Quest_Desc_Meta_Timeouts

func (*Quest_Desc_Meta) IsEmpty

func (q *Quest_Desc_Meta) IsEmpty() bool

IsEmpty returns true if this metadata only contains zero-values.

func (*Quest_Desc_Meta) ProtoMessage

func (*Quest_Desc_Meta) ProtoMessage()

func (*Quest_Desc_Meta) Reset

func (m *Quest_Desc_Meta) Reset()

func (*Quest_Desc_Meta) String

func (m *Quest_Desc_Meta) String() string

type Quest_Desc_Meta_Retry

type Quest_Desc_Meta_Retry struct {
	// The number of times in a row to retry Executions which have an
	// ABNORMAL_FINISHED status of FAILED.
	Failed uint32 `protobuf:"varint,1,opt,name=failed" json:"failed,omitempty"`
	// The number of times in a row to retry Executions which have an
	// ABNORMAL_FINISHED status of CRASHED.
	Crashed uint32 `protobuf:"varint,2,opt,name=crashed" json:"crashed,omitempty"`
	// The number of times in a row to retry Executions which have an
	// ABNORMAL_FINISHED status of EXPIRED.
	Expired uint32 `protobuf:"varint,3,opt,name=expired" json:"expired,omitempty"`
	// The number of times in a row to retry Executions which have an
	// ABNORMAL_FINISHED status of TIMED_OUT.
	TimedOut uint32 `protobuf:"varint,4,opt,name=timed_out,json=timedOut" json:"timed_out,omitempty"`
}

Retry specifies the number of times in a row that DM should re-Execute an Attempt due to the provided abnormal result.

NOTE: The proto tag numbers for these MUST be aligned with the enumeration values of AbnormalFinish.Status!

func (*Quest_Desc_Meta_Retry) Descriptor

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

func (*Quest_Desc_Meta_Retry) GetCrashed

func (m *Quest_Desc_Meta_Retry) GetCrashed() uint32

func (*Quest_Desc_Meta_Retry) GetExpired

func (m *Quest_Desc_Meta_Retry) GetExpired() uint32

func (*Quest_Desc_Meta_Retry) GetFailed

func (m *Quest_Desc_Meta_Retry) GetFailed() uint32

func (*Quest_Desc_Meta_Retry) GetTimedOut

func (m *Quest_Desc_Meta_Retry) GetTimedOut() uint32

func (*Quest_Desc_Meta_Retry) IsEmpty

func (q *Quest_Desc_Meta_Retry) IsEmpty() bool

IsEmpty returns true if this metadata retry message only contains zero-values.

func (*Quest_Desc_Meta_Retry) ProtoMessage

func (*Quest_Desc_Meta_Retry) ProtoMessage()

func (*Quest_Desc_Meta_Retry) Reset

func (m *Quest_Desc_Meta_Retry) Reset()

func (*Quest_Desc_Meta_Retry) String

func (m *Quest_Desc_Meta_Retry) String() string

type Quest_Desc_Meta_Timeouts

type Quest_Desc_Meta_Timeouts struct {
	Start *google_protobuf.Duration `protobuf:"bytes,1,opt,name=start" json:"start,omitempty"`
	Run   *google_protobuf.Duration `protobuf:"bytes,2,opt,name=run" json:"run,omitempty"`
	Stop  *google_protobuf.Duration `protobuf:"bytes,3,opt,name=stop" json:"stop,omitempty"`
}

Timing describes the amount of time that Executions for this Quest should have, on the following timeline:

Event: execution sent to distributor
  ^ "start" v
Event: execution sends ActivateExecution
  ^ "run" v
Event: execution sends halting RPC (either ActivateExecution or
  EnsureGraphData)
  ^ "stop" v
Event: distributor gives execution result back to DM

If the given timeout hits before the next event in the timeline, DM will mark the Execution as TIMED_OUT, and the appropriate retry policy will be applied.

If a given timeout is unlimited, leave the duration unset or 0.

func (*Quest_Desc_Meta_Timeouts) Descriptor

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

func (*Quest_Desc_Meta_Timeouts) GetRun

func (*Quest_Desc_Meta_Timeouts) GetStart

func (*Quest_Desc_Meta_Timeouts) GetStop

func (*Quest_Desc_Meta_Timeouts) Normalize

func (t *Quest_Desc_Meta_Timeouts) Normalize() error

Normalize ensures that all timeouts are >= 0

func (*Quest_Desc_Meta_Timeouts) ProtoMessage

func (*Quest_Desc_Meta_Timeouts) ProtoMessage()

func (*Quest_Desc_Meta_Timeouts) Reset

func (m *Quest_Desc_Meta_Timeouts) Reset()

func (*Quest_Desc_Meta_Timeouts) String

func (m *Quest_Desc_Meta_Timeouts) String() string

type Quest_ID

type Quest_ID struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func NewQuestID

func NewQuestID(qst string) *Quest_ID

NewQuestID is a shorthand to New a new *Quest_ID

func (*Quest_ID) Descriptor

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

func (*Quest_ID) Equals

func (q *Quest_ID) Equals(o *Quest_ID) bool

Equals returns true iff the two Quest_IDs are equivalent.

func (*Quest_ID) GetId

func (m *Quest_ID) GetId() string

func (*Quest_ID) ProtoMessage

func (*Quest_ID) ProtoMessage()

func (*Quest_ID) Reset

func (m *Quest_ID) Reset()

func (*Quest_ID) String

func (m *Quest_ID) String() string

type Quest_TemplateSpec

type Quest_TemplateSpec struct {
	Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
	Ref     string `protobuf:"bytes,2,opt,name=ref" json:"ref,omitempty"`
	Version string `protobuf:"bytes,3,opt,name=version" json:"version,omitempty"`
	Name    string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
}

func NewTemplateSpec

func NewTemplateSpec(project, ref, version, name string) *Quest_TemplateSpec

NewTemplateSpec is a shorthand method for building a new *Quest_TemplateSpec.

func (*Quest_TemplateSpec) Descriptor

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

func (*Quest_TemplateSpec) Equals

Equals returns true iff this Quest_TemplateSpec matches all of the fields of the `o` Quest_TemplateSpec.

func (*Quest_TemplateSpec) FromProperty

func (p *Quest_TemplateSpec) FromProperty(prop datastore.Property) error

FromProperty implements datastore.PropertyConverter. It parses a '[]byte' into an embedded 'Quest_TemplateSpec' when used with the "github.com/luci/gae" library.

func (*Quest_TemplateSpec) GetName

func (m *Quest_TemplateSpec) GetName() string

func (*Quest_TemplateSpec) GetProject

func (m *Quest_TemplateSpec) GetProject() string

func (*Quest_TemplateSpec) GetRef

func (m *Quest_TemplateSpec) GetRef() string

func (*Quest_TemplateSpec) GetVersion

func (m *Quest_TemplateSpec) GetVersion() string

func (*Quest_TemplateSpec) ProtoMessage

func (*Quest_TemplateSpec) ProtoMessage()

func (*Quest_TemplateSpec) Reset

func (m *Quest_TemplateSpec) Reset()

func (*Quest_TemplateSpec) String

func (m *Quest_TemplateSpec) String() string

func (*Quest_TemplateSpec) ToProperty

func (p *Quest_TemplateSpec) ToProperty() (prop datastore.Property, err error)

ToProperty implements datastore.PropertyConverter. It causes an embedded 'Quest_TemplateSpec' to serialize to an unindexed '[]byte' when used with the "github.com/luci/gae" library.

type Result

type Result struct {
	Data           *JsonResult     `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
	AbnormalFinish *AbnormalFinish `protobuf:"bytes,2,opt,name=abnormal_finish,json=abnormalFinish" json:"abnormal_finish,omitempty"`
}

Result holds either data OR abnormal finish information.

func (*Result) Descriptor

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

func (*Result) FromProperty

func (p *Result) FromProperty(prop datastore.Property) error

FromProperty implements datastore.PropertyConverter. It parses a '[]byte' into an embedded 'Result' when used with the "github.com/luci/gae" library.

func (*Result) GetAbnormalFinish

func (m *Result) GetAbnormalFinish() *AbnormalFinish

func (*Result) GetData

func (m *Result) GetData() *JsonResult

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

func (*Result) ToProperty

func (p *Result) ToProperty() (prop datastore.Property, err error)

ToProperty implements datastore.PropertyConverter. It causes an embedded 'Result' to serialize to an unindexed '[]byte' when used with the "github.com/luci/gae" library.

type TemplateInstantiation

type TemplateInstantiation struct {
	// project is the luci-config project which defines the template.
	Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
	// ref is the git ref of the project that defined this template. If omitted,
	// this will use the template definition from the project-wide configuration
	// and not the configuration located on a particular ref (like
	// 'refs/heads/master').
	Ref string `protobuf:"bytes,2,opt,name=ref" json:"ref,omitempty"`
	// specifier specifies the actual template name, as well as any substitution
	// parameters which that template might require.
	Specifier *templateproto.Specifier `protobuf:"bytes,4,opt,name=specifier" json:"specifier,omitempty"`
}

func (*TemplateInstantiation) Descriptor

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

func (*TemplateInstantiation) GetProject

func (m *TemplateInstantiation) GetProject() string

func (*TemplateInstantiation) GetRef

func (m *TemplateInstantiation) GetRef() string

func (*TemplateInstantiation) GetSpecifier

func (m *TemplateInstantiation) GetSpecifier() *templateproto.Specifier

func (*TemplateInstantiation) Normalize

func (t *TemplateInstantiation) Normalize() error

Normalize returns an error iff the TemplateInstantiation is invalid.

func (*TemplateInstantiation) ProtoMessage

func (*TemplateInstantiation) ProtoMessage()

func (*TemplateInstantiation) Reset

func (m *TemplateInstantiation) Reset()

func (*TemplateInstantiation) String

func (m *TemplateInstantiation) String() string

type TimestampPurger

type TimestampPurger interface {
	PurgeTimestamps()
}

TimestampPurger is for testing: invoking this on a struct in this package will remove all timestamps from it. This is useful for testing where the timestamps are frequently just noise.

type WalkGraphReq

type WalkGraphReq struct {
	// Optional. See Include.AttemptResult for restrictions.
	Auth *Execution_Auth `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
	// Query specifies a list of queries to start the graph traversal on. The
	// traversal will occur as a union of the query results. Redundant
	// specification will not cause additional heavy work; every graph node will
	// be processed exactly once, regardless of how many times it appears in the
	// query results. However, redundancy in the queries will cause the server to
	// retrieve and discard more information.
	Query *GraphQuery         `protobuf:"bytes,2,opt,name=query" json:"query,omitempty"`
	Mode  *WalkGraphReq_Mode  `protobuf:"bytes,3,opt,name=mode" json:"mode,omitempty"`
	Limit *WalkGraphReq_Limit `protobuf:"bytes,4,opt,name=limit" json:"limit,omitempty"`
	// Include allows you to add additional information to the returned
	// GraphData which is typically medium-to-large sized.
	Include *WalkGraphReq_Include `protobuf:"bytes,5,opt,name=include" json:"include,omitempty"`
	Exclude *WalkGraphReq_Exclude `protobuf:"bytes,6,opt,name=exclude" json:"exclude,omitempty"`
}

WalkGraphReq allows you to walk from one or more Quests through their Attempt's forward dependencies.

The handler will evaluate all of the queries, executing them in parallel. For each attempt or quest produced by the query, it will queue a walk operation for that node, respecting the options set (max_depth, etc.).

func (*WalkGraphReq) Descriptor

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

func (*WalkGraphReq) GetAuth

func (m *WalkGraphReq) GetAuth() *Execution_Auth

func (*WalkGraphReq) GetExclude

func (m *WalkGraphReq) GetExclude() *WalkGraphReq_Exclude

func (*WalkGraphReq) GetInclude

func (m *WalkGraphReq) GetInclude() *WalkGraphReq_Include

func (*WalkGraphReq) GetLimit

func (m *WalkGraphReq) GetLimit() *WalkGraphReq_Limit

func (*WalkGraphReq) GetMode

func (m *WalkGraphReq) GetMode() *WalkGraphReq_Mode

func (*WalkGraphReq) GetQuery

func (m *WalkGraphReq) GetQuery() *GraphQuery

func (*WalkGraphReq) Normalize

func (w *WalkGraphReq) Normalize() error

Normalize returns an error iff the WalkGraphReq is invalid.

func (*WalkGraphReq) ProtoMessage

func (*WalkGraphReq) ProtoMessage()

func (*WalkGraphReq) Reset

func (m *WalkGraphReq) Reset()

func (*WalkGraphReq) String

func (m *WalkGraphReq) String() string

type WalkGraphReq_Exclude

type WalkGraphReq_Exclude struct {
	// Do not include data from the following quests in the response.
	Quests []string `protobuf:"bytes,1,rep,name=quests" json:"quests,omitempty"`
	// Do not include data from the following attempts in the response.
	Attempts *AttemptList `protobuf:"bytes,2,opt,name=attempts" json:"attempts,omitempty"`
}

func (*WalkGraphReq_Exclude) Descriptor

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

func (*WalkGraphReq_Exclude) GetAttempts

func (m *WalkGraphReq_Exclude) GetAttempts() *AttemptList

func (*WalkGraphReq_Exclude) GetQuests

func (m *WalkGraphReq_Exclude) GetQuests() []string

func (*WalkGraphReq_Exclude) Normalize

func (e *WalkGraphReq_Exclude) Normalize() error

Normalize returns an error iff the WalkGraphReq_Exclude is invalid.

func (*WalkGraphReq_Exclude) ProtoMessage

func (*WalkGraphReq_Exclude) ProtoMessage()

func (*WalkGraphReq_Exclude) Reset

func (m *WalkGraphReq_Exclude) Reset()

func (*WalkGraphReq_Exclude) String

func (m *WalkGraphReq_Exclude) String() string

type WalkGraphReq_Include

type WalkGraphReq_Include struct {
	Quest     *WalkGraphReq_Include_Options `protobuf:"bytes,1,opt,name=quest" json:"quest,omitempty"`
	Attempt   *WalkGraphReq_Include_Options `protobuf:"bytes,2,opt,name=attempt" json:"attempt,omitempty"`
	Execution *WalkGraphReq_Include_Options `protobuf:"bytes,3,opt,name=execution" json:"execution,omitempty"`
	// Executions is the number of Executions to include per Attempt. If this
	// is 0, then the execution data will be omitted completely.
	//
	// Executions included are from high ids to low ids. So setting this to `1`
	// would return the LAST execution made for this Attempt.
	NumExecutions uint32 `protobuf:"varint,4,opt,name=num_executions,json=numExecutions" json:"num_executions,omitempty"`
	// FwdDeps instructs WalkGraph to include forward dependency information
	// from the result. This only changes the presence of information in the
	// result; if the query is walking forward attempt dependencies, that will
	// still occur even if this is false.
	FwdDeps bool `protobuf:"varint,5,opt,name=fwd_deps,json=fwdDeps" json:"fwd_deps,omitempty"`
	// BackDeps instructs WalkGraph to include the backwards dependency
	// information. This only changes the presence of information in the result;
	// if the query is walking backward attempt dependencies, that will still
	// occur even if this is false.
	BackDeps bool `protobuf:"varint,6,opt,name=back_deps,json=backDeps" json:"back_deps,omitempty"`
}

func MakeWalkGraphIncludeAll

func MakeWalkGraphIncludeAll() *WalkGraphReq_Include

MakeWalkGraphIncludeAll makes a new WalkGraphReq_Include which has all the boxes ticked. This should only be used when your application plans to dump the resulting graph query data to some logging/debugging trace for humans.

If you don't plan on dumping it for humans, please set the Include options appropriately in order to avoid wasting bandwidth/cpu/datastore query time on the server (and draining your DM quotas unnecessarially).

func (*WalkGraphReq_Include) Descriptor

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

func (*WalkGraphReq_Include) GetAttempt

func (*WalkGraphReq_Include) GetBackDeps

func (m *WalkGraphReq_Include) GetBackDeps() bool

func (*WalkGraphReq_Include) GetExecution

func (*WalkGraphReq_Include) GetFwdDeps

func (m *WalkGraphReq_Include) GetFwdDeps() bool

func (*WalkGraphReq_Include) GetNumExecutions

func (m *WalkGraphReq_Include) GetNumExecutions() uint32

func (*WalkGraphReq_Include) GetQuest

func (*WalkGraphReq_Include) ProtoMessage

func (*WalkGraphReq_Include) ProtoMessage()

func (*WalkGraphReq_Include) Reset

func (m *WalkGraphReq_Include) Reset()

func (*WalkGraphReq_Include) String

func (m *WalkGraphReq_Include) String() string

type WalkGraphReq_Include_Options

type WalkGraphReq_Include_Options struct {
	// Fills the 'id' field.
	//
	// If this is false, it will be omitted.
	//
	// Note that there's enough information contextually to derive these ids
	// on the client side, though it can be handy to have the server produce
	// them for you.
	Ids bool `protobuf:"varint,1,opt,name=ids" json:"ids,omitempty"`
	// Instructs the request to include the Data field
	Data bool `protobuf:"varint,2,opt,name=data" json:"data,omitempty"`
	// Instructs finished objects to include the Result field.
	//
	// If the requestor is an execution, the query logic will only include the
	// result if the execution's Attempt depends on it, otherwise it will be
	// blank.
	//
	// If the request's cumulative result data would be more than
	// limit.max_data_size of data, the remaining results will have their
	// Partial.Result set to DATA_SIZE_LIMIT.
	//
	// Has no effect for Quests.
	Result bool `protobuf:"varint,3,opt,name=result" json:"result,omitempty"`
	// If set to true, objects with an abnormal termination will be included.
	Abnormal bool `protobuf:"varint,4,opt,name=abnormal" json:"abnormal,omitempty"`
	// If set to true, expired objects will be included.
	Expired bool `protobuf:"varint,5,opt,name=expired" json:"expired,omitempty"`
}

func (*WalkGraphReq_Include_Options) Descriptor

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

func (*WalkGraphReq_Include_Options) GetAbnormal

func (m *WalkGraphReq_Include_Options) GetAbnormal() bool

func (*WalkGraphReq_Include_Options) GetData

func (m *WalkGraphReq_Include_Options) GetData() bool

func (*WalkGraphReq_Include_Options) GetExpired

func (m *WalkGraphReq_Include_Options) GetExpired() bool

func (*WalkGraphReq_Include_Options) GetIds

func (m *WalkGraphReq_Include_Options) GetIds() bool

func (*WalkGraphReq_Include_Options) GetResult

func (m *WalkGraphReq_Include_Options) GetResult() bool

func (*WalkGraphReq_Include_Options) ProtoMessage

func (*WalkGraphReq_Include_Options) ProtoMessage()

func (*WalkGraphReq_Include_Options) Reset

func (m *WalkGraphReq_Include_Options) Reset()

func (*WalkGraphReq_Include_Options) String

type WalkGraphReq_Limit

type WalkGraphReq_Limit struct {
	// MaxDepth sets the number of attempts to traverse; 0 means 'immediate'
	// (no dependencies), -1 means 'no limit', and >0 is a limit.
	//
	// Any negative value besides -1 is an error.
	MaxDepth int64 `protobuf:"varint,1,opt,name=max_depth,json=maxDepth" json:"max_depth,omitempty"`
	// MaxTime sets the maximum amount of time that the query processor should
	// take. Application of this deadline is 'best effort', which means the query
	// may take a bit longer than this timeout and still attempt to return data.
	//
	// This is different than the grpc timeout header, which will set a hard
	// deadline for the request.
	MaxTime *google_protobuf.Duration `protobuf:"bytes,2,opt,name=max_time,json=maxTime" json:"max_time,omitempty"`
	// MaxDataSize sets the maximum amount of 'Data' (in bytes) that can be
	// returned, if include.quest_data, include.attempt_data, and/or
	// include.attempt_result are set. If this limit is hit, then the
	// appropriate 'partial' value will be set for that object, but the base
	// object would still be included in the result.
	//
	// If this limit is 0, a default limit of 16MB will be used. If this limit
	// exceeds 30MB, it will be reduced to 30MB.
	MaxDataSize uint32 `protobuf:"varint,3,opt,name=max_data_size,json=maxDataSize" json:"max_data_size,omitempty"`
}

func (*WalkGraphReq_Limit) Descriptor

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

func (*WalkGraphReq_Limit) GetMaxDataSize

func (m *WalkGraphReq_Limit) GetMaxDataSize() uint32

func (*WalkGraphReq_Limit) GetMaxDepth

func (m *WalkGraphReq_Limit) GetMaxDepth() int64

func (*WalkGraphReq_Limit) GetMaxTime

func (m *WalkGraphReq_Limit) GetMaxTime() *google_protobuf.Duration

func (*WalkGraphReq_Limit) ProtoMessage

func (*WalkGraphReq_Limit) ProtoMessage()

func (*WalkGraphReq_Limit) Reset

func (m *WalkGraphReq_Limit) Reset()

func (*WalkGraphReq_Limit) String

func (m *WalkGraphReq_Limit) String() string

type WalkGraphReq_Mode

type WalkGraphReq_Mode struct {
	// DFS sets whether this is a Depth-first (ish) or a Breadth-first (ish) load.
	// Since the load operation is multi-threaded, the search order is best
	// effort, but will actually be some hybrid between DFS and BFS. This setting
	// controls the bias direction of the hybrid loading algorithm.
	Dfs       bool                        `protobuf:"varint,1,opt,name=dfs" json:"dfs,omitempty"`
	Direction WalkGraphReq_Mode_Direction `protobuf:"varint,2,opt,name=direction,enum=dm.WalkGraphReq_Mode_Direction" json:"direction,omitempty"`
}

func (*WalkGraphReq_Mode) Descriptor

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

func (*WalkGraphReq_Mode) GetDfs

func (m *WalkGraphReq_Mode) GetDfs() bool

func (*WalkGraphReq_Mode) GetDirection

func (*WalkGraphReq_Mode) ProtoMessage

func (*WalkGraphReq_Mode) ProtoMessage()

func (*WalkGraphReq_Mode) Reset

func (m *WalkGraphReq_Mode) Reset()

func (*WalkGraphReq_Mode) String

func (m *WalkGraphReq_Mode) String() string

type WalkGraphReq_Mode_Direction

type WalkGraphReq_Mode_Direction int32

Direction indicates that direction of dependencies that the request should walk.

const (
	WalkGraphReq_Mode_FORWARDS  WalkGraphReq_Mode_Direction = 0
	WalkGraphReq_Mode_BACKWARDS WalkGraphReq_Mode_Direction = 1
	WalkGraphReq_Mode_BOTH      WalkGraphReq_Mode_Direction = 2
)

func (WalkGraphReq_Mode_Direction) EnumDescriptor

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

func (WalkGraphReq_Mode_Direction) String

Jump to

Keyboard shortcuts

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