Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Side by Side Diff: client/internal/logdog/butler/bundler/doc.go

Issue 1412063008: logdog: Add bundler library. (Closed) Base URL: https://github.com/luci/luci-go@logdog-review-streamserver
Patch Set: Enhanced doc.go. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Package bundler is responsible for efficiently transforming aggregate stream
6 // data into Butler messages for export.
7 //
8 // A process will instantiate a single Bundler instance. The Bundler manages an
9 // elastic set of Stream instances, each of which containts state for a single
estaab 2015/11/13 04:02:47 contains
dnj 2015/11/14 00:30:36 Done.
10 // log Stream.
11 //
12 // Each Stream instance will have sequential stream binary data appended to it
13 // via Append, which it will collect and organize for export as a series of
14 // ButlerLogBundle_Entry protobufs. Streams operate independently and buffer
15 // data until it is consumed by their Bundler instance. If a Stream's buffer is
16 // full, the Stream will block on appending data, whih will, in turn, block its
estaab 2015/11/13 04:02:47 which
dnj 2015/11/14 00:30:36 Done.
17 // data source.
18 //
19 // The Bundler owns the various Stream instances. When its Next() method is
20 // called, it will sort through the stream instances to prepare an
21 // optimally-sized ButlerLogBundle protobuf for export. The construction of this
22 // bundle may block pending data, and may be subject to various data urgency
23 // requests.
24 //
25 // The Bundler acknowledges the following constraints:
26 // - Data enqueued into a Stream should be exported within a specific period
27 // of time from its introduction
28 // - The exported ButlerLogBundle protobuf must not exceed a maximum bundle
29 // size constraint.
30 // - Stream data may be added during the bundling process, and should be
31 // acknowleged if possible.
32 //
33 // When a Stream is finished, its Close method should be called. This alerts the
34 // Stream that it will receive no more data, causing it to export a terminal
35 // ButlerLogBundle and unregister from the Bundler.
36 //
37 // The Bundler may block via its CloseAndFinish() method until all Streams are
38 // drained and cleared.
39 package bundler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698