Documentation
¶
Index ¶
- Constants
- Variables
- func HostAndPortArrayToStringArray(servers []HostAndPort) []string
- type Disk
- type DiskConfig
- type DiskRegistration
- type HostAndPort
- type Memcache
- type MemcacheConfig
- type MemcacheRegistration
- type Memory
- type MemoryConfig
- type MemoryRegistration
- type Multi
- type MultiConfig
- type MultiRegistration
- type Noop
- type NoopConfig
- type NoopRegistration
- type Redis
- type RedisConfig
- type RedisRegistration
- type S3
- type S3Config
- type S3Registration
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 Disk ¶
type Disk struct {
DiskConfig
}
type DiskConfig ¶
type DiskRegistration ¶ added in v0.5.0
type DiskRegistration struct { }
func (DiskRegistration) Initialize ¶ added in v0.5.0
func (s DiskRegistration) Initialize(configAny any, errorMessages config.ErrorMessages) (cache.Cache, error)
func (DiskRegistration) InitializeConfig ¶ added in v0.5.0
func (s DiskRegistration) InitializeConfig() any
func (DiskRegistration) Name ¶ added in v0.5.0
func (s DiskRegistration) Name() string
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 }
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 MemcacheRegistration ¶ added in v0.5.0
type MemcacheRegistration struct { }
func (MemcacheRegistration) Initialize ¶ added in v0.5.0
func (s MemcacheRegistration) Initialize(configAny any, errorMessages config.ErrorMessages) (cache.Cache, error)
func (MemcacheRegistration) InitializeConfig ¶ added in v0.5.0
func (s MemcacheRegistration) InitializeConfig() any
func (MemcacheRegistration) Name ¶ added in v0.5.0
func (s MemcacheRegistration) Name() string
type MemoryConfig ¶
type MemoryRegistration ¶ added in v0.5.0
type MemoryRegistration struct { }
func (MemoryRegistration) Initialize ¶ added in v0.5.0
func (s MemoryRegistration) Initialize(configAny any, _ config.ErrorMessages) (cache.Cache, error)
func (MemoryRegistration) InitializeConfig ¶ added in v0.5.0
func (s MemoryRegistration) InitializeConfig() any
func (MemoryRegistration) Name ¶ added in v0.5.0
func (s MemoryRegistration) Name() string
type MultiConfig ¶
type MultiConfig struct {
Tiers []map[string]interface{}
}
type MultiRegistration ¶ added in v0.5.0
type MultiRegistration struct { }
func (MultiRegistration) Initialize ¶ added in v0.5.0
func (s MultiRegistration) Initialize(configAny any, errorMessages config.ErrorMessages) (cache.Cache, error)
func (MultiRegistration) InitializeConfig ¶ added in v0.5.0
func (s MultiRegistration) InitializeConfig() any
func (MultiRegistration) Name ¶ added in v0.5.0
func (s MultiRegistration) Name() string
type Noop ¶
type Noop struct {
NoopConfig
}
type NoopConfig ¶ added in v0.5.0
type NoopConfig struct { }
type NoopRegistration ¶ added in v0.5.0
type NoopRegistration struct { }
func (NoopRegistration) Initialize ¶ added in v0.5.0
func (s NoopRegistration) Initialize(configAny any, _ config.ErrorMessages) (cache.Cache, error)
func (NoopRegistration) InitializeConfig ¶ added in v0.5.0
func (s NoopRegistration) InitializeConfig() any
func (NoopRegistration) Name ¶ added in v0.5.0
func (s NoopRegistration) Name() string
type Redis ¶
type Redis struct { RedisConfig // contains filtered or unexported fields }
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 RedisRegistration ¶ added in v0.5.0
type RedisRegistration struct { }
func (RedisRegistration) Initialize ¶ added in v0.5.0
func (s RedisRegistration) Initialize(configAny any, errorMessages config.ErrorMessages) (cache.Cache, error)
func (RedisRegistration) InitializeConfig ¶ added in v0.5.0
func (s RedisRegistration) InitializeConfig() any
func (RedisRegistration) Name ¶ added in v0.5.0
func (s RedisRegistration) Name() string
type S3Registration ¶ added in v0.5.0
type S3Registration struct { }
func (S3Registration) Initialize ¶ added in v0.5.0
func (s S3Registration) Initialize(configAny any, errorMessages config.ErrorMessages) (cache.Cache, error)
func (S3Registration) InitializeConfig ¶ added in v0.5.0
func (s S3Registration) InitializeConfig() any
func (S3Registration) Name ¶ added in v0.5.0
func (s S3Registration) Name() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.