Documentation ¶
Index ¶
- Variables
- func Days(days int) time.Duration
- func NewInformer(interval, resyncInterval, maxAge time.Duration, initialLister JobLister, ...) cache.SharedIndexInformer
- func ReadBuild(inputBuild Build, acc Accumulator) error
- type Accumulator
- type Build
- type Builds
- type CachingLister
- type Client
- type DiskStore
- type Index
- type Job
- type JobAccessor
- type JobList
- type JobLister
- type JobSpec
- type JobStats
- type JobStatus
- type ListWatcher
- type Lister
- type ListerFunc
- type LogAccumulator
- func (a *LogAccumulator) AddMetadata(ctx context.Context, started *gcs.Started, finished *gcs.Finished) (ok bool, err error)
- func (a *LogAccumulator) AddSuites(ctx context.Context, suites junit.Suites)
- func (a *LogAccumulator) Artifacts(ctx context.Context, artifacts <-chan *storage.ObjectAttrs, ...) error
- func (a *LogAccumulator) Finished(ctx context.Context)
- func (a *LogAccumulator) LastUpdate() int64
- func (a *LogAccumulator) MarkCompleted(at time.Time) error
- func (a *LogAccumulator) Started() int64
- type PathNotifier
- type Summarizer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSkip = fmt.Errorf("skip index data") ErrStop = fmt.Errorf("stop index scan") )
Functions ¶
func NewInformer ¶
func ReadBuild ¶
func ReadBuild(inputBuild Build, acc Accumulator) error
ReadBuild asynchronously downloads the files in build from gcs and convert them into a build.
Types ¶
type Accumulator ¶
type Accumulator interface { Artifacts(context.Context, <-chan *storage.ObjectAttrs, chan<- *storage.ObjectAttrs) error AddSuites(context.Context, junit.Suites) AddMetadata(context.Context, *gcs.Started, *gcs.Finished) (ok bool, err error) Finished(context.Context) Started() int64 // LastUpdate is the finished or started date. LastUpdate() int64 }
type CachingLister ¶
type CachingLister struct { Lister JobLister // contains filtered or unexported fields }
type DiskStore ¶
type DiskStore struct {
// contains filtered or unexported fields
}
func NewDiskStore ¶
func (*DiskStore) Handler ¶
func (s *DiskStore) Handler() cache.ResourceEventHandler
func (*DiskStore) Run ¶
func (s *DiskStore) Run(ctx context.Context, accessor JobAccessor, notifier PathNotifier, disableWrite bool, workers int)
type Job ¶
type Job struct { metav1.TypeMeta metav1.ObjectMeta `json:"metadata"` Spec JobSpec `json:"spec"` Status JobStatus `json:"status"` }
func ReadFromIndex ¶
func ReadFromIndex(ctx context.Context, client *storage.Client, bucket, indexName string, maxAge time.Duration, statusURL url.URL) ([]*Job, error)
ReadFromIndex reads jobs from the named GCS bucket index (managed by a cloud function that watches for finished jobs) and returns them. Jobs older than maxAge are not loaded. statusURL will form the status URL for a given job if the job's link attribute in the index can be parsed.
func (Job) DeepCopyObject ¶
type JobAccessor ¶
type JobAccessor interface { Get(name string) (*Job, error) List(labels.Selector) ([]*Job, error) JobStats(name string, names sets.String, from, to time.Time) JobStats }
var Empty JobAccessor = emptyJobAccessor{}
type JobList ¶
func (*JobList) DeepCopyObject ¶
type ListWatcher ¶
type ListWatcher struct {
// contains filtered or unexported fields
}
func (*ListWatcher) List ¶
func (lw *ListWatcher) List(options metav1.ListOptions) (runtime.Object, error)
func (*ListWatcher) Watch ¶
func (lw *ListWatcher) Watch(options metav1.ListOptions) (watch.Interface, error)
type Lister ¶
type Lister struct {
// contains filtered or unexported fields
}
type ListerFunc ¶
type LogAccumulator ¶
type LogAccumulator struct {
// contains filtered or unexported fields
}
func NewAccumulator ¶
func (*LogAccumulator) AddMetadata ¶
func (*LogAccumulator) AddSuites ¶
func (a *LogAccumulator) AddSuites(ctx context.Context, suites junit.Suites)
func (*LogAccumulator) Artifacts ¶
func (a *LogAccumulator) Artifacts(ctx context.Context, artifacts <-chan *storage.ObjectAttrs, unprocessedArtifacts chan<- *storage.ObjectAttrs) error
func (*LogAccumulator) Finished ¶
func (a *LogAccumulator) Finished(ctx context.Context)
func (*LogAccumulator) LastUpdate ¶
func (a *LogAccumulator) LastUpdate() int64
func (*LogAccumulator) MarkCompleted ¶
func (a *LogAccumulator) MarkCompleted(at time.Time) error
func (*LogAccumulator) Started ¶
func (a *LogAccumulator) Started() int64
type PathNotifier ¶
type PathNotifier interface {
Notify(paths []string)
}
type Summarizer ¶
type Summarizer interface {
New(*gcs.Build) Accumulator
}
Click to show internal directories.
Click to hide internal directories.