server

package
v0.0.0-...-eee2b2e Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConcurrentServer

func NewConcurrentServer(poolSize int, fetcher fetcher.Fetcher, storage storage.Storage) http.Handler

NewConcurrentServer constructor.

func NewServer

func NewServer(fetcher fetcher.Fetcher, storage storage.Storage) http.Handler

NewServer constructor.

Types

type ConcurrentServer

type ConcurrentServer struct {
	// contains filtered or unexported fields
}

ConcurrentServer data

func (*ConcurrentServer) Close

func (s *ConcurrentServer) Close()

Close task channel to inform worker goroutines.

func (*ConcurrentServer) ServeHTTP

func (s *ConcurrentServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implementation for external handler.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server holds data for application logic

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implementation for external handler.

Jump to

Keyboard shortcuts

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