server

package
v0.0.0-...-1cdf2d7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 36

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