Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPublisher ¶
func NewPublisher(ctx context.Context, projID, topic string, opts ...option.ClientOption) (pubsub.Publisher, error)
NewPublisher will instantiate a new GCP Publisher.
func NewSubscriber ¶
func NewSubscriber(ctx context.Context, projID, subscription string, opts ...option.ClientOption) (pubsub.Subscriber, error)
NewSubscriber will instantiate a new Subscriber that wraps a pubsub.Iterator.
Types ¶
type Config ¶
type Config struct { gcp.Config // For publishing Topic string `envconfig:"GCP_PUBSUB_TOPIC"` // For subscribing Subscription string `envconfig:"GCP_PUBSUB_SUBSCRIPTION"` }
Config holds common credentials and config values for working with GCP PubSub.
func LoadConfigFromEnv ¶
func LoadConfigFromEnv() Config
LoadConfigFromEnv will attempt to load a PubSub config from environment variables.
Click to show internal directories.
Click to hide internal directories.