server

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package server implements a web application for serving Protomaps tiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFlagSet

func DefaultFlagSet() *flag.FlagSet

DefaultFlagSet returns a `flag.FlagSet` instance configured with the default flags necessary for the server application.

func Run

func Run(ctx context.Context, logger *log.Logger) error

RunWithFlagSet runs the server application using a default flagset.

func RunWithFlagSet

func RunWithFlagSet(ctx context.Context, fs *flag.FlagSet, logger *log.Logger) error

RunWithFlagSet runs the server application using flags derived from 'fs'.

func RunWithOptions added in v1.2.0

func RunWithOptions(ctx context.Context, opts *RunOptions) error

Types

type RunOptions added in v1.2.0

type RunOptions struct {
	ServerURI string
	Logger    *log.Logger

	EnableCORS           bool
	CORSOrigins          []string
	CORSAllowCredentials bool
	CORSDebug            bool

	EnableExample    bool
	ExampleDatabase  string
	ExampleLatitude  float64
	ExampleLongitude float64
	ExampleZoom      int

	PMTilesURI         string
	PMTilesFS          fs.FS
	PMTilesPrefix      string
	PMTilesCacheSize   int
	PMTilesHostname    string
	PMTilesStripPrefix string
}

func RunOptionsWithFlagSet added in v1.2.0

func RunOptionsWithFlagSet(fs *flag.FlagSet, logger *log.Logger) (*RunOptions, error)

Jump to

Keyboard shortcuts

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