queue

package
v81.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2017 License: Apache-2.0 Imports: 18 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,
	emitter metrics.Emitter,
) ifrit.Runner

func NewPushEventProcessor

func NewPushEventProcessor(
	changeFetcher revok.ChangeFetcher,
	emitter metrics.Emitter,
	clock clock.Clock,
	traceClient *trace.Client,
) *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(context.Context, *pubsub.Message) (bool, error)
}

func NewSignatureCheck

func NewSignatureCheck(verify crypto.Verifier, emitter metrics.Emitter, processor PubSubProcessor) PubSubProcessor

type PushEventPlan

type PushEventPlan struct {
	Owner      string    `json:"owner"`
	Repository string    `json:"repository"`
	PushTime   time.Time `json:"pushTime"`
}

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) *pubsub.PublishResult
}

type UUIDGenerator

type UUIDGenerator interface {
	Generate() string
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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