Documentation
¶
Index ¶
- Constants
- func PrintlnDebugLogger(message string)
- func PrintlnErrorLogger(message string)
- func PrintlnInfoLogger(message string)
- func PrintlnWarnLogger(message string)
- type Cache
- type CacheConfig
- type CacheStats
- type FilePath
- type LoggerConfig
- type MemoryMap
- type SharedMemoryCache
- type SharedMemoryCacheConfig
- type TileKeyHistoryItem
Constants ¶
View Source
const DEFAULT_HTTP_CLIENT_TIMEOUT = 6 * time.Second
View Source
const MAX_SIZE_BYTES_UNLIMITED = -1
Variables ¶
This section is empty.
Functions ¶
func PrintlnDebugLogger ¶ added in v0.1.3
func PrintlnDebugLogger(message string)
func PrintlnErrorLogger ¶ added in v0.1.3
func PrintlnErrorLogger(message string)
func PrintlnInfoLogger ¶ added in v0.1.3
func PrintlnInfoLogger(message string)
func PrintlnWarnLogger ¶ added in v0.1.3
func PrintlnWarnLogger(message string)
Types ¶
type Cache ¶
type Cache struct {
Host string
Port string
Route []string
RouteString string
UrlScheme string
StructureParams []string
TimeToLive time.Duration
ForwardHeaders bool
Client *http.Client
ApiKey string
Stats CacheStats
Logger LoggerConfig
}
func New ¶
func New(config CacheConfig) (*Cache, error)
func (*Cache) InitLogStatsRunner ¶ added in v0.1.3
func (c *Cache) InitLogStatsRunner()
func (*Cache) LogSystemStats ¶ added in v0.1.5
func (c *Cache) LogSystemStats()
func (*Cache) PreloadMemoryMap ¶ added in v1.0.0
func (c *Cache) PreloadMemoryMap()
func (*Cache) ValidateCache ¶ added in v0.1.1
func (c *Cache) ValidateCache()
type CacheConfig ¶ added in v1.1.0
type CacheConfig struct {
Host string
Port string
Route []string
UrlScheme string
StructureParams []string
TimeToLive time.Duration
ForwardHeaders bool
HttpClientTimeout time.Duration
ApiKey string
DebugLogger func(string)
InfoLogger func(string)
WarnLogger func(string)
ErrorLogger func(string)
StatsLogDelay time.Duration
}
type CacheStats ¶
type LoggerConfig ¶
type LoggerConfig struct {
LogPrefix string
LogDebugFunc func(string)
LogInfoFunc func(string)
LogWarnFunc func(string)
LogErrorFunc func(string)
StatsLogDelay time.Duration
}
configure Log*Func with external callbacks to route log message to an existing logger of the embedding application
type SharedMemoryCache ¶ added in v1.1.0
type SharedMemoryCache struct {
}
func NewSharedMemoryCache ¶ added in v1.1.0
func NewSharedMemoryCache(config SharedMemoryCacheConfig) *SharedMemoryCache
func (*SharedMemoryCache) EnsureMaxSize ¶ added in v1.1.0
func (m *SharedMemoryCache) EnsureMaxSize()
func (*SharedMemoryCache) MaxSizeReachedMutex ¶ added in v1.1.0
func (m *SharedMemoryCache) MaxSizeReachedMutex() bool
func (*SharedMemoryCache) MemoryMapRead ¶ added in v1.1.0
func (m *SharedMemoryCache) MemoryMapRead(mapKey string, tileKey string) (*[]byte, bool)
func (*SharedMemoryCache) MemoryMapWrite ¶ added in v1.1.0
func (m *SharedMemoryCache) MemoryMapWrite(mapKey string, tileKey string, data *[]byte)
type SharedMemoryCacheConfig ¶ added in v1.1.0
type SharedMemoryCacheConfig struct {
}
type TileKeyHistoryItem ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.