server

package
v0.0.0-...-0ec1176 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NUM_LISTINGS_HEADER   = "listings-count" // see SaveListings
	INTERNAL_SERVER_ERROR = "internal server error"

	// strings for logging (to identify what rpc was called)
	MANY_LISTINGS    = "ManyListings"
	FETCH_LISTING    = "FetchListing"
	CULL_LISTING     = "CullListing"
	RETRIEVE_LISTING = "RetrieveListing"
	SAVE_LISTINGS    = "SaveListings"
	UPDATE_LISTINGS  = "UpdateListings"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {

	// maximum # of listings requested in a single request
	MAX_DATABASE_LIMIT int
	// the mongodb skip operation is O(n)... can't have this be too big either
	MAX_DATABASE_SKIP int
	// contains filtered or unexported fields
}

func NewServer

func NewServer(database *database.Connection) (Server, error)

use this to create a new Server object

func (Server) Listen

func (s Server) Listen() error

call this (blocking) function to listen for requests

Jump to

Keyboard shortcuts

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