service

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delivery

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

Delivery is a implementation of hammer.DeliveryService

func NewDelivery

func NewDelivery(deliveryRepo hammer.DeliveryRepository, deliveryAttemptRepo hammer.DeliveryAttemptRepository, txFactoryRepo hammer.TxFactoryRepository) Delivery

NewDelivery returns a new Delivery with DeliveryRepo

func (*Delivery) Dispatch

func (d *Delivery) Dispatch(delivery *hammer.Delivery, httpClient *http.Client) (hammer.DeliveryAttempt, error)

Dispatch message to destination

func (*Delivery) Find

func (d *Delivery) Find(id string) (hammer.Delivery, error)

Find returns hammer.Delivery by id

func (*Delivery) FindAll

func (d *Delivery) FindAll(findOptions hammer.FindOptions) ([]hammer.Delivery, error)

FindAll returns []hammer.Delivery by findOptions

func (*Delivery) FindToDispatch

func (d *Delivery) FindToDispatch(limit, offset int) ([]string, error)

FindToDispatch returns []string ready to dispatch by limit and offset

type DeliveryAttempt

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

DeliveryAttempt is a implementation of hammer.DeliveryAttemptService

func NewDeliveryAttempt

func NewDeliveryAttempt(deliveryAttemptRepo hammer.DeliveryAttemptRepository) DeliveryAttempt

NewDeliveryAttempt returns a new DeliveryAttempt with DeliveryAttemptRepo

func (*DeliveryAttempt) Find

Find returns hammer.DeliveryAttempt by id

func (*DeliveryAttempt) FindAll

func (d *DeliveryAttempt) FindAll(findOptions hammer.FindOptions) ([]hammer.DeliveryAttempt, error)

FindAll returns []hammer.DeliveryAttempt by findOptions

type Message

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

Message is a implementation of hammer.MessageService

func NewMessage

func NewMessage(topicRepo hammer.TopicRepository, messageRepo hammer.MessageRepository, subscriptionRepo hammer.SubscriptionRepository, deliveryRepo hammer.DeliveryRepository, txFactoryRepo hammer.TxFactoryRepository) Message

NewMessage returns a new Message with MessageRepo

func (*Message) Create

func (m *Message) Create(message *hammer.Message) error

Create a hammer.Message on repository

func (*Message) Delete

func (m *Message) Delete(id string) error

Delete a hammer.Message on repository

func (*Message) Find

func (m *Message) Find(id string) (hammer.Message, error)

Find returns hammer.Message by id

func (*Message) FindAll

func (m *Message) FindAll(findOptions hammer.FindOptions) ([]hammer.Message, error)

FindAll returns []hammer.Message by findOptions

type Migration

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

Migration is a implementation of hammer.MigrationService

func NewMigration

func NewMigration(migrationService hammer.MigrationService) Migration

NewMigration will create a implementation of hammer.MigrationService

func (*Migration) Run

func (m *Migration) Run() error

Run migrations

type Subscription

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

Subscription is a implementation of hammer.SubscriptionService

func NewSubscription

func NewSubscription(topicRepo hammer.TopicRepository, subscriptionRepo hammer.SubscriptionRepository, txFactoryRepo hammer.TxFactoryRepository) Subscription

NewSubscription returns a new Subscription with SubscriptionRepo

func (*Subscription) Create

func (s *Subscription) Create(subscription *hammer.Subscription) error

Create a hammer.Subscription on repository

func (*Subscription) Delete

func (s *Subscription) Delete(id string) error

Delete a hammer.Subscription on repository

func (*Subscription) Find

func (s *Subscription) Find(id string) (hammer.Subscription, error)

Find returns hammer.Subscription by id

func (*Subscription) FindAll

func (s *Subscription) FindAll(findOptions hammer.FindOptions) ([]hammer.Subscription, error)

FindAll returns []hammer.Subscription by findOptions

func (*Subscription) Update

func (s *Subscription) Update(subscription *hammer.Subscription) error

Update a hammer.Subscription on repository

type Topic

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

Topic is a implementation of hammer.TopicService

func NewTopic

func NewTopic(topicRepo hammer.TopicRepository, txFactoryRepo hammer.TxFactoryRepository) Topic

NewTopic returns a new Topic with topicRepo

func (*Topic) Create

func (t *Topic) Create(topic *hammer.Topic) error

Create a hammer.Topic on repository

func (*Topic) Delete

func (t *Topic) Delete(id string) error

Delete a hammer.Topic on repository

func (*Topic) Find

func (t *Topic) Find(id string) (hammer.Topic, error)

Find returns hammer.Topic by id

func (*Topic) FindAll

func (t *Topic) FindAll(findOptions hammer.FindOptions) ([]hammer.Topic, error)

FindAll returns []hammer.Topic by limit and offset

func (*Topic) Update

func (t *Topic) Update(topic *hammer.Topic) error

Update a hammer.Topic on repository

type Worker

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

Worker is a implementation of hammer.WorkerService

func NewWorker

func NewWorker(lock pglock.Locker, deliveryService hammer.DeliveryService) Worker

NewWorker returns a new Worker

func (*Worker) Run

func (w *Worker) Run() error

Run worker flow

func (*Worker) Stop

func (w *Worker) Stop() error

Stop worker flow

Jump to

Keyboard shortcuts

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