server

package
v0.0.0-...-df04a74 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package server contains utility functions for Seesaw v2 server components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RPCAccept

func RPCAccept(ln net.Listener, server *rpc.Server) error

RPCAccept accepts connections on the listener and dispatches them to the RPC server for service. Unfortunately the native Go rpc.Accept function fatals on any accept error, including temporary failures and closure of the listener.

func RemoveUnixSocket

func RemoveUnixSocket(socket string) error

RemoveUnixSocket checks to see if the given socket already exists and removes it if nothing responds to connections.

func ServerRunDirectory

func ServerRunDirectory(server string, owner, group int) error

ServerRunDirectory ensures that the run directory exists and has the appropriate ownership and permissions.

func ShutdownHandler

func ShutdownHandler(server Shutdowner)

ShutdownHandler configures signal handling and initiates a shutdown if a SIGINT, SIGQUIT or SIGTERM is received by the process.

Types

type Shutdowner

type Shutdowner interface {
	Shutdown()
}

Shutdowner is an interface for a server that can be shutdown.

Jump to

Keyboard shortcuts

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