pubsub

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_CLIENT_INSTANCE     = "pubsub_connection : failed to get the pubsub client"
	ERROR_PUB_CLIENT_INSTANCE = "pubsub_topic_connection : failed to get the pubsub topic client"
	ERROR_SUB_CLIENT_INSTANCE = "pubsub_subscription_connection : failed to get the pubsub subscription client"
)

Variables

This section is empty.

Functions

func CloseAllSubscriberClientsByPubsubClientId

func CloseAllSubscriberClientsByPubsubClientId(temp *PubsubClientId)

func CloseAllTopicClientsByPubsubClientId

func CloseAllTopicClientsByPubsubClientId(temp *PubsubClientId)

func ClosePubsubClient

func ClosePubsubClient(temp *PubsubClientId)

ClosePubsubClient used to close the pubsub client instance

func CloseSubscriptionClient

func CloseSubscriptionClient(temp *SubscriberId)

func CloseTopicClient

func CloseTopicClient(temp *PublisherId)

func CreatePubsubClient

func CreatePubsubClient(temp *PubsubClient)

CreatePubsubClient used to create a new Pubsub Client connection

func CreateSubscriptionClient

func CreateSubscriptionClient(temp *Subscriber)

func CreateTopicClient

func CreateTopicClient(temp *Publisher)

func GetPubsubClient

func GetPubsubClient(temp *PubsubClientId) (*pubsub.Client, error)

GetPubsubClient used to get the pubsub client connection id

func GetSubscriptionClient

func GetSubscriptionClient(temp *SubscriberId) (*pubsub.Subscription, error)

func GetTopicClient

func GetTopicClient(temp *PublisherId) (*pubsub.Topic, error)

Types

type PubConf

type PubConf struct {
	PubsubClientId *PubsubClientId
	TopicId        string
}

type Publisher

type Publisher struct {
	Id   *PublisherId
	Once *sync.Once
	Conf *PubConf

	Err *error
	// contains filtered or unexported fields
}

type PublisherId

type PublisherId struct {
	Id string
}

type Publishers

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

type PubsubClient

type PubsubClient struct {
	Id           *PubsubClientId
	MyContext    *context.Context
	Once         *sync.Once
	GcpProjectId string
	Opts         []option.ClientOption

	Err *error
	// contains filtered or unexported fields
}

type PubsubClientId

type PubsubClientId struct {
	Id string
}

type PubsubClients

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

type Service

type Service struct{}

type SubConf

type SubConf struct {
	PubsubClientId      *PubsubClientId
	TopicSubscriptionId string
}

type Subscriber

type Subscriber struct {
	Id   *SubscriberId
	Once *sync.Once
	Conf *SubConf

	Err *error
	// contains filtered or unexported fields
}

type SubscriberId

type SubscriberId struct {
	Id string
}

type Subscribers

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

Jump to

Keyboard shortcuts

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