deferrals

package
v0.0.0-...-7d5e071 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeferralService

type DeferralService interface {
	// Defer puts a build onto the deferred list.
	Defer(v1.UserBuildEvent) error

	// List lists and dedupes the deferred builds.  Used for presentation in a frontend UI.
	List() ([]v1.UserBuildEvent, error)

	// Poll reads and dedups the list of deferred builds, clears the list from backing store and returns the list to the caller.  Called for
	// purposes of relaunching builds.
	Poll() ([]v1.UserBuildEvent, error)

	// Remove removes a build by ID from the deferred list.
	Remove(id string) error
}

DeferralService models how builds are deferred and relaunched later.

func NewDefault

func NewDefault(log *log.Logger) DeferralService

NewDefault is the constructor for a DeferralService maintained in memory.

type InMemoryDeferralService

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

InMemoryDeferralService is the working network deferral service.

func (*InMemoryDeferralService) Defer

Defer puts a build onto the deferred list.

func (*InMemoryDeferralService) List

List lists and dedupes the deferred builds. Used for presentation in a frontend UI.

func (*InMemoryDeferralService) Poll

Poll reads and dedups the list of deferred builds, clears the list from backing store and returns the list to the caller. Called for purposes of relaunching builds.

func (*InMemoryDeferralService) Remove

func (t *InMemoryDeferralService) Remove(id string) error

Remove removes a build by ID from the deferred list.

Jump to

Keyboard shortcuts

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