Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubSubClient ¶
type PubSubClient struct {
// contains filtered or unexported fields
}
func NewPubSubClient ¶
func NewPubSubClient(ctx context.Context, config PubSubConfig) (PubSubClient, error)
NewPubSubClient creates a new client instance and if required creates Topic and subscription
func (PubSubClient) Client ¶
func (ps PubSubClient) Client() *pubsub.Client
func (PubSubClient) Subscription ¶
func (ps PubSubClient) Subscription() *pubsub.Subscription
func (PubSubClient) Topic ¶
func (ps PubSubClient) Topic() *pubsub.Topic
type PubSubConfig ¶
type PubSubConfig struct {
// contains filtered or unexported fields
}
func NewPubSubConfig ¶
func NewPubSubConfig() (PubSubConfig, error)
NewPubSubConfig creates a new PubSubConfig from the environment variables
func (PubSubConfig) Credentials ¶
func (c PubSubConfig) Credentials() string
Credentials returns the GCP credential file location
func (PubSubConfig) DataTopicID ¶
func (c PubSubConfig) DataTopicID() string
DataTopicID returns the GCP pubsub topic
func (PubSubConfig) ProjectID ¶
func (c PubSubConfig) ProjectID() string
ProjectID returns the GCP Project ID
func (PubSubConfig) Subscription ¶
func (c PubSubConfig) Subscription() string
DataTopicID returns the GCP pubsub topic
Click to show internal directories.
Click to hide internal directories.