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 ¶
func (t *InMemoryDeferralService) Defer(event v1.UserBuildEvent) error
Defer puts a build onto the deferred list.
func (*InMemoryDeferralService) List ¶
func (t *InMemoryDeferralService) List() ([]v1.UserBuildEvent, error)
List lists and dedupes the deferred builds. Used for presentation in a frontend UI.
func (*InMemoryDeferralService) Poll ¶
func (t *InMemoryDeferralService) Poll() ([]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.
func (*InMemoryDeferralService) Remove ¶
func (t *InMemoryDeferralService) Remove(id string) error
Remove removes a build by ID from the deferred list.
Click to show internal directories.
Click to hide internal directories.