package
0.0.0-20190220103131-045890faf5e6
Repository: https://github.com/go-orion/orion.git
Documentation: pkg.go.dev

# 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

# Packages

No description provided by the author

# Functions

NewPubSubService build and returns an pubsub service handler.

# Structs

Config is the config for pubsub.

# Interfaces

Service is the interface implemented by a pubsub service.