streamserver

package
v0.0.0-...-35d8de9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StreamServer

type StreamServer struct {
	// contains filtered or unexported fields
}

StreamServer implements a Logdog Butler listener.

This holds a named pipe listener (either a unix domain socket or windows Named Pipe, depending on the platform). Local processes on the machine may connect to this named pipe to stream data to Logdog.

func New

func New(ctx context.Context, path string) (*StreamServer, error)

New creates a new StreamServer.

This has a platform-specific implementation.

On Mac/Linux, this makes a Unix Domain Socket based server, and `path` is required to be the absolute path to a filesystem location which is suitable for a domain socket. The location will be removed prior to, and after, use.

On Windows, this makes a Named Pipe based server. `path` must be a valid UNC path component, and will be used to listen on the named pipe "\\.\$path.$PID.$UNIQUE" where $PID is the process id of the current process and $UNIQUE is a monotonically increasing value within this process' memory.

`path` may be empty and a unique name will be chosen for you.

func (*StreamServer) Address

func (s *StreamServer) Address() string

Address returns a string that can be used by the "streamclient" package to return a client for this StreamServer.

Full package is: go.chromium.org/luci/logdog/butlerlib/streamclient

func (*StreamServer) Close

func (s *StreamServer) Close()

Close terminates the stream server, cleaning up resources.

func (*StreamServer) Listen

func (s *StreamServer) Listen() error

Listen performs initial connection and setup and runs a goroutine to listen for new connections.

func (*StreamServer) Next

Next blocks, returning a new Stream when one is available. If the stream server has closed, this will return nil.

func (*StreamServer) String

func (s *StreamServer) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL