pubsub

package
v0.0.0-...-045890f Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

README

pubsub

import "github.com/go-orion/Orion/utils/pubsub"

Overview

Imported Packages

Index

Package files

pubsub.go

type Config

type Config struct {
    Key                    string
    Project                string
    Enabled                bool
    Timeout                int
    BulkPublishConcurrency int
    Retries                int
}

Config is the config for pubsub

type Service

type Service interface {
    PublishMessage(ctx context.Context, topic string, data []byte, waitSync bool) (*goPubSub.PublishResult, error)
    BulkPublishMessages(ctx context.Context, topic string, data [][]byte, waitSync bool)
    SubscribeMessages(ctx context.Context, subscribe string, subscribeFunction messageQueue.SubscribeFunction) error
    Close()
}

Service is the interface implemented by a pubsub service

func NewPubSubService
func NewPubSubService(config Config) Service

NewPubSubService build and returns an pubsub service handler


Generated by godoc2ghmd

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Key                    string
	Project                string
	Enabled                bool
	Timeout                int
	BulkPublishConcurrency int
	Retries                int
}

Config is the config for pubsub

type Service

type Service interface {
	PublishMessage(ctx context.Context, topic string, data []byte, waitSync bool) (*goPubSub.PublishResult, error)
	BulkPublishMessages(ctx context.Context, topic string, data [][]byte, waitSync bool)
	SubscribeMessages(ctx context.Context, subscribe string, subscribeFunction messageQueue.SubscribeFunction) error
	Close()
}

Service is the interface implemented by a pubsub service

func NewPubSubService

func NewPubSubService(config Config) Service

NewPubSubService build and returns an pubsub service handler

Directories

Path Synopsis
mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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