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

Unified Diff: client/internal/logdog/butler/streamserver/streamserver.go

Issue 1429993002: LogDog: Add Butler stream server package. (Closed) Base URL: https://github.com/luci/luci-go@logdog-review-butlerproto
Patch Set: Bind POSIX test to POSIX domains. 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 side-by-side diff with in-line comments
Download patch
Index: client/internal/logdog/butler/streamserver/streamserver.go
diff --git a/client/internal/logdog/butler/streamserver/streamserver.go b/client/internal/logdog/butler/streamserver/streamserver.go
new file mode 100644
index 0000000000000000000000000000000000000000..137932f34c8ced6351afa88aff4704ed771a169d
--- /dev/null
+++ b/client/internal/logdog/butler/streamserver/streamserver.go
@@ -0,0 +1,23 @@
+// Copyright 2015 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 streamserver
+
+import (
+ "io"
+
+ "github.com/luci/luci-go/client/logdog/butlerlib/streamproto"
+)
+
+// StreamServer is an interface to a backgound service that allows external
+// processes to establish Butler streams.
+type StreamServer interface {
+ // Performs initial connection and setup, entering a listening state.
+ Listen() error
+ // Blocks, returning a new Stream when one is available. If the stream server
+ // has closed, this will return nil.
+ Next() (io.ReadCloser, *streamproto.Properties)
+ // Closes the stream server, cleaning up resources.
+ Close()
+}
« no previous file with comments | « client/internal/logdog/butler/streamserver/namedPipe_windows.go ('k') | client/logdog/butlerlib/streamclient/client.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698