app

package
v0.0.0-...-abea403 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2014 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Actual application code lives here, for example, arg parsing. This keeps the non-unit-testable 'main' package as small as possible.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(argv []string, exit bool, debug_writer io.Writer)

Types

type PeerWriter

type PeerWriter struct {
	RealWriter io.Writer
	Hostname   string
	Client     Publisher // DEJE client or compatible API
}

Tees a write, so that it is both written to the underlying writer, and to the WAMP network.

func NewPeerWriter

func NewPeerWriter(conf ServerConfig) PeerWriter

func (PeerWriter) GetLogger

func (pw PeerWriter) GetLogger() *log.Logger

func (PeerWriter) Write

func (pw PeerWriter) Write(p []byte) (n int, err error)

type Publisher

type Publisher interface {
	Publish(interface{}) error
}

type ServerConfig

type ServerConfig struct {
	HostAddress string
	DisplayName string
	RootAlias   string

	ErrorWriter io.Writer
}

func Parse

func Parse(argv []string, exit bool) (ServerConfig, error)

Parse a list of arguments into a config struct.

To use ARGV flags, pass nil instead of a real []string.

Jump to

Keyboard shortcuts

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