updater

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package updater handles background refreshes of GitHub data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Party       *triage.Party
	MinRefresh  time.Duration
	MaxRefresh  time.Duration
	PersistFunc PFunc
}

type PFunc

type PFunc = func() error

type Updater

type Updater struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *Updater

func (*Updater) ForceRefresh

func (u *Updater) ForceRefresh(ctx context.Context, id string) *triage.CollectionResult

func (*Updater) Lookup

func (u *Updater) Lookup(ctx context.Context, id string, blocking bool) *triage.CollectionResult

Lookup results for a given metric

func (*Updater) Loop

func (u *Updater) Loop(ctx context.Context) error

Update loop

func (*Updater) Persist

func (u *Updater) Persist() error

Persist saves results to the persistence layer

func (*Updater) RefreshCollection

func (u *Updater) RefreshCollection(ctx context.Context, id string, newerThan time.Time, force bool) (bool, error)

Run a single collection, optionally forcing an update

func (*Updater) RunOnce

func (u *Updater) RunOnce(ctx context.Context, force bool) (bool, error)

Run once, optionally forcing an update

Jump to

Keyboard shortcuts

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