sse

package
v0.0.0-...-ad2a216 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

README

Server-Sent Events

Configuration

Dot path Type Required/Default Description
sse.port int No, 38208 The port on which the remote writer process listens. Used by the writer to setup a listener and used by the reader to read messages from.
sse.remote-writer-addr string No, localhost The IP address of the remote writer process. Used by the reader process only.
Example JSON Configuration
{
    "additional": {
        "sse": {
            "port": 38208,
            "remote-writer-addr": 127.0.0.1
        }
    }
}
Example CLI
netspel ... \
    --config-int    .sse.port=38208 \
    --config-string .sse.remote-writer-addr=127.0.0.1

Documentation

Index

Constants

View Source
const (
	Port             = prefix + "port"
	RemoteWriterAddr = prefix + "remote-writer-addr"

	DefaultPort             = 38208
	DefaultRemoteWriterAddr = "localhost"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Init

func (r *Reader) Init(config jsonstruct.JSONStruct) error

func (*Reader) Read

func (r *Reader) Read(message []byte) (int, error)

type Writer

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

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) Init

func (w *Writer) Init(config jsonstruct.JSONStruct) error

func (*Writer) Write

func (w *Writer) Write(message []byte) (int, error)

Jump to

Keyboard shortcuts

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