googlepubsub

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterOptions

type AdapterOptions struct {
	RedisClient *redis.RedisClient
}

type Config

type Config struct {
	// start from path project
	AuthJsonPath string
	ProjectId    string
	Strategy     []Strategy
}

type GooglePubSub

type GooglePubSub struct {
	Cfg Config
}

func NewGooglePubSub

func NewGooglePubSub(projectId string, authJsonPath string) *GooglePubSub

func (*GooglePubSub) Strategy

func (g *GooglePubSub) Strategy(model interface{}) *GooglePubSub

the strategy is optional, if you cant validate topic and subcription before setup client in your project

type GooglePubSubAdapter

type GooglePubSubAdapter struct {
	Broker  *GooglePubSub
	Options *AdapterOptions
}

func (*GooglePubSubAdapter) Init

func (ga *GooglePubSubAdapter) Init() error

func (*GooglePubSubAdapter) Publish

func (*GooglePubSubAdapter) Subscribe

type PublishMessage

type PublishMessage struct {
	TopicName             string
	Message               string
	EnableMessageOrdering bool
	OrderingKey           string
}

type Strategy

type Strategy struct {
	TopicName         string
	SubscriptionNames []string
}

Jump to

Keyboard shortcuts

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