Skip to content

Commit

Permalink
Added changelog and some docs (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
roblaszczak authored Sep 16, 2019
1 parent 03ab332 commit 537c1e0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ for building event driven applications, enabling event sourcing, RPC over messag
sagas and basically whatever else comes to your mind. You can use conventional pub/sub
implementations like Kafka or RabbitMQ, but also HTTP or MySQL binlog if that fits your use case.

**Note:** This is README file is created for `master`. You may want to check README [for release v0.4.0.](https://github.com/ThreeDotsLabs/watermill/tree/v0.4.0#watermill)

Documentation: https://watermill.io/

Getting started guide: https://watermill.io/docs/getting-started/
Expand Down Expand Up @@ -89,12 +87,23 @@ All contributions are very much welcome. If you'd like to help with Watermill de
please see [open issues](https://github.com/ThreeDotsLabs/watermill/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+)
and submit your pull request via GitHub.

## Stability

Watermill v1.0.0 has been released and is production-ready. The public API is stable and will not change without changing the major version.

To ensure that all Pub/Subs are stable and safe to use in production, we created a [set of tests](https://github.com/ThreeDotsLabs/watermill/blob/master/pubsub/tests/test_pubsub.go#L34) that need to pass for each of the implementations before merging to master.
All tests are also executed in [*stress*](https://github.com/ThreeDotsLabs/watermill/blob/master/pubsub/tests/test_pubsub.go#L171) mode - that means that we are running all the tests **20x** in parallel.

All tests are run with the race condition detector enabled (`-race` flag in tests).

## Support

If you didn't find the answer to your question in [the documentation](https://watermill.io/), feel free to ask us directly!

Please join us on the `#watermill` channel on the [Gophers slack](https://gophers.slack.com/): You can get an invite [here](https://gophersinvite.herokuapp.com/).

Every bit of feedback is very welcome and appreciated. Please submit it using [the survey](https://www.surveymonkey.com/r/WZXD392).

## Why the name?

It processes streams!
Expand Down
22 changes: 20 additions & 2 deletions UPGRADE-1.0.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# TODO
# Upgrade instructions from v0.4.X

Migrating Pub/Subs
In v1.0.0 we introduced a couple of breaking changes, to keep a stable API until version v2.

## Migrating Pub/Subs

All Pub/Subs (excluding go-channel implementation) were moved to separated repositories.
You can replace all import paths, with provided `sed`:

find . -type f -iname '*.go' -exec sed -i -E "s/github\.com\/ThreeDotsLabs\/watermill\/message\/infrastructure\/(amqp|googlecloud|http|io|kafka|nats|sql)/github.com\/ThreeDotsLabs\/watermill-\1\/pkg\/\1/" "{}" +;
find . -type f -iname '*.go' -exec sed -i -E "s/github\.com\/ThreeDotsLabs\/watermill\/message\/infrastructure\/gochannel/github\.com\/ThreeDotsLabs\/watermill\/pubsub\/gochannel/" "{}" +;

# Breaking changes
- `message.PubSub` interface was removed
- `message.NewPubSub` constructor was removed
- `message.NoPublishHandlerFunc` is now passed to `message.Router.AddNoPublisherHandler`, instead of `message.HandlerFunc`.
- `message.Router.Run` now requires `context.Context` in parameter
- `PrometheusMetricsBuilder.DecoratePubSub` was removed (because of `message.PubSub` interface removal)
- `cars.ObjectName` was renamed to `cqrs.FullyQualifiedStructName`
- `github.com/ThreeDotsLabs/watermill/message/infrastructure/gochannel` was moved to `github.com/ThreeDotsLabs/watermill/pubsub/gochannel`
- `middleware.Retry` configuration parameters have been renamed
- Universal Pub/Sub tests have been moved from `github.com/ThreeDotsLabs/watermill/message/infrastructure` to `github.com/ThreeDotsLabs/watermill/pubsub/tests`
- All universal tests require now `TestContext`.
- Removed `context` from `googlecloud.NewPublisher`
2 changes: 2 additions & 0 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func (l LogFields) Copy() LogFields {
return cpy
}

// LoggerAdapter is an interface, that you need to implement to support Watermill logging.
// You can use StdLoggerAdapter as a reference implementation.
type LoggerAdapter interface {
Error(msg string, err error, fields LogFields)
Info(msg string, fields LogFields)
Expand Down

0 comments on commit 537c1e0

Please sign in to comment.