Fix some typos

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang 2016-12-16 09:31:19 +08:00
parent 22772224e6
commit 3b8eee7522
5 changed files with 8 additions and 8 deletions

View file

@ -4,7 +4,7 @@ import "context"
type topicKey struct{}
// WithTopic returns a context with a new topic set, such that events emmited
// WithTopic returns a context with a new topic set, such that events emitted
// from the resulting context will be marked with the topic.
//
// A topic groups events by the target module they operate on. This is
@ -13,7 +13,7 @@ type topicKey struct{}
// When compacting the journal, we can replace all former log entries with a
// summary data structure that will result in the same state.
//
// By providing a compaction mechansim by topic, we can prune down to a data
// By providing a compaction mechanism by topic, we can prune down to a data
// structure oriented towards a single topic, leaving unrelated messages alone.
func WithTopic(ctx context.Context, topic string) context.Context {
return context.WithValue(ctx, topicKey{}, topic)