diglet

package
v0.0.6-a Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package digletss is a diglet tile server

Index

Constants

View Source
const (
	GetTile         string = "get_tile"
	GetRawTile      string = "get_raw_tile"
	GetTileset      string = "get_tileset"
	ListTilesets    string = "list_tilesets"
	SubscribeTile   string = "subscribe_tile"
	UnsubscribeTile string = "unsubscribe_tile"
)

Variables

This section is empty.

Functions

func MBTServer

func MBTServer(mbtPath string, port string) *dig.App

Types

type IoHub

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

func NewHub

func NewHub(tilesets *TilesetIndex) (h *IoHub)

type TileXYZ

type TileXYZ struct {
	Tileset string `json:"tileset"`
	X       int    `json:"x"`
	Y       int    `json:"y"`
	Z       int    `json:"z"`
}

func (TileXYZ) String

func (xyz TileXYZ) String() string

type TilesetIndex

type TilesetIndex struct {
	Path     string
	Tilesets map[string]*mbtiles.Tileset
	Events   chan TsEvent
	// contains filtered or unexported fields
}

TilesetIndex is a container for tilesets loaded from disk

func NewTilesetIndex

func NewTilesetIndex(mbtilesDir string) (tsi *TilesetIndex)

NewTilesetIndex creates a new tileset index, but does not read the tile tilesets from disk

func ReadTilesets

func ReadTilesets(mbtilesDir string) (tsi *TilesetIndex)

ReadTilesets create a new tilesetindex and read the tilesets contents from disk It spawns goroutine that will refresh Tilesets from disk on changes

type TilesetTopic

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

hub maintains the set of active connections and broadcasts messages to the connections.

type TsEvent

type TsEvent struct {
	Name string
	Op   TsOp
}

func (*TsEvent) String

func (tse *TsEvent) String() string

type TsOp

type TsOp uint32
const (
	Upsert TsOp = 1 << iota
	Remove
)

Jump to

Keyboard shortcuts

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