Documentation
¶
Index ¶
Constants ¶
View Source
const ( ModeStandalone = "standalone" ModeCluster = "cluster" ModeRing = "ring" )
Variables ¶
View Source
var AllModes = []string{ModeStandalone, ModeCluster, ModeRing}
Functions ¶
func HostAndPortArrayToStringArray ¶
func HostAndPortArrayToStringArray(servers []HostAndPort) []string
Types ¶
type Cache ¶
type Cache interface { Lookup(t internal.TileRequest) (*internal.Image, error) Save(t internal.TileRequest, img *internal.Image) error }
func ConstructCache ¶
func ConstructCache(rawConfig map[string]interface{}, errorMessages *config.ErrorMessages) (Cache, error)
type Disk ¶
type Disk struct {
// contains filtered or unexported fields
}
func ConstructDisk ¶
func ConstructDisk(config DiskConfig, ErrorMessages *config.ErrorMessages) (*Disk, error)
type DiskConfig ¶
type HostAndPort ¶
Utility type used in a couple caches
func (HostAndPort) String ¶
func (hp HostAndPort) String() string
type Memcache ¶
type Memcache struct { *MemcacheConfig // contains filtered or unexported fields }
func ConstructMemcache ¶
func ConstructMemcache(config *MemcacheConfig, errorMessages *config.ErrorMessages) (*Memcache, error)
type MemcacheConfig ¶
type MemcacheConfig struct { HostAndPort `mapstructure:",squash"` Servers []HostAndPort //The list of servers to use. KeyPrefix string //Prefix to keynames stored in cache Ttl uint32 //Cache expiration in seconds. Max of 30 days. Default to 1 day }
type Memory ¶
type Memory struct { MemoryConfig Cache otter.Cache[string, []byte] }
func ConstructMemory ¶
func ConstructMemory(config MemoryConfig, ErrorMessages *config.ErrorMessages) (*Memory, error)
type MemoryConfig ¶
type MultiConfig ¶
type MultiConfig struct {
Tiers []map[string]interface{}
}
type Redis ¶
type Redis struct { *RedisConfig // contains filtered or unexported fields }
func ConstructRedis ¶
func ConstructRedis(config *RedisConfig, errorMessages *config.ErrorMessages) (*Redis, error)
type RedisConfig ¶
type RedisConfig struct { HostAndPort `mapstructure:",squash"` //Host and Port for a single server. A convenience equivalent to supplying Servers with a single entry Db int //Database number, defaults to 0 KeyPrefix string //Prefix to keynames stored in cache Username string //Username to use to authenticate Password string //Password to use to authenticate Mode string //Controls operating mode. One of AllModes. Defaults to standalone Ttl uint32 //Cache expiration in seconds. Max of 1 year. Default to 1 day Servers []HostAndPort //The list of servers to use. }
type S3 ¶
type S3 struct { *S3Config // contains filtered or unexported fields }
func ConstructS3 ¶
func ConstructS3(config *S3Config, errorMessages *config.ErrorMessages) (*S3, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.