Documentation
¶
Index ¶
- Constants
- func NewReader(data interface{}) ([]byte, error)
- type Cachable
- type CacheScope
- type Config
- type Host
- type Message
- func (m *Message) BoolKey(key string, value bool)
- func (m *Message) Bytes() []byte
- func (m *Message) CacheKey() string
- func (m *Message) FloatKey(key string, value float32)
- func (m *Message) FloatsKey(key string, values []float32)
- func (m *Message) IntKey(key string, value int)
- func (m *Message) IntsKey(key string, values []int)
- func (m *Message) Release()
- func (m *Message) Size() int
- func (m *Message) StringKey(key, value string)
- func (m *Message) StringsKey(key string, values []string)
- type Messages
- type Option
- type Releaser
- type Response
- type Service
Constants ¶
View Source
const ( CacheScopeLocal = CacheScope(1) CacheScopeL1 = CacheScope(2) CacheScopeL2 = CacheScope(4) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheScope ¶
type CacheScope int
func (CacheScope) IsL1 ¶
func (c CacheScope) IsL1() bool
func (CacheScope) IsL2 ¶
func (c CacheScope) IsL2() bool
func (CacheScope) IsLocal ¶
func (c CacheScope) IsLocal() bool
type Config ¶
type Config struct {
Hosts []*Host
Model string
CacheSizeMb int
CacheScope *CacheScope
Datastore *config.Datastore
MaxRetry int
}
Config represents a client config
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message represents a message
func (*Message) StringsKey ¶
StringsKey sets key/values pair
type Option ¶
type Option interface {
Apply(c *Service)
}
Option client option
func NewGmetric ¶
NewGmetric returns gmetric options
type Response ¶
type Response struct {
Status string `json:"status"`
Error string `json:"error,omitempty"`
ServiceTime time.Duration `json:"serviceTime"`
DictHash int `json:"dictHash"`
Data interface{} `json:"data"`
}
Response represents a response
Source Files
¶
Click to show internal directories.
Click to hide internal directories.