messages

package
v0.0.0-...-4a11b79 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Acl_Role_name = map[int32]string{
	0: "READER",
	2: "TRIGGERER",
	1: "OWNER",
}
View Source
var Acl_Role_value = map[string]int32{
	"READER":    0,
	"TRIGGERER": 2,
	"OWNER":     1,
}
View Source
var TriggeringPolicy_Kind_name = map[int32]string{
	0: "UNDEFINED",
	1: "GREEDY_BATCHING",
	2: "LOGARITHMIC_BATCHING",
}
View Source
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.

Deprecated in favor of LUCI Realms.

func (*Acl) Descriptor

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

func (*Acl) GetGrantedTo

func (m *Acl) GetGrantedTo() string

func (*Acl) GetRole

func (m *Acl) GetRole() Acl_Role

func (*Acl) ProtoMessage

func (*Acl) ProtoMessage()

func (*Acl) Reset

func (m *Acl) Reset()

func (*Acl) String

func (m *Acl) String() string

func (*Acl) XXX_DiscardUnknown

func (m *Acl) XXX_DiscardUnknown()

func (*Acl) XXX_Marshal

func (m *Acl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Acl) XXX_Merge

func (m *Acl) XXX_Merge(src proto.Message)

func (*Acl) XXX_Size

func (m *Acl) XXX_Size() int

func (*Acl) XXX_Unmarshal

func (m *Acl) XXX_Unmarshal(b []byte) error

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.

Deprecated in favor of LUCI Realms.

func (*AclSet) Descriptor

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

func (*AclSet) GetAcls

func (m *AclSet) GetAcls() []*Acl

func (*AclSet) GetName

func (m *AclSet) GetName() string

func (*AclSet) ProtoMessage

func (*AclSet) ProtoMessage()

func (*AclSet) Reset

func (m *AclSet) Reset()

func (*AclSet) String

func (m *AclSet) String() string

func (*AclSet) XXX_DiscardUnknown

func (m *AclSet) XXX_DiscardUnknown()

func (*AclSet) XXX_Marshal

func (m *AclSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AclSet) XXX_Merge

func (m *AclSet) XXX_Merge(src proto.Message)

func (*AclSet) XXX_Size

func (m *AclSet) XXX_Size() int

func (*AclSet) XXX_Unmarshal

func (m *AclSet) XXX_Unmarshal(b []byte) error

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

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

func (Acl_Role) String

func (x Acl_Role) String() string

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.
	//
	// Each tracked ref, either fully qualified or regexp, must match at least 1
	// ref in gitiles output.
	Refs []string `protobuf:"bytes,2,rep,name=refs,proto3" json:"refs,omitempty"`
	// Optional path_regexps and path_regexps_exclude are lists of regular
	// expressions limiting emitted triggers only to commits whose tree diff
	// touches relevant files.
	//
	// If neither path_regexps nor path_regexps_exclude is specified (default),
	// emits triggers for any commit.
	// Specifying just path_regexps_exclude is not allowed.
	//
	// path_regexps and path_regexps_exclude rules apply on each individual commit
	// independently. For each commit, a set of all filepaths referenced in Git
	// commit diff is used for matching.  On top of simple file additions and file
	// modifications, this also includes: file removals, file moves (old and new
	// path is considered), and changing of file metadata (e.g., chmod +x). This
	// doesn't include directories (git doesn't track them explicitly).
	//
	// Triggers are emitted for a commit if only if at least 1 touched filepath
	//  1. is not matched by any path_regexps_exclude,
	//  2. AND is matched at least 1 path_regexps
	// **subject to caveats below** for exceptional cases.
	//
	// Each path_regexps and path_regexps_exclude is a regular expression
	// "a/b/c/.+". It should not start with ^ or end with $ as they will be added
	// automatically.
	//
	// CAVEATS:
	//  1. path_regexps: ".+"
	//     will NOT match commits which modify no files (aka empty commits) and
	//     as such differs from default case of not specifying any `path_regexps`.
	//  2. Per GitilesTask doc, if a ref fast-forwards >=50 commits, only the last
	//     50 commits are checked. If none of them matches any path specified here,
	//     a single trigger is emitted for the ref's new tip.
	//     Rational: it's better to emit redundant triggers than silently not emit
	//     triggers for commits beyond latest 50.
	//     TODO(tandrii): it's possible to improve this by examining diff
	//     between ref's last and new tips, but one has to worry about gitiles
	//     taking potentially very long time to compute it.
	//  3. If a ref tip has just been created, a trigger would be emitted
	//     regardless of corresponding commit's diff.
	PathRegexps          []string `protobuf:"bytes,3,rep,name=path_regexps,json=pathRegexps,proto3" json:"path_regexps,omitempty"`
	PathRegexpsExclude   []string `protobuf:"bytes,4,rep,name=path_regexps_exclude,json=pathRegexpsExclude,proto3" json:"path_regexps_exclude,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.

LIMITATIONS:

  1. Per each fast-forward ref's tip change as observed by scheduler, no more than 50 latest (according to gitiles default ordering) commits will result in emitted triggers. This is a safeguard against mistaken or deliberate but unusual git push actions, which typically don't have intent of triggering a build for each such commit. If you absolutely need to act on every new commit even in such cases, you will need to roll your own implementation, though you may still find Scheduler GitilesTask useful to trigger your code on new changes.

  2. No hard latency guarantee. A single invocation of GitilesTask may not be able to process all the backlog. This is particularly true after a config change changes the set of watched ref. However, GitilesTask is designed to make continuous progress with each invocation.

func (*GitilesTask) Descriptor

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

func (*GitilesTask) GetPathRegexps

func (m *GitilesTask) GetPathRegexps() []string

func (*GitilesTask) GetPathRegexpsExclude

func (m *GitilesTask) GetPathRegexpsExclude() []string

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"`
	// Realm is a name of a LUCI realm within the project to use for ACLs.
	//
	// Must match `^[a-z0-9_\.\-/]{1,400}$` or be literals "@root" or "@legacy".
	// If not set, defaults to "@legacy".
	//
	// ACLs associated with a realm are defined separately in realms.cfg file.
	// That way they can be shared by multiple services.
	Realm string `protobuf:"bytes,8,opt,name=realm,proto3" json:"realm,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 1/3 * * *" - each 3 hours but starting 1:00 AM UTC
	//       "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"` // Deprecated: Do not use.
	// 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"` // Deprecated: Do not use.
	// 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) Descriptor() ([]byte, []int)

func (*Job) GetAclSets deprecated

func (m *Job) GetAclSets() []string

Deprecated: Do not use.

func (*Job) GetAcls deprecated

func (m *Job) GetAcls() []*Acl

Deprecated: Do not use.

func (*Job) GetBuildbucket

func (m *Job) GetBuildbucket() *BuildbucketTask

func (*Job) GetDisabled

func (m *Job) GetDisabled() bool

func (*Job) GetId

func (m *Job) GetId() string

func (*Job) GetNoop

func (m *Job) GetNoop() *NoopTask

func (*Job) GetRealm

func (m *Job) GetRealm() string

func (*Job) GetSchedule

func (m *Job) GetSchedule() string

func (*Job) GetTriggeringPolicy

func (m *Job) GetTriggeringPolicy() *TriggeringPolicy

func (*Job) GetUrlFetch

func (m *Job) GetUrlFetch() *UrlFetchTask

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) Reset

func (m *Job) Reset()

func (*Job) String

func (m *Job) String() string

func (*Job) XXX_DiscardUnknown

func (m *Job) XXX_DiscardUnknown()

func (*Job) XXX_Marshal

func (m *Job) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Job) XXX_Merge

func (m *Job) XXX_Merge(src proto.Message)

func (*Job) XXX_Size

func (m *Job) XXX_Size() int

func (*Job) XXX_Unmarshal

func (m *Job) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*NoopTask) GetSleepMs

func (m *NoopTask) GetSleepMs() int64

func (*NoopTask) GetTriggersCount

func (m *NoopTask) GetTriggersCount() int64

func (*NoopTask) ProtoMessage

func (*NoopTask) ProtoMessage()

func (*NoopTask) Reset

func (m *NoopTask) Reset()

func (*NoopTask) String

func (m *NoopTask) String() string

func (*NoopTask) XXX_DiscardUnknown

func (m *NoopTask) XXX_DiscardUnknown()

func (*NoopTask) XXX_Marshal

func (m *NoopTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NoopTask) XXX_Merge

func (m *NoopTask) XXX_Merge(src proto.Message)

func (*NoopTask) XXX_Size

func (m *NoopTask) XXX_Size() int

func (*NoopTask) XXX_Unmarshal

func (m *NoopTask) XXX_Unmarshal(b []byte) error

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"` // Deprecated: Do not use.
	// A set of security options to be enabled individually for the project.
	SecurityOptions      *SecurityOptions `protobuf:"bytes,4,opt,name=security_options,json=securityOptions,proto3" json:"security_options,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 deprecated

func (m *ProjectConfig) GetAclSets() []*AclSet

Deprecated: Do not use.

func (*ProjectConfig) GetJob

func (m *ProjectConfig) GetJob() []*Job

func (*ProjectConfig) GetSecurityOptions

func (m *ProjectConfig) GetSecurityOptions() *SecurityOptions

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 SecurityOptions

type SecurityOptions struct {
	// Enables the use of project scoped service accounts.
	ProjectScopedServiceAccounts bool     `` /* 150-byte string literal not displayed */
	XXX_NoUnkeyedLiteral         struct{} `json:"-"`
	XXX_unrecognized             []byte   `json:"-"`
	XXX_sizecache                int32    `json:"-"`
}

SecurityOptions enable project specific security features.

func (*SecurityOptions) Descriptor

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

func (*SecurityOptions) GetProjectScopedServiceAccounts

func (m *SecurityOptions) GetProjectScopedServiceAccounts() bool

func (*SecurityOptions) ProtoMessage

func (*SecurityOptions) ProtoMessage()

func (*SecurityOptions) Reset

func (m *SecurityOptions) Reset()

func (*SecurityOptions) String

func (m *SecurityOptions) String() string

func (*SecurityOptions) XXX_DiscardUnknown

func (m *SecurityOptions) XXX_DiscardUnknown()

func (*SecurityOptions) XXX_Marshal

func (m *SecurityOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SecurityOptions) XXX_Merge

func (m *SecurityOptions) XXX_Merge(src proto.Message)

func (*SecurityOptions) XXX_Size

func (m *SecurityOptions) XXX_Size() int

func (*SecurityOptions) XXX_Unmarshal

func (m *SecurityOptions) 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"`
	// Realm is a name of a LUCI realm within the project to use for ACLs.
	//
	// Must match `^[a-z0-9_\.\-/]{1,400}$` or be literals "@root" or "@legacy".
	// If not set, defaults to "@legacy".
	//
	// ACLs associated with a realm are defined separately in realms.cfg file.
	// That way they can be shared by multiple services.
	Realm string `protobuf:"bytes,7,opt,name=realm,proto3" json:"realm,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"`                      // Deprecated: Do not use.
	AclSets []string `protobuf:"bytes,5,rep,name=acl_sets,json=aclSets,proto3" json:"acl_sets,omitempty"` // Deprecated: Do not use.
	// 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) Descriptor() ([]byte, []int)

func (*Trigger) GetAclSets deprecated

func (m *Trigger) GetAclSets() []string

Deprecated: Do not use.

func (*Trigger) GetAcls deprecated

func (m *Trigger) GetAcls() []*Acl

Deprecated: Do not use.

func (*Trigger) GetDisabled

func (m *Trigger) GetDisabled() bool

func (*Trigger) GetGitiles

func (m *Trigger) GetGitiles() *GitilesTask

func (*Trigger) GetId

func (m *Trigger) GetId() string

func (*Trigger) GetNoop

func (m *Trigger) GetNoop() *NoopTask

func (*Trigger) GetRealm

func (m *Trigger) GetRealm() string

func (*Trigger) GetSchedule

func (m *Trigger) GetSchedule() string

func (*Trigger) GetTriggeringPolicy

func (m *Trigger) GetTriggeringPolicy() *TriggeringPolicy

func (*Trigger) GetTriggers

func (m *Trigger) GetTriggers() []string

func (*Trigger) ProtoMessage

func (*Trigger) ProtoMessage()

func (*Trigger) Reset

func (m *Trigger) Reset()

func (*Trigger) String

func (m *Trigger) String() string

func (*Trigger) XXX_DiscardUnknown

func (m *Trigger) XXX_DiscardUnknown()

func (*Trigger) XXX_Marshal

func (m *Trigger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Trigger) XXX_Merge

func (m *Trigger) XXX_Merge(src proto.Message)

func (*Trigger) XXX_Size

func (m *Trigger) XXX_Size() int

func (*Trigger) XXX_Unmarshal

func (m *Trigger) XXX_Unmarshal(b []byte) error

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 (*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

Jump to

Keyboard shortcuts

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