Documentation ¶
Index ¶
- Constants
- func NewLabels(labels map[string]string) (map[string]string, error)
- type AlertSpec
- type Asset
- type Config
- type Downstream
- type DownstreamList
- type FullName
- type FullNames
- type Hook
- type Job
- func (j *Job) Destination() ResourceURN
- func (j *Job) FullName() string
- func (j *Job) GetJobWithUnresolvedUpstream() (*WithUpstream, error)
- func (j *Job) GetName() string
- func (j *Job) ProjectName() tenant.ProjectName
- func (j *Job) Sources() []ResourceURN
- func (j *Job) Spec() *Spec
- func (j *Job) StaticUpstreamNames() []SpecUpstreamName
- func (j *Job) Tenant() tenant.Tenant
- type Jobs
- func (j Jobs) GetJobNames() []Name
- func (j Jobs) GetJobsWithUnresolvedUpstreams() ([]*WithUpstream, error)
- func (j Jobs) GetNameAndJobMap() map[Name]*Job
- func (j Jobs) GetNameAndSpecMap() map[Name]*Spec
- func (j Jobs) GetNamespaceNameAndJobsMap() map[tenant.NamespaceName][]*Job
- func (j Jobs) GetSpecs() []*Spec
- type Metadata
- type MetadataBuilder
- type MetadataResource
- type MetadataResourceConfig
- type Name
- type ResourceURN
- type Retry
- type Schedule
- type ScheduleBuilder
- func (s *ScheduleBuilder) Build() (*Schedule, error)
- func (s *ScheduleBuilder) WithDependsOnPast(dependsOnPast bool) *ScheduleBuilder
- func (s *ScheduleBuilder) WithEndDate(endDate ScheduleDate) *ScheduleBuilder
- func (s *ScheduleBuilder) WithInterval(interval string) *ScheduleBuilder
- func (s *ScheduleBuilder) WithRetry(retry *Retry) *ScheduleBuilder
- type ScheduleDate
- type Spec
- func (s *Spec) AlertSpecs() []*AlertSpec
- func (s *Spec) Asset() Asset
- func (s *Spec) Description() string
- func (s *Spec) Hooks() []*Hook
- func (s *Spec) Labels() map[string]string
- func (s *Spec) Metadata() *Metadata
- func (s *Spec) Name() Name
- func (s *Spec) Owner() string
- func (s *Spec) Schedule() *Schedule
- func (s *Spec) Task() Task
- func (s *Spec) UpstreamSpec() *UpstreamSpec
- func (s *Spec) Version() int
- func (s *Spec) Window() models.Window
- type SpecBuilder
- func (s *SpecBuilder) Build() (*Spec, error)
- func (s *SpecBuilder) WithAlerts(alerts []*AlertSpec) *SpecBuilder
- func (s *SpecBuilder) WithAsset(asset Asset) *SpecBuilder
- func (s *SpecBuilder) WithDescription(description string) *SpecBuilder
- func (s *SpecBuilder) WithHooks(hooks []*Hook) *SpecBuilder
- func (s *SpecBuilder) WithLabels(labels map[string]string) *SpecBuilder
- func (s *SpecBuilder) WithMetadata(metadata *Metadata) *SpecBuilder
- func (s *SpecBuilder) WithSpecUpstream(specUpstream *UpstreamSpec) *SpecBuilder
- type SpecHTTPUpstream
- type SpecHTTPUpstreamBuilder
- type SpecUpstreamBuilder
- type SpecUpstreamName
- type Specs
- type State
- type Task
- type TaskName
- type Upstream
- func (u *Upstream) External() bool
- func (u *Upstream) FullName() string
- func (u *Upstream) Host() string
- func (u *Upstream) Name() Name
- func (u *Upstream) NamespaceName() tenant.NamespaceName
- func (u *Upstream) ProjectName() tenant.ProjectName
- func (u *Upstream) Resource() ResourceURN
- func (u *Upstream) State() UpstreamState
- func (u *Upstream) TaskName() TaskName
- func (u *Upstream) Type() UpstreamType
- type UpstreamSpec
- type UpstreamState
- type UpstreamType
- type Upstreams
- type WithUpstream
- type WithUpstreams
Constants ¶
View Source
const ( EntityJob = "job" UpstreamTypeStatic UpstreamType = "static" UpstreamTypeInferred UpstreamType = "inferred" UpstreamStateResolved UpstreamState = "resolved" UpstreamStateUnresolved UpstreamState = "unresolved" MetricJobEvent = "job_events_total" MetricJobEventStateAdded = "added" MetricJobEventStateUpdated = "updated" MetricJobEventStateDeleted = "deleted" MetricJobEventStateUpsertFailed = "upsert_failed" MetricJobEventStateDeleteFailed = "delete_failed" MetricJobEventStateValidationFailed = "validation_failed" MetricJobEventEnabled = "enabled" MetricJobEventDisabled = "disabled" MetricJobRefreshResourceDownstream = "refresh_resource_downstream_total" )
View Source
const (
DateLayout = "2006-01-02"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlertSpec ¶
type AlertSpec struct {
// contains filtered or unexported fields
}
func NewAlertSpec ¶
type Downstream ¶
type Downstream struct {
// contains filtered or unexported fields
}
func NewDownstream ¶
func NewDownstream(name Name, projectName tenant.ProjectName, namespaceName tenant.NamespaceName, taskName TaskName) *Downstream
func (Downstream) FullName ¶
func (d Downstream) FullName() FullName
func (Downstream) Name ¶
func (d Downstream) Name() Name
func (Downstream) NamespaceName ¶
func (d Downstream) NamespaceName() tenant.NamespaceName
func (Downstream) ProjectName ¶
func (d Downstream) ProjectName() tenant.ProjectName
func (Downstream) TaskName ¶
func (d Downstream) TaskName() TaskName
type DownstreamList ¶
type DownstreamList []*Downstream
func (DownstreamList) GetDownstreamFullNames ¶
func (d DownstreamList) GetDownstreamFullNames() FullNames
type FullName ¶
type FullName string
func FullNameFrom ¶
func FullNameFrom(projectName tenant.ProjectName, jobName Name) FullName
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
func NewJob ¶
func NewJob(tenant tenant.Tenant, spec *Spec, destination ResourceURN, sources []ResourceURN) *Job
func (*Job) Destination ¶
func (j *Job) Destination() ResourceURN
func (*Job) GetJobWithUnresolvedUpstream ¶
func (j *Job) GetJobWithUnresolvedUpstream() (*WithUpstream, error)
func (*Job) ProjectName ¶
func (j *Job) ProjectName() tenant.ProjectName
func (*Job) Sources ¶
func (j *Job) Sources() []ResourceURN
func (*Job) StaticUpstreamNames ¶
func (j *Job) StaticUpstreamNames() []SpecUpstreamName
type Jobs ¶
type Jobs []*Job
func (Jobs) GetJobNames ¶
func (Jobs) GetJobsWithUnresolvedUpstreams ¶
func (j Jobs) GetJobsWithUnresolvedUpstreams() ([]*WithUpstream, error)
func (Jobs) GetNameAndJobMap ¶
func (Jobs) GetNameAndSpecMap ¶
func (Jobs) GetNamespaceNameAndJobsMap ¶
func (j Jobs) GetNamespaceNameAndJobsMap() map[tenant.NamespaceName][]*Job
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
func (Metadata) Resource ¶
func (m Metadata) Resource() *MetadataResource
type MetadataBuilder ¶
type MetadataBuilder struct {
// contains filtered or unexported fields
}
func NewMetadataBuilder ¶
func NewMetadataBuilder() *MetadataBuilder
func (*MetadataBuilder) Build ¶
func (m *MetadataBuilder) Build() (*Metadata, error)
func (*MetadataBuilder) WithResource ¶
func (m *MetadataBuilder) WithResource(resource *MetadataResource) *MetadataBuilder
func (*MetadataBuilder) WithScheduler ¶
func (m *MetadataBuilder) WithScheduler(scheduler map[string]string) *MetadataBuilder
type MetadataResource ¶
type MetadataResource struct {
// contains filtered or unexported fields
}
func NewResourceMetadata ¶
func NewResourceMetadata(request, limit *MetadataResourceConfig) *MetadataResource
func (MetadataResource) Limit ¶
func (m MetadataResource) Limit() *MetadataResourceConfig
func (MetadataResource) Request ¶
func (m MetadataResource) Request() *MetadataResourceConfig
type MetadataResourceConfig ¶
type MetadataResourceConfig struct {
// contains filtered or unexported fields
}
func NewMetadataResourceConfig ¶
func NewMetadataResourceConfig(cpu, memory string) *MetadataResourceConfig
func (MetadataResourceConfig) CPU ¶
func (m MetadataResourceConfig) CPU() string
func (MetadataResourceConfig) Memory ¶
func (m MetadataResourceConfig) Memory() string
type ResourceURN ¶
type ResourceURN string
func (ResourceURN) String ¶
func (n ResourceURN) String() string
type Retry ¶
type Retry struct {
// contains filtered or unexported fields
}
func (Retry) ExponentialBackoff ¶
type Schedule ¶
type Schedule struct {
// contains filtered or unexported fields
}
func (Schedule) DependsOnPast ¶
func (Schedule) EndDate ¶
func (s Schedule) EndDate() ScheduleDate
func (Schedule) StartDate ¶
func (s Schedule) StartDate() ScheduleDate
type ScheduleBuilder ¶
type ScheduleBuilder struct {
// contains filtered or unexported fields
}
func NewScheduleBuilder ¶
func NewScheduleBuilder(startDate ScheduleDate) *ScheduleBuilder
TODO: move interval to optional
func (*ScheduleBuilder) Build ¶
func (s *ScheduleBuilder) Build() (*Schedule, error)
func (*ScheduleBuilder) WithDependsOnPast ¶
func (s *ScheduleBuilder) WithDependsOnPast(dependsOnPast bool) *ScheduleBuilder
func (*ScheduleBuilder) WithEndDate ¶
func (s *ScheduleBuilder) WithEndDate(endDate ScheduleDate) *ScheduleBuilder
func (*ScheduleBuilder) WithInterval ¶
func (s *ScheduleBuilder) WithInterval(interval string) *ScheduleBuilder
func (*ScheduleBuilder) WithRetry ¶
func (s *ScheduleBuilder) WithRetry(retry *Retry) *ScheduleBuilder
type ScheduleDate ¶
type ScheduleDate string
func ScheduleDateFrom ¶
func ScheduleDateFrom(date string) (ScheduleDate, error)
func (ScheduleDate) String ¶
func (s ScheduleDate) String() string
type Spec ¶
type Spec struct {
// contains filtered or unexported fields
}
func (*Spec) AlertSpecs ¶
func (*Spec) Description ¶
func (*Spec) UpstreamSpec ¶
func (s *Spec) UpstreamSpec() *UpstreamSpec
type SpecBuilder ¶
type SpecBuilder struct {
// contains filtered or unexported fields
}
func NewSpecBuilder ¶
func (*SpecBuilder) Build ¶
func (s *SpecBuilder) Build() (*Spec, error)
func (*SpecBuilder) WithAlerts ¶
func (s *SpecBuilder) WithAlerts(alerts []*AlertSpec) *SpecBuilder
func (*SpecBuilder) WithAsset ¶
func (s *SpecBuilder) WithAsset(asset Asset) *SpecBuilder
func (*SpecBuilder) WithDescription ¶
func (s *SpecBuilder) WithDescription(description string) *SpecBuilder
func (*SpecBuilder) WithHooks ¶
func (s *SpecBuilder) WithHooks(hooks []*Hook) *SpecBuilder
func (*SpecBuilder) WithLabels ¶
func (s *SpecBuilder) WithLabels(labels map[string]string) *SpecBuilder
func (*SpecBuilder) WithMetadata ¶
func (s *SpecBuilder) WithMetadata(metadata *Metadata) *SpecBuilder
func (*SpecBuilder) WithSpecUpstream ¶
func (s *SpecBuilder) WithSpecUpstream(specUpstream *UpstreamSpec) *SpecBuilder
type SpecHTTPUpstream ¶
type SpecHTTPUpstream struct {
// contains filtered or unexported fields
}
TODO: reconsider whether we still need it or not
func (SpecHTTPUpstream) Headers ¶
func (s SpecHTTPUpstream) Headers() map[string]string
func (SpecHTTPUpstream) Name ¶
func (s SpecHTTPUpstream) Name() string
func (SpecHTTPUpstream) Params ¶
func (s SpecHTTPUpstream) Params() map[string]string
func (SpecHTTPUpstream) URL ¶
func (s SpecHTTPUpstream) URL() string
type SpecHTTPUpstreamBuilder ¶
type SpecHTTPUpstreamBuilder struct {
// contains filtered or unexported fields
}
func NewSpecHTTPUpstreamBuilder ¶
func NewSpecHTTPUpstreamBuilder(name, url string) *SpecHTTPUpstreamBuilder
func (*SpecHTTPUpstreamBuilder) Build ¶
func (s *SpecHTTPUpstreamBuilder) Build() (*SpecHTTPUpstream, error)
func (*SpecHTTPUpstreamBuilder) WithHeaders ¶
func (s *SpecHTTPUpstreamBuilder) WithHeaders(headers map[string]string) *SpecHTTPUpstreamBuilder
func (*SpecHTTPUpstreamBuilder) WithParams ¶
func (s *SpecHTTPUpstreamBuilder) WithParams(params map[string]string) *SpecHTTPUpstreamBuilder
type SpecUpstreamBuilder ¶
type SpecUpstreamBuilder struct {
// contains filtered or unexported fields
}
func NewSpecUpstreamBuilder ¶
func NewSpecUpstreamBuilder() *SpecUpstreamBuilder
func (*SpecUpstreamBuilder) Build ¶
func (s *SpecUpstreamBuilder) Build() (*UpstreamSpec, error)
func (*SpecUpstreamBuilder) WithSpecHTTPUpstream ¶
func (s *SpecUpstreamBuilder) WithSpecHTTPUpstream(httpUpstreams []*SpecHTTPUpstream) *SpecUpstreamBuilder
func (*SpecUpstreamBuilder) WithUpstreamNames ¶
func (s *SpecUpstreamBuilder) WithUpstreamNames(names []SpecUpstreamName) *SpecUpstreamBuilder
type SpecUpstreamName ¶
type SpecUpstreamName string
func SpecUpstreamNameFrom ¶
func SpecUpstreamNameFrom(specUpstreamName string) SpecUpstreamName
func (SpecUpstreamName) GetJobName ¶
func (s SpecUpstreamName) GetJobName() (Name, error)
func (SpecUpstreamName) GetProjectName ¶
func (s SpecUpstreamName) GetProjectName() (tenant.ProjectName, error)
func (SpecUpstreamName) IsWithProjectName ¶
func (s SpecUpstreamName) IsWithProjectName() bool
func (SpecUpstreamName) String ¶
func (s SpecUpstreamName) String() string
type Specs ¶
type Specs []*Spec
func (Specs) ToFullNameAndSpecMap ¶
func (s Specs) ToFullNameAndSpecMap(projectName tenant.ProjectName) map[FullName]*Spec
func (Specs) ToNameAndSpecMap ¶
type Upstream ¶
type Upstream struct {
// contains filtered or unexported fields
}
func NewUpstreamResolved ¶
func NewUpstreamResolved(name Name, host string, resource ResourceURN, jobTenant tenant.Tenant, upstreamType UpstreamType, taskName TaskName, external bool) *Upstream
func NewUpstreamUnresolvedInferred ¶
func NewUpstreamUnresolvedInferred(resource ResourceURN) *Upstream
func NewUpstreamUnresolvedStatic ¶
func NewUpstreamUnresolvedStatic(name Name, projectName tenant.ProjectName) *Upstream
func (*Upstream) NamespaceName ¶
func (u *Upstream) NamespaceName() tenant.NamespaceName
func (*Upstream) ProjectName ¶
func (u *Upstream) ProjectName() tenant.ProjectName
func (*Upstream) Resource ¶
func (u *Upstream) Resource() ResourceURN
func (*Upstream) State ¶
func (u *Upstream) State() UpstreamState
func (*Upstream) Type ¶
func (u *Upstream) Type() UpstreamType
type UpstreamSpec ¶
type UpstreamSpec struct {
// contains filtered or unexported fields
}
func (UpstreamSpec) HTTPUpstreams ¶
func (s UpstreamSpec) HTTPUpstreams() []*SpecHTTPUpstream
func (UpstreamSpec) UpstreamNames ¶
func (s UpstreamSpec) UpstreamNames() []SpecUpstreamName
type UpstreamState ¶
type UpstreamState string
func (UpstreamState) String ¶
func (d UpstreamState) String() string
type UpstreamType ¶
type UpstreamType string
func UpstreamTypeFrom ¶
func UpstreamTypeFrom(str string) (UpstreamType, error)
func (UpstreamType) String ¶
func (d UpstreamType) String() string
type Upstreams ¶
type Upstreams []*Upstream
func (Upstreams) Deduplicate ¶
func (Upstreams) ToFullNameAndUpstreamMap ¶
func (Upstreams) ToResourceDestinationAndUpstreamMap ¶
type WithUpstream ¶
type WithUpstream struct {
// contains filtered or unexported fields
}
func NewWithUpstream ¶
func NewWithUpstream(job *Job, upstreams []*Upstream) *WithUpstream
func (WithUpstream) GetName ¶
func (w WithUpstream) GetName() string
func (WithUpstream) GetResolvedUpstreams ¶
func (w WithUpstream) GetResolvedUpstreams() []*Upstream
func (WithUpstream) GetUnresolvedUpstreams ¶
func (w WithUpstream) GetUnresolvedUpstreams() []*Upstream
func (WithUpstream) Job ¶
func (w WithUpstream) Job() *Job
func (WithUpstream) Name ¶
func (w WithUpstream) Name() Name
func (WithUpstream) Upstreams ¶
func (w WithUpstream) Upstreams() []*Upstream
type WithUpstreams ¶
type WithUpstreams []*WithUpstream
func (WithUpstreams) GetSubjectJobNames ¶
func (w WithUpstreams) GetSubjectJobNames() []Name
func (WithUpstreams) MergeWithResolvedUpstreams ¶
func (w WithUpstreams) MergeWithResolvedUpstreams(resolvedUpstreamsBySubjectJobMap map[Name][]*Upstream) []*WithUpstream
Click to show internal directories.
Click to hide internal directories.