entry

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiffFormatText  = "text"
	DiffFormatYAML  = "yaml"
	DiffFormatJSON  = "json"
	DiffFormatTable = "table"
	// The table format as a markdown pipe table
	DiffFormatMarkdown = "markdown"
)

Variables

View Source
var ErrTooManyFailures = errors.New("too many tiles failed to seed")

Functions

func CheckConfig

func CheckConfig(cfg *config.Config, opts CheckOptions, out io.Writer) error

func DiffConfig

func DiffConfig(oldCfg, newCfg *config.Config, opts DiffOptions, out io.Writer) (bool, error)

func RateLimitList added in v0.14.0

func RateLimitList(cfg *config.Config, opts RateLimitListOptions, out io.Writer) error

Only reads the configuration, so it works with any store

func RateLimitReset added in v0.14.0

func RateLimitReset(cfg *config.Config, opts RateLimitResetOptions, out io.Writer, errOut io.Writer) error

func RateLimitStatus added in v0.14.0

func RateLimitStatus(cfg *config.Config, opts RateLimitStatusOptions, out io.Writer, errOut io.Writer) error

func Seed

func Seed(cfg *config.Config, opts SeedOptions, out io.Writer) error

func Serve

func Serve(cfg *config.Config, opts ServeOptions, out io.Writer) error

Runs until interrupted

func Test

func Test(cfg *config.Config, opts TestOptions, out io.Writer) (uint32, error)

Types

type CheckOptions

type CheckOptions struct {
	Echo bool
}

type DiffOptions

type DiffOptions struct {
	Format string
	// ANSI escapes for the text format. Ignored by every other format
	Color bool
}

type RateLimitListOptions added in v0.14.0

type RateLimitListOptions struct {
	ratelimit.RuleFilter
	JSON bool
}

type RateLimitResetOptions added in v0.14.0

type RateLimitResetOptions struct {
	Rule string
	// A value, possibly empty, for each segment of the rule
	Segments map[string]string
	DryRun   bool
	JSON     bool
}

type RateLimitStatusOptions added in v0.14.0

type RateLimitStatusOptions struct {
	ratelimit.Request
	// As they'd appear in a tile request URL
	LayerNames []string
	// Include rules that aren't blocking
	All  bool
	JSON bool
}

type Reloader

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

Applies hot reloads one at a time, holding any that arrive before the server is ready

func NewReloader

func NewReloader() *Reloader

Pass to a single call of Serve

func (*Reloader) Reload

func (r *Reloader) Reload(cfg *config.Config) error

Applies cfg as a file change. Before the server is ready only the latest cfg is kept

type SeedOptions

type SeedOptions struct {
	Zoom         []uint
	Bounds       pkg.Bounds
	LayerName    string
	Force        bool
	Verbose      bool
	NumThread    uint16
	ProgressFile string
	CacheName    string
	MaxFailures  uint64
	Purge        bool
	UserID       string
	TenantID     string
}

type ServeOptions

type ServeOptions struct {
	// Rereads the configuration from its original source
	ReloadConfig func() (config.Config, error)
	// Created when nil
	Reloader *Reloader
}

type TestFailure

type TestFailure struct {
	LayerName string `json:"layer"`
	Error     string `json:"error"`
}

type TestOptions

type TestOptions struct {
	LayerNames     []string
	Z              int
	X              int
	Y              int
	CoordinatesSet bool
	NumThread      uint16
	NoCache        bool
	JSON           bool
	FilePath       string
	UserID         string
	TenantID       string
}

type TestSummary

type TestSummary struct {
	Failures []TestFailure `json:"failures"`
	Tested   int           `json:"tested"`
	Failed   int           `json:"failed"`
}

Jump to

Keyboard shortcuts

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