Documentation
¶
Overview ¶
Package internal provides the internal pubsub Connection type.
Index ¶
- Constants
- Variables
- type Connection
- func (c *Connection) DeleteSubscription(ctx context.Context) error
- func (c *Connection) DeleteTopic(ctx context.Context) error
- func (c *Connection) Publish(ctx context.Context, msg *pubsub.Message) (*binding.Message, error)
- func (c *Connection) Receive(ctx context.Context, fn func(context.Context, *pubsub.Message)) error
Constants ¶
View Source
const ( DefaultAckDeadline = 30 * time.Second DefaultRetentionDuration = 25 * time.Hour )
Variables ¶
View Source
var DefaultReceiveSettings = pubsub.ReceiveSettings{ NumGoroutines: 1000, Synchronous: false, }
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// AllowCreateTopic controls if the protocol can create a topic if it does
// not exist.
AllowCreateTopic bool
// AllowCreateSubscription controls if the protocol can create a
// subscription if it does not exist.
AllowCreateSubscription bool
ProjectID string
Client *pubsub.Client
TopicID string
SubscriptionID string
// ReceiveSettings is used to configure Pubsub pull subscription.
ReceiveSettings *pubsub.ReceiveSettings
// AckDeadline is Pub/Sub AckDeadline.
// Default is 30 seconds.
AckDeadline *time.Duration
// RetentionDuration is Pub/Sub RetentionDuration.
// Default is 25 hours.
RetentionDuration *time.Duration
// contains filtered or unexported fields
}
Connection acts as either a pubsub topic or a pubsub subscription .
func (*Connection) DeleteSubscription ¶
func (c *Connection) DeleteSubscription(ctx context.Context) error
DeleteSubscription delete's the connection's subscription
func (*Connection) DeleteTopic ¶
func (c *Connection) DeleteTopic(ctx context.Context) error
DeleteTopic deletes the connection's topic
Click to show internal directories.
Click to hide internal directories.