| OLD | NEW |
| (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 streamserver |
| 6 |
| 7 import ( |
| 8 "io" |
| 9 |
| 10 "github.com/luci/luci-go/client/logdog/butlerlib/streamproto" |
| 11 ) |
| 12 |
| 13 // StreamServer is an interface to a backgound service that allows external |
| 14 // processes to establish Butler streams. |
| 15 type StreamServer interface { |
| 16 // Performs initial connection and setup, entering a listening state. |
| 17 Listen() error |
| 18 // Blocks, returning a new Stream when one is available. If the stream s
erver |
| 19 // has closed, this will return nil. |
| 20 Next() (io.ReadCloser, *streamproto.Properties) |
| 21 // Closes the stream server, cleaning up resources. |
| 22 Close() |
| 23 } |
| OLD | NEW |