queue

package
v31.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const TaskTypePushEvent = "push-event"

Variables

This section is empty.

Functions

func NewGenerator

func NewGenerator() *uuidGenerator

func NewPubSubSubscriber

func NewPubSubSubscriber(logger lager.Logger, subscription *pubsub.Subscription, processor PubSubProcessor) ifrit.Runner

func NewPushEventProcessor

func NewPushEventProcessor(
	changeFetcher revok.ChangeFetcher,
	verifier crypto.Verifier,
	emitter metrics.Emitter,
) *pushEventProcessor

Types

type Enqueuer

type Enqueuer interface {
	Enqueue(Task) error
}

func NewPubSubEnqueuer

func NewPubSubEnqueuer(logger lager.Logger, topic Topic, signer crypto.Signer) Enqueuer

type Plan

type Plan interface {
	Task(string) Task
}

type PubSubProcessor

type PubSubProcessor interface {
	Process(lager.Logger, *pubsub.Message) (bool, error)
}

type PushEventPlan

type PushEventPlan struct {
	Owner      string `json:"owner"`
	Repository string `json:"repository"`
	From       string `json:"from"`
	To         string `json:"to"`
	Private    bool   `json:"private"`
}

func (PushEventPlan) Task

func (p PushEventPlan) Task(id string) Task

type Task

type Task interface {
	ID() string
	Type() string
	Payload() string
}

type Topic

type Topic interface {
	Publish(context.Context, ...*pubsub.Message) ([]string, error)
}

type UUIDGenerator

type UUIDGenerator interface {
	Generate() string
}

Directories

Path Synopsis
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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