common

package
v0.0.0-...-51876cf Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2016 License: MPL-2.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// EnvironmentVariablePrefix - the prefix for all nexus related configuration environment variables.
	EnvironmentVariablePrefix = "NEXUS_"

	// RollingRestart - the environment variable to signify a rolling restart
	RollingRestart = EnvironmentVariablePrefix + "ROLLING_RESTART_TRIGGER"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ConfigFile string
	PidFile    string
	NumWorkers int
	ListenIP   string
	ListenPort int

	RollingRestart string
	ReuseFDS       bool

	ListenAddress syscall.Sockaddr
	// contains filtered or unexported fields
}

Config object for base level options

func NewConfig

func NewConfig(log *Logger) (*Config, error)

NewConfig object

type Logger

type Logger struct {
	Info  *log.Logger
	Warn  *log.Logger
	Error *log.Logger
}

Logger type to allow for a single point of logging configuration

func NewLogger

func NewLogger() *Logger

NewLogger creates a new logger based on user config.

type Packet

type Packet struct {
	Data               []byte
	Length             int
	DestinationAddress syscall.Sockaddr
	SourceAddress      syscall.Sockaddr
}

Packet object to represent a packet traversing the system

func NewPacket

func NewPacket(buf []byte, src syscall.Sockaddr, size int) *Packet

NewPacket object

Jump to

Keyboard shortcuts

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