Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenPubSub ¶
func ListenPubSub(ctx context.Context, db louhi.DB, local bool, project string, g gerrit.GerritInterface, repos []gitiles.GitilesRepo) error
ListenPubSub starts listening for pub/sub events and pushing them into the given DB. Attempts to create the topic if it does not already exist.
Types ¶
type PubSubSender ¶
type PubSubSender struct {
// contains filtered or unexported fields
}
PubSubSender is used for sending pub/sub messages.
func NewPubSubSender ¶
func NewPubSubSender(ctx context.Context, project string) (*PubSubSender, error)
NewPubSubSender returns a pub/sub notification sender. Does not attempt to create the topic.
func (*PubSubSender) Send ¶
func (s *PubSubSender) Send(ctx context.Context, n *louhi.Notification) error
Send sends a pub/sub notification and blocks until the message is sent.
Click to show internal directories.
Click to hide internal directories.