| Index: server/internal/logdog/collector/coordinator/doc.go
|
| diff --git a/server/internal/logdog/collector/coordinator/doc.go b/server/internal/logdog/collector/coordinator/doc.go
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..562467183afdcf0163f01050d17433549f6b1800
|
| --- /dev/null
|
| +++ b/server/internal/logdog/collector/coordinator/doc.go
|
| @@ -0,0 +1,24 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// Package coordinator implements a minimal interface to the Coordinator service
|
| +// that is sufficient for Collector usage.
|
| +//
|
| +// The interface also serves as an API abstraction boundary between the current
|
| +// Coordinator service definition and the Collector's logic.
|
| +//
|
| +// Cache
|
| +//
|
| +// Coordinator methods are called very heavily during Collector operation. In
|
| +// production, the Coordinator instance should be wrapped in a Cache structure
|
| +// to locally cache Coordinator's known state.
|
| +//
|
| +// The cache is responsible for two things: Firstly, it coalesces multiple
|
| +// pending requests for the same stream state into a single Coordinator request.
|
| +// Secondly, it maintains a cache of completed responses to short-circuit the
|
| +// Coordinator.
|
| +//
|
| +// Stream state is stored internally as a Promise. This Promise is evaluated by
|
| +// querying the Coordinator. This interface is hidden to callers.
|
| +package coordinator
|
|
|