| Index: logdog/appengine/coordinator/archivalPublisher.go
|
| diff --git a/logdog/appengine/coordinator/archivalPublisher.go b/logdog/appengine/coordinator/archivalPublisher.go
|
| index 68b5343ed4396ab6fb68486963bb57d0a96d2a48..fd17b34a8b37f5ada8b9c3b114186c87c9e0ef34 100644
|
| --- a/logdog/appengine/coordinator/archivalPublisher.go
|
| +++ b/logdog/appengine/coordinator/archivalPublisher.go
|
| @@ -17,6 +17,9 @@ import (
|
|
|
| // ArchivalPublisher is capable of publishing archival requests.
|
| type ArchivalPublisher interface {
|
| + // Close shutdowns this publisher, releasing all its resources.
|
| + Close() error
|
| +
|
| // Publish publishes the supplied ArchiveTask.
|
| Publish(context.Context, *logdog.ArchiveTask) error
|
|
|
| @@ -26,6 +29,9 @@ type ArchivalPublisher interface {
|
| }
|
|
|
| type pubsubArchivalPublisher struct {
|
| + // client is Pub/Sub client used by the publisher.
|
| + client *gcps.Client
|
| +
|
| // topic is the authenticated Pub/Sub topic handle to publish to.
|
| topic *gcps.Topic
|
|
|
| @@ -34,6 +40,10 @@ type pubsubArchivalPublisher struct {
|
| publishIndexFunc func() uint64
|
| }
|
|
|
| +func (p *pubsubArchivalPublisher) Close() error {
|
| + return p.client.Close()
|
| +}
|
| +
|
| func (p *pubsubArchivalPublisher) Publish(c context.Context, t *logdog.ArchiveTask) error {
|
| d, err := proto.Marshal(t)
|
| if err != nil {
|
|
|