server

package
v0.0.0-...-b3f3fbb Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2015 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Overview

Package server provides a (HTTP) server runtime for paymentd

Index

Constants

This section is empty.

Variables

Wait is a global WaitGroup for the Server(s). During Shutdown() of the server(s) the final close will wait for the waitgroup to be resolved or for a set timeout.

Functions

This section is empty.

Types

type Server

type Server struct {
	Cancel context.CancelFunc
	// contains filtered or unexported fields
}

Server is a paymentd server

func NewServer

func NewServer(ctx context.Context) *Server

NewServer creates a new paymentd server for the given config

func (*Server) RegisterService

func (s *Server) RegisterService(cfg config.ServiceConfig, handler http.Handler) error

RegisterService adds a service to the server It will serve the HTTP with the given service

func (*Server) Serve

func (s *Server) Serve() error

Serve starts serving

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown starts the server's shutdown mode

It will cancel all server child contexts, disable Keepalive on all servers

Jump to

Keyboard shortcuts

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