func SendGCS(ctx context.Context, log logrus.FieldLogger, client Subscriber, projectID, subID string, settings *pubsub.ReceiveSettings, receivers chan<- *Notification) error {
	l := log.WithField("subscription", "pubsub://"+projectID+"/"+subID)
	send := client.Subscribe(projectID, subID, settings)
	l.Trace("Subscribing...")
	return sendToReceivers(ctx, l, send, receivers, realAcker{})
}
SendGCS converts GCS pubsub messages into Notification structs and sends them to receivers.

Connects to the specified subscription with optionally specified settings.
Receives pubsub messages from this subscription and converts it into a Notification struct.
- Nacks any message it cannot parse.
Sends the notification to the receivers channel.
- Nacks messages associated with any unsent Notifications.
- Acks as soon as the Notification is sent.

More info: https://cloud.google.com/storage/docs/pubsub-notifications#overview
package pubsub
import (
	"context"
	"fmt"
	"strconv"
	"time"
	"cloud.google.com/go/pubsub"
	"github.com/GoogleCloudPlatform/testgrid/util/gcs"
	"github.com/sirupsen/logrus"
)
type Subscriber interface {
	Subscribe(projID, subID string, setttings *pubsub.ReceiveSettings) Sender
}
type Client pubsub.Client
func NewClient(client *pubsub.Client) *Client {
	return (*Client)(client)
}
func (c *Client) Subscribe(projID, subID string, settings *pubsub.ReceiveSettings) Sender {
	sub := (*pubsub.Client)(c).SubscriptionInProject(subID, projID)
	if settings != nil {
		sub.ReceiveSettings = *settings
	}
	return sub.Receive
}
type Sender func(sendCtx context.Context, receive func(context.Context, *pubsub.Message)) error
const (
	keyBucket     = "bucketId"
	keyObject     = "objectId"
	keyEvent      = "eventType"
	keyTime       = "eventTime"
	keyGeneration = "objectGeneration"
)
type Event string
const (
	Finalize Event = "OBJECT_FINALIZE"
	Delete   Event = "OBJECT_DELETE"
)
type Notification struct {
	Path       gcs.Path
	Event      Event
	Time       time.Time
	Generation int64
}
func (n Notification) String() string {
	return fmt.Sprintf("%s#%d %s at %s", n.Path, n.Generation, n.Event, n.Time)
}