Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding configs and pubsub implementations for GCP plus additional context endpoints and service types #61

Merged
merged 29 commits into from
Jun 13, 2016

Conversation

jprobinson
Copy link
Contributor

This PR brings in some new types and tools for working with Google Cloud Platform:

  • config/GCP: A helper config for working with Project IDs and contexts across development, App Engine, GCE and GKE
  • config/PubSub: A helper config that is composed of a config.GCP and holds topics and subscription values.
  • pubsub/GCPSubscriber: A pubsub implementation for subscribing to messages via GCP pubsub.
  • pubsub/GCPPublisher: A pubsub implementation for publishing messages to GCP pubsub.
  • server/JSONContextEndpoint: A new JSONEndpoint-like handler to work with context.Context
  • server/JSONContextService: A new Service implementation composed of JSONContextEndpoints that can register with a SimpleServer.
  • server/MixedContextService: A new Service implementation composed of JSONContextEndpoints and ContextHandlers that can register with a SimpleServer.

There is ONE major breaking change in this PR. The pubsub/Publisher interface now expects a context.Context value passed to the Publish methods:

+   // Publish will publish a message with context.
+   Publish(context.Context, string, proto.Message) error
+   // Publish will publish a raw byte array as a message with context.
+   PublishRaw(context.Context, string, []byte) error

The context object is currently being used by the GCP implementations, but is ignored by AWS and Kafka.

@coveralls
Copy link

coveralls commented Jun 10, 2016

Coverage Status

Coverage decreased (-1.02%) to 44.947% when pulling d0b6b12 on gcp-pubsub into 53c5ab2 on master.

@coveralls
Copy link

coveralls commented Jun 10, 2016

Coverage Status

Coverage decreased (-1.06%) to 44.91% when pulling 489f10d on gcp-pubsub into 53c5ab2 on master.

@coveralls
Copy link

coveralls commented Jun 13, 2016

Coverage Status

Coverage decreased (-1.06%) to 44.91% when pulling 7d617b7 on gcp-pubsub into 53c5ab2 on master.

@jprobinson jprobinson merged commit 46437ab into master Jun 13, 2016
@jprobinson jprobinson deleted the gcp-pubsub branch June 13, 2016 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants