Documentation ¶
Index ¶
- Variables
- type Acl
- func (*Acl) Descriptor() ([]byte, []int)
- func (m *Acl) GetGrantedTo() string
- func (m *Acl) GetRole() Acl_Role
- func (*Acl) ProtoMessage()
- func (m *Acl) Reset()
- func (m *Acl) String() string
- func (m *Acl) XXX_DiscardUnknown()
- func (m *Acl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Acl) XXX_Merge(src proto.Message)
- func (m *Acl) XXX_Size() int
- func (m *Acl) XXX_Unmarshal(b []byte) error
- type AclSet
- func (*AclSet) Descriptor() ([]byte, []int)
- func (m *AclSet) GetAcls() []*Acl
- func (m *AclSet) GetName() string
- func (*AclSet) ProtoMessage()
- func (m *AclSet) Reset()
- func (m *AclSet) String() string
- func (m *AclSet) XXX_DiscardUnknown()
- func (m *AclSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AclSet) XXX_Merge(src proto.Message)
- func (m *AclSet) XXX_Size() int
- func (m *AclSet) XXX_Unmarshal(b []byte) error
- type Acl_Role
- type BuildbucketTask
- func (*BuildbucketTask) Descriptor() ([]byte, []int)
- func (m *BuildbucketTask) GetBucket() string
- func (m *BuildbucketTask) GetBuilder() string
- func (m *BuildbucketTask) GetProperties() []string
- func (m *BuildbucketTask) GetServer() string
- func (m *BuildbucketTask) GetTags() []string
- func (*BuildbucketTask) ProtoMessage()
- func (m *BuildbucketTask) Reset()
- func (m *BuildbucketTask) String() string
- func (m *BuildbucketTask) XXX_DiscardUnknown()
- func (m *BuildbucketTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BuildbucketTask) XXX_Merge(src proto.Message)
- func (m *BuildbucketTask) XXX_Size() int
- func (m *BuildbucketTask) XXX_Unmarshal(b []byte) error
- type GitilesTask
- func (*GitilesTask) Descriptor() ([]byte, []int)
- func (m *GitilesTask) GetRefs() []string
- func (m *GitilesTask) GetRepo() string
- func (*GitilesTask) ProtoMessage()
- func (m *GitilesTask) Reset()
- func (m *GitilesTask) String() string
- func (m *GitilesTask) XXX_DiscardUnknown()
- func (m *GitilesTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GitilesTask) XXX_Merge(src proto.Message)
- func (m *GitilesTask) XXX_Size() int
- func (m *GitilesTask) XXX_Unmarshal(b []byte) error
- type Job
- func (*Job) Descriptor() ([]byte, []int)
- func (m *Job) GetAclSets() []string
- func (m *Job) GetAcls() []*Acl
- func (m *Job) GetBuildbucket() *BuildbucketTask
- func (m *Job) GetDisabled() bool
- func (m *Job) GetId() string
- func (m *Job) GetNoop() *NoopTask
- func (m *Job) GetSchedule() string
- func (m *Job) GetTriggeringPolicy() *TriggeringPolicy
- func (m *Job) GetUrlFetch() *UrlFetchTask
- func (*Job) ProtoMessage()
- func (m *Job) Reset()
- func (m *Job) String() string
- func (m *Job) XXX_DiscardUnknown()
- func (m *Job) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Job) XXX_Merge(src proto.Message)
- func (m *Job) XXX_Size() int
- func (m *Job) XXX_Unmarshal(b []byte) error
- type NoopTask
- func (*NoopTask) Descriptor() ([]byte, []int)
- func (m *NoopTask) GetSleepMs() int64
- func (m *NoopTask) GetTriggersCount() int64
- func (*NoopTask) ProtoMessage()
- func (m *NoopTask) Reset()
- func (m *NoopTask) String() string
- func (m *NoopTask) XXX_DiscardUnknown()
- func (m *NoopTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NoopTask) XXX_Merge(src proto.Message)
- func (m *NoopTask) XXX_Size() int
- func (m *NoopTask) XXX_Unmarshal(b []byte) error
- type ProjectConfig
- func (*ProjectConfig) Descriptor() ([]byte, []int)
- func (m *ProjectConfig) GetAclSets() []*AclSet
- func (m *ProjectConfig) GetJob() []*Job
- func (m *ProjectConfig) GetTrigger() []*Trigger
- func (*ProjectConfig) ProtoMessage()
- func (m *ProjectConfig) Reset()
- func (m *ProjectConfig) String() string
- func (m *ProjectConfig) XXX_DiscardUnknown()
- func (m *ProjectConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProjectConfig) XXX_Merge(src proto.Message)
- func (m *ProjectConfig) XXX_Size() int
- func (m *ProjectConfig) XXX_Unmarshal(b []byte) error
- type TaskDefWrapper
- func (*TaskDefWrapper) Descriptor() ([]byte, []int)
- func (m *TaskDefWrapper) GetBuildbucket() *BuildbucketTask
- func (m *TaskDefWrapper) GetGitiles() *GitilesTask
- func (m *TaskDefWrapper) GetNoop() *NoopTask
- func (m *TaskDefWrapper) GetUrlFetch() *UrlFetchTask
- func (*TaskDefWrapper) ProtoMessage()
- func (m *TaskDefWrapper) Reset()
- func (m *TaskDefWrapper) String() string
- func (m *TaskDefWrapper) XXX_DiscardUnknown()
- func (m *TaskDefWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TaskDefWrapper) XXX_Merge(src proto.Message)
- func (m *TaskDefWrapper) XXX_Size() int
- func (m *TaskDefWrapper) XXX_Unmarshal(b []byte) error
- type Trigger
- func (*Trigger) Descriptor() ([]byte, []int)
- func (m *Trigger) GetAclSets() []string
- func (m *Trigger) GetAcls() []*Acl
- func (m *Trigger) GetDisabled() bool
- func (m *Trigger) GetGitiles() *GitilesTask
- func (m *Trigger) GetId() string
- func (m *Trigger) GetNoop() *NoopTask
- func (m *Trigger) GetSchedule() string
- func (m *Trigger) GetTriggeringPolicy() *TriggeringPolicy
- func (m *Trigger) GetTriggers() []string
- func (*Trigger) ProtoMessage()
- func (m *Trigger) Reset()
- func (m *Trigger) String() string
- func (m *Trigger) XXX_DiscardUnknown()
- func (m *Trigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Trigger) XXX_Merge(src proto.Message)
- func (m *Trigger) XXX_Size() int
- func (m *Trigger) XXX_Unmarshal(b []byte) error
- type TriggeringPolicy
- func (*TriggeringPolicy) Descriptor() ([]byte, []int)
- func (m *TriggeringPolicy) GetKind() TriggeringPolicy_Kind
- func (m *TriggeringPolicy) GetLogBase() float32
- func (m *TriggeringPolicy) GetMaxBatchSize() int64
- func (m *TriggeringPolicy) GetMaxConcurrentInvocations() int64
- func (*TriggeringPolicy) ProtoMessage()
- func (m *TriggeringPolicy) Reset()
- func (m *TriggeringPolicy) String() string
- func (m *TriggeringPolicy) XXX_DiscardUnknown()
- func (m *TriggeringPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TriggeringPolicy) XXX_Merge(src proto.Message)
- func (m *TriggeringPolicy) XXX_Size() int
- func (m *TriggeringPolicy) XXX_Unmarshal(b []byte) error
- type TriggeringPolicy_Kind
- type UrlFetchTask
- func (*UrlFetchTask) Descriptor() ([]byte, []int)
- func (m *UrlFetchTask) GetMethod() string
- func (m *UrlFetchTask) GetTimeoutSec() int32
- func (m *UrlFetchTask) GetUrl() string
- func (*UrlFetchTask) ProtoMessage()
- func (m *UrlFetchTask) Reset()
- func (m *UrlFetchTask) String() string
- func (m *UrlFetchTask) XXX_DiscardUnknown()
- func (m *UrlFetchTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UrlFetchTask) XXX_Merge(src proto.Message)
- func (m *UrlFetchTask) XXX_Size() int
- func (m *UrlFetchTask) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var Acl_Role_name = map[int32]string{
0: "READER",
2: "TRIGGERER",
1: "OWNER",
}
var Acl_Role_value = map[string]int32{
"READER": 0,
"TRIGGERER": 2,
"OWNER": 1,
}
var TriggeringPolicy_Kind_name = map[int32]string{
0: "UNDEFINED",
1: "GREEDY_BATCHING",
2: "LOGARITHMIC_BATCHING",
}
var TriggeringPolicy_Kind_value = map[string]int32{
"UNDEFINED": 0,
"GREEDY_BATCHING": 1,
"LOGARITHMIC_BATCHING": 2,
}
Functions ¶
This section is empty.
Types ¶
type Acl ¶
type Acl struct { // Role denotes a list of actions that an identity can perform. Role Acl_Role `protobuf:"varint,1,opt,name=role,proto3,enum=scheduler.config.Acl_Role" json:"role,omitempty"` // Either email or "group:xyz" or auth service identity string "kind:name". GrantedTo string `protobuf:"bytes,2,opt,name=granted_to,json=grantedTo,proto3" json:"granted_to,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A single access control rule.
func (*Acl) Descriptor ¶
func (*Acl) GetGrantedTo ¶
func (*Acl) ProtoMessage ¶
func (*Acl) ProtoMessage()
func (*Acl) XXX_DiscardUnknown ¶
func (m *Acl) XXX_DiscardUnknown()
func (*Acl) XXX_Unmarshal ¶
type AclSet ¶
type AclSet struct { // A name of the ACL set, unique for a project. // Required. Must match regex '^[0-9A-Za-z_\-\.]{1,100}$'. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // List of access control rules. // The order does not matter. Acls []*Acl `protobuf:"bytes,2,rep,name=acls,proto3" json:"acls,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A set of Acl messages. Can be referenced in a Job or Trigger by name.
func (*AclSet) Descriptor ¶
func (*AclSet) ProtoMessage ¶
func (*AclSet) ProtoMessage()
func (*AclSet) XXX_DiscardUnknown ¶
func (m *AclSet) XXX_DiscardUnknown()
func (*AclSet) XXX_Marshal ¶
func (*AclSet) XXX_Unmarshal ¶
type Acl_Role ¶
type Acl_Role int32
const ( // Can do read-only operations, such as listing invocations of a Job. Acl_READER Acl_Role = 0 // Can emit triggers for a Job. // // Being TRIGGERER implicitly grants READER permission. Acl_TRIGGERER Acl_Role = 2 // Same as READER + TRIGGERER + can modify state of a Job or Invocation such // as aborting them. // LUCI scheduler (this service) is an OWNER of each `Job` and `Trigger`, // thus `Trigger`s are allowed to trigger all `Job`s defined in the same // project, regardless of their respective ACLs. Acl_OWNER Acl_Role = 1 )
func (Acl_Role) EnumDescriptor ¶
type BuildbucketTask ¶
type BuildbucketTask struct { // Server is hostname of the buildbucket service to use. // Typically, "cr-buildbucket.appspot.com". Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"` // Bucket defines what bucket to add the task to. Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"` // Builder defines what to run. Builder string `protobuf:"bytes,3,opt,name=builder,proto3" json:"builder,omitempty"` // Properties is arbitrary "key:value" pairs describing the task. // TODO(tandrii): which properties will be overridden if triggered? Properties []string `protobuf:"bytes,4,rep,name=properties,proto3" json:"properties,omitempty"` // Tags is a list of tags (as "key:value" pairs) to assign to the task. Tags []string `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
BuildbucketTask specifies parameters of Buildbucket-based jobs.
func (*BuildbucketTask) Descriptor ¶
func (*BuildbucketTask) Descriptor() ([]byte, []int)
func (*BuildbucketTask) GetBucket ¶
func (m *BuildbucketTask) GetBucket() string
func (*BuildbucketTask) GetBuilder ¶
func (m *BuildbucketTask) GetBuilder() string
func (*BuildbucketTask) GetProperties ¶
func (m *BuildbucketTask) GetProperties() []string
func (*BuildbucketTask) GetServer ¶
func (m *BuildbucketTask) GetServer() string
func (*BuildbucketTask) GetTags ¶
func (m *BuildbucketTask) GetTags() []string
func (*BuildbucketTask) ProtoMessage ¶
func (*BuildbucketTask) ProtoMessage()
func (*BuildbucketTask) Reset ¶
func (m *BuildbucketTask) Reset()
func (*BuildbucketTask) String ¶
func (m *BuildbucketTask) String() string
func (*BuildbucketTask) XXX_DiscardUnknown ¶
func (m *BuildbucketTask) XXX_DiscardUnknown()
func (*BuildbucketTask) XXX_Marshal ¶
func (m *BuildbucketTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BuildbucketTask) XXX_Merge ¶
func (m *BuildbucketTask) XXX_Merge(src proto.Message)
func (*BuildbucketTask) XXX_Size ¶
func (m *BuildbucketTask) XXX_Size() int
func (*BuildbucketTask) XXX_Unmarshal ¶
func (m *BuildbucketTask) XXX_Unmarshal(b []byte) error
type GitilesTask ¶
type GitilesTask struct { // Repo is the URL of the Gitiles repository. Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` // Refs is a list of Git references to track. // // Each ref can be either: // * a fully qualified ref like "refs/heads/master" or "refs/tags/v1.2.3" // * a regular expression with "regexp:" prefix to match multiple refs, e.g. // "regexp:refs/heads/[^/]+" or "regexp:refs/branch-heads/\d+\.\d+", but // the regular expression should have a literal prefix with at least two // slashes present, e.g. "refs/release-\d+/foobar" is not allowed, because // the literal prefix "refs/release-" contains only one slash. The regexp // should not start with ^ or end with $ as they will be added // automatically. Refs []string `protobuf:"bytes,2,rep,name=refs,proto3" json:"refs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
GitilesTask specifies parameters of what repo and which refs to watch for new commits.
GitilesTask will trigger other jobs if either:
- ref's tip has changed (e.g. new commit landed on a ref),
- a ref has just been created.
func (*GitilesTask) Descriptor ¶
func (*GitilesTask) Descriptor() ([]byte, []int)
func (*GitilesTask) GetRefs ¶
func (m *GitilesTask) GetRefs() []string
func (*GitilesTask) GetRepo ¶
func (m *GitilesTask) GetRepo() string
func (*GitilesTask) ProtoMessage ¶
func (*GitilesTask) ProtoMessage()
func (*GitilesTask) Reset ¶
func (m *GitilesTask) Reset()
func (*GitilesTask) String ¶
func (m *GitilesTask) String() string
func (*GitilesTask) XXX_DiscardUnknown ¶
func (m *GitilesTask) XXX_DiscardUnknown()
func (*GitilesTask) XXX_Marshal ¶
func (m *GitilesTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GitilesTask) XXX_Merge ¶
func (m *GitilesTask) XXX_Merge(src proto.Message)
func (*GitilesTask) XXX_Size ¶
func (m *GitilesTask) XXX_Size() int
func (*GitilesTask) XXX_Unmarshal ¶
func (m *GitilesTask) XXX_Unmarshal(b []byte) error
type Job ¶
type Job struct { // Id is a name of the job (unique for the project). // // Must match '^[0-9A-Za-z_\-\. \)\(]{1,100}$'. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Schedule describes when to run the job. // // A job with a schedule can still be triggered by other triggering jobs // and via "Trigger" button in UI. // // Supported kinds of schedules (illustrated by examples): // - "* 0 * * * *": cron-like expression, in a syntax supported by // https://github.com/gorhill/cronexpr (see its docs for full reference). // The cron engine will attempt to start a job at specified moments in // time (based on UTC clock). If when triggering a job, previous // invocation is still running, an overrun will be recorded (and next // attempt to start a job happens based on the schedule, not when the // previous invocation finishes). Some examples: // "0 */3 * * * *" - each 3 hours: at 12:00 AM UTC, 3:00 AM UTC, ... // "0 */3 * * *" - exact same thing (last field is optional) // "0 2,10,18 * * *" - at 2 AM UTC, 10 AM UTC, 6 PM UTC // "0 7 * * *" - at 7 AM UTC, once a day. // - "with 10s interval": runs invocations in a loop, waiting 10s after // finishing invocation before starting a new one. Overruns are not // possible. // - "continuously" is alias for "with 0s interval", meaning the job will // run in a loop without any pauses. // - "triggered" schedule indicates that job is only started via a trigger. // // Default is "triggered". Schedule string `protobuf:"bytes,2,opt,name=schedule,proto3" json:"schedule,omitempty"` // Disabled is true to disable this job. // // Disabled job is equivalent to a deleted job: it can't be triggered, it // can't be referenced by other jobs and it doesn't show up in UI or API. // // Use this instead of commenting out the definition in case you want to // temporarily git rid of the job. Disabled bool `protobuf:"varint,3,opt,name=disabled,proto3" json:"disabled,omitempty"` // List of access control rules for the Job. // The order does not matter. // There can be at most 32 different acls for a Job, including those from // acl_sets. Acls []*Acl `protobuf:"bytes,5,rep,name=acls,proto3" json:"acls,omitempty"` // A list of ACL set names. Each ACL in each referenced ACL set will be // included in this Job. // The order does not matter. AclSets []string `protobuf:"bytes,6,rep,name=acl_sets,json=aclSets,proto3" json:"acl_sets,omitempty"` // TriggeringPolicy defines how job handles incoming triggering events. // // If not specified defaults to GREEDY_BATCHING with 1 max concurrent // invocation. See comments in TriggeringPolicy for more details. TriggeringPolicy *TriggeringPolicy `protobuf:"bytes,7,opt,name=triggering_policy,json=triggeringPolicy,proto3" json:"triggering_policy,omitempty"` // Noop is used for testing. It is "do nothing" task. Noop *NoopTask `protobuf:"bytes,100,opt,name=noop,proto3" json:"noop,omitempty"` // UrlFetch can be used to make a simple HTTP call. UrlFetch *UrlFetchTask `protobuf:"bytes,101,opt,name=url_fetch,json=urlFetch,proto3" json:"url_fetch,omitempty"` // BuildbucketTask can be used to schedule buildbucket job. Buildbucket *BuildbucketTask `protobuf:"bytes,103,opt,name=buildbucket,proto3" json:"buildbucket,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Job specifies a single regular job belonging to a project.
Such jobs runs on a schedule or can be triggered by some trigger.
func (*Job) Descriptor ¶
func (*Job) GetAclSets ¶
func (*Job) GetBuildbucket ¶
func (m *Job) GetBuildbucket() *BuildbucketTask
func (*Job) GetDisabled ¶
func (*Job) GetSchedule ¶
func (*Job) GetTriggeringPolicy ¶
func (m *Job) GetTriggeringPolicy() *TriggeringPolicy
func (*Job) GetUrlFetch ¶
func (m *Job) GetUrlFetch() *UrlFetchTask
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) XXX_DiscardUnknown ¶
func (m *Job) XXX_DiscardUnknown()
func (*Job) XXX_Unmarshal ¶
type NoopTask ¶
type NoopTask struct { SleepMs int64 `protobuf:"varint,1,opt,name=sleep_ms,json=sleepMs,proto3" json:"sleep_ms,omitempty"` TriggersCount int64 `protobuf:"varint,2,opt,name=triggers_count,json=triggersCount,proto3" json:"triggers_count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
NoopTask is used for testing. It is a "do nothing" task that can emit fake triggers.
func (*NoopTask) Descriptor ¶
func (*NoopTask) GetSleepMs ¶
func (*NoopTask) GetTriggersCount ¶
func (*NoopTask) ProtoMessage ¶
func (*NoopTask) ProtoMessage()
func (*NoopTask) XXX_DiscardUnknown ¶
func (m *NoopTask) XXX_DiscardUnknown()
func (*NoopTask) XXX_Marshal ¶
func (*NoopTask) XXX_Unmarshal ¶
type ProjectConfig ¶
type ProjectConfig struct { // Job is a set of jobs defined in the project. Job []*Job `protobuf:"bytes,1,rep,name=job,proto3" json:"job,omitempty"` // Trigger is a set of triggering jobs defined in the project. Trigger []*Trigger `protobuf:"bytes,2,rep,name=trigger,proto3" json:"trigger,omitempty"` // A list of ACL sets. Names must be unique. AclSets []*AclSet `protobuf:"bytes,3,rep,name=acl_sets,json=aclSets,proto3" json:"acl_sets,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ProjectConfig defines a schema for a config file that describe jobs belonging to some project.
func (*ProjectConfig) Descriptor ¶
func (*ProjectConfig) Descriptor() ([]byte, []int)
func (*ProjectConfig) GetAclSets ¶
func (m *ProjectConfig) GetAclSets() []*AclSet
func (*ProjectConfig) GetJob ¶
func (m *ProjectConfig) GetJob() []*Job
func (*ProjectConfig) GetTrigger ¶
func (m *ProjectConfig) GetTrigger() []*Trigger
func (*ProjectConfig) ProtoMessage ¶
func (*ProjectConfig) ProtoMessage()
func (*ProjectConfig) Reset ¶
func (m *ProjectConfig) Reset()
func (*ProjectConfig) String ¶
func (m *ProjectConfig) String() string
func (*ProjectConfig) XXX_DiscardUnknown ¶
func (m *ProjectConfig) XXX_DiscardUnknown()
func (*ProjectConfig) XXX_Marshal ¶
func (m *ProjectConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProjectConfig) XXX_Merge ¶
func (m *ProjectConfig) XXX_Merge(src proto.Message)
func (*ProjectConfig) XXX_Size ¶
func (m *ProjectConfig) XXX_Size() int
func (*ProjectConfig) XXX_Unmarshal ¶
func (m *ProjectConfig) XXX_Unmarshal(b []byte) error
type TaskDefWrapper ¶
type TaskDefWrapper struct { Noop *NoopTask `protobuf:"bytes,1,opt,name=noop,proto3" json:"noop,omitempty"` UrlFetch *UrlFetchTask `protobuf:"bytes,2,opt,name=url_fetch,json=urlFetch,proto3" json:"url_fetch,omitempty"` Buildbucket *BuildbucketTask `protobuf:"bytes,4,opt,name=buildbucket,proto3" json:"buildbucket,omitempty"` Gitiles *GitilesTask `protobuf:"bytes,5,opt,name=gitiles,proto3" json:"gitiles,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TaskDefWrapper is a union type of all possible tasks known to the scheduler.
It is used internally when storing jobs in the datastore.
func (*TaskDefWrapper) Descriptor ¶
func (*TaskDefWrapper) Descriptor() ([]byte, []int)
func (*TaskDefWrapper) GetBuildbucket ¶
func (m *TaskDefWrapper) GetBuildbucket() *BuildbucketTask
func (*TaskDefWrapper) GetGitiles ¶
func (m *TaskDefWrapper) GetGitiles() *GitilesTask
func (*TaskDefWrapper) GetNoop ¶
func (m *TaskDefWrapper) GetNoop() *NoopTask
func (*TaskDefWrapper) GetUrlFetch ¶
func (m *TaskDefWrapper) GetUrlFetch() *UrlFetchTask
func (*TaskDefWrapper) ProtoMessage ¶
func (*TaskDefWrapper) ProtoMessage()
func (*TaskDefWrapper) Reset ¶
func (m *TaskDefWrapper) Reset()
func (*TaskDefWrapper) String ¶
func (m *TaskDefWrapper) String() string
func (*TaskDefWrapper) XXX_DiscardUnknown ¶
func (m *TaskDefWrapper) XXX_DiscardUnknown()
func (*TaskDefWrapper) XXX_Marshal ¶
func (m *TaskDefWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TaskDefWrapper) XXX_Merge ¶
func (m *TaskDefWrapper) XXX_Merge(src proto.Message)
func (*TaskDefWrapper) XXX_Size ¶
func (m *TaskDefWrapper) XXX_Size() int
func (*TaskDefWrapper) XXX_Unmarshal ¶
func (m *TaskDefWrapper) XXX_Unmarshal(b []byte) error
type Trigger ¶
type Trigger struct { // Id is a name of the job (unique for the project). // // Must match '^[0-9A-Za-z_\-\. \)\(]{1,100}$'. It's in the same namespace as // regular jobs. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Schedule describes when to run this triggering job. // // See Job.schedule for more info. Default is "with 30s interval". Schedule string `protobuf:"bytes,2,opt,name=schedule,proto3" json:"schedule,omitempty"` // Disabled is true to disable this job. // // Se Job.disabled for more info. Disabled bool `protobuf:"varint,3,opt,name=disabled,proto3" json:"disabled,omitempty"` // ACLs, see Job.acls and Job.acl_sets. Acls []*Acl `protobuf:"bytes,4,rep,name=acls,proto3" json:"acls,omitempty"` AclSets []string `protobuf:"bytes,5,rep,name=acl_sets,json=aclSets,proto3" json:"acl_sets,omitempty"` // TriggeringPolicy defines how job handles incoming triggering events. // // It is rare for a trigger itself to have a non-default triggering policy, // so most likely you should not touch this field. TriggeringPolicy *TriggeringPolicy `protobuf:"bytes,6,opt,name=triggering_policy,json=triggeringPolicy,proto3" json:"triggering_policy,omitempty"` // Triggers are IDs of jobs triggered by this trigger. Triggers []string `protobuf:"bytes,200,rep,name=triggers,proto3" json:"triggers,omitempty"` // Noop is used for testing. It is "do nothing" trigger. Noop *NoopTask `protobuf:"bytes,100,opt,name=noop,proto3" json:"noop,omitempty"` // Gitiles is used to trigger jobs for new commits on Gitiles. Gitiles *GitilesTask `protobuf:"bytes,101,opt,name=gitiles,proto3" json:"gitiles,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Trigger specifies a job that triggers other jobs.
It is a special kind of a job that periodically checks the state of the world and triggers other jobs.
func (*Trigger) Descriptor ¶
func (*Trigger) GetAclSets ¶
func (*Trigger) GetDisabled ¶
func (*Trigger) GetGitiles ¶
func (m *Trigger) GetGitiles() *GitilesTask
func (*Trigger) GetSchedule ¶
func (*Trigger) GetTriggeringPolicy ¶
func (m *Trigger) GetTriggeringPolicy() *TriggeringPolicy
func (*Trigger) GetTriggers ¶
func (*Trigger) ProtoMessage ¶
func (*Trigger) ProtoMessage()
func (*Trigger) XXX_DiscardUnknown ¶
func (m *Trigger) XXX_DiscardUnknown()
func (*Trigger) XXX_Marshal ¶
func (*Trigger) XXX_Unmarshal ¶
type TriggeringPolicy ¶
type TriggeringPolicy struct { // Defines an algorithm to use for the triggering decisions. // // See comments for Kind enum field. // // Default is GREEDY_BATCHING. Kind TriggeringPolicy_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=scheduler.config.TriggeringPolicy_Kind" json:"kind,omitempty"` // Limits number of job invocations running at the same time. // // If the number of current active invocations is more or equal to this // setting, the triggering function will be skipped completely, since it isn't // allowed to trigger anything anyway. // // Default is 1. MaxConcurrentInvocations int64 `` /* 136-byte string literal not displayed */ // Limits how many triggers can be put into one invocation request. // // For example, setting this to 1 will make each trigger launch its own // invocation. // // Default is 1000 (which is ~= unlimited). MaxBatchSize int64 `protobuf:"varint,3,opt,name=max_batch_size,json=maxBatchSize,proto3" json:"max_batch_size,omitempty"` // Base of the logarithm operation during logarithmic batching. // // For example, setting this to 2, will cause 3 out of 8 pending triggers to // be combined into a single invocation with LOGARITHMIC_BATCHING kind. This // value is ignored by other policy kinds. Must be larger or equal to 1.0001 // for numerical stability reasons. // // Required. LogBase float32 `protobuf:"fixed32,4,opt,name=log_base,json=logBase,proto3" json:"log_base,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TriggeringPolicy defines a function that decides when and how to launch a job invocation, given the job's current state and a set of pending triggers.
func (*TriggeringPolicy) Descriptor ¶
func (*TriggeringPolicy) Descriptor() ([]byte, []int)
func (*TriggeringPolicy) GetKind ¶
func (m *TriggeringPolicy) GetKind() TriggeringPolicy_Kind
func (*TriggeringPolicy) GetLogBase ¶
func (m *TriggeringPolicy) GetLogBase() float32
func (*TriggeringPolicy) GetMaxBatchSize ¶
func (m *TriggeringPolicy) GetMaxBatchSize() int64
func (*TriggeringPolicy) GetMaxConcurrentInvocations ¶
func (m *TriggeringPolicy) GetMaxConcurrentInvocations() int64
func (*TriggeringPolicy) ProtoMessage ¶
func (*TriggeringPolicy) ProtoMessage()
func (*TriggeringPolicy) Reset ¶
func (m *TriggeringPolicy) Reset()
func (*TriggeringPolicy) String ¶
func (m *TriggeringPolicy) String() string
func (*TriggeringPolicy) XXX_DiscardUnknown ¶
func (m *TriggeringPolicy) XXX_DiscardUnknown()
func (*TriggeringPolicy) XXX_Marshal ¶
func (m *TriggeringPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TriggeringPolicy) XXX_Merge ¶
func (m *TriggeringPolicy) XXX_Merge(src proto.Message)
func (*TriggeringPolicy) XXX_Size ¶
func (m *TriggeringPolicy) XXX_Size() int
func (*TriggeringPolicy) XXX_Unmarshal ¶
func (m *TriggeringPolicy) XXX_Unmarshal(b []byte) error
type TriggeringPolicy_Kind ¶
type TriggeringPolicy_Kind int32
const ( // A placeholder for unrecognized policy kind. TriggeringPolicy_UNDEFINED TriggeringPolicy_Kind = 0 // A greedy triggering function that takes all pending triggers (up to // max_batch_size limit) and collapses them into one new invocation, // deriving its properties from the most recent trigger alone. It doesn't // wait for a full batch, nor tries to batch evenly. TriggeringPolicy_GREEDY_BATCHING TriggeringPolicy_Kind = 1 // A logarithmic triggering function that takes log_k N pending triggers (up // to max_batch_size limit) and collapses them into one new incovation, // deriving its properties from the most recent trigger alone, where N is // the total number of pending triggers and k is specified by the log_base // field below. TriggeringPolicy_LOGARITHMIC_BATCHING TriggeringPolicy_Kind = 2 )
func (TriggeringPolicy_Kind) EnumDescriptor ¶
func (TriggeringPolicy_Kind) EnumDescriptor() ([]byte, []int)
func (TriggeringPolicy_Kind) String ¶
func (x TriggeringPolicy_Kind) String() string
type UrlFetchTask ¶
type UrlFetchTask struct { // Method is HTTP method to use, such as "GET" or "POST". Default is "GET". Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` // Url to send the request to. Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // Timeout is how long to wait for request to complete. Default is 60 sec. TimeoutSec int32 `protobuf:"varint,3,opt,name=timeout_sec,json=timeoutSec,proto3" json:"timeout_sec,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
UrlFetchTask specifies parameters for simple HTTP call.
func (*UrlFetchTask) Descriptor ¶
func (*UrlFetchTask) Descriptor() ([]byte, []int)
func (*UrlFetchTask) GetMethod ¶
func (m *UrlFetchTask) GetMethod() string
func (*UrlFetchTask) GetTimeoutSec ¶
func (m *UrlFetchTask) GetTimeoutSec() int32
func (*UrlFetchTask) GetUrl ¶
func (m *UrlFetchTask) GetUrl() string
func (*UrlFetchTask) ProtoMessage ¶
func (*UrlFetchTask) ProtoMessage()
func (*UrlFetchTask) Reset ¶
func (m *UrlFetchTask) Reset()
func (*UrlFetchTask) String ¶
func (m *UrlFetchTask) String() string
func (*UrlFetchTask) XXX_DiscardUnknown ¶
func (m *UrlFetchTask) XXX_DiscardUnknown()
func (*UrlFetchTask) XXX_Marshal ¶
func (m *UrlFetchTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UrlFetchTask) XXX_Merge ¶
func (m *UrlFetchTask) XXX_Merge(src proto.Message)
func (*UrlFetchTask) XXX_Size ¶
func (m *UrlFetchTask) XXX_Size() int
func (*UrlFetchTask) XXX_Unmarshal ¶
func (m *UrlFetchTask) XXX_Unmarshal(b []byte) error