Documentation
¶
Index ¶
- Variables
- type Config
- type Storage
- func (s *Storage) Close() error
- func (s *Storage) Conn() *coh.Session
- func (s *Storage) Delete(key string) error
- func (s *Storage) DeleteWithContext(ctx context.Context, key string) error
- func (s *Storage) Get(key string) ([]byte, error)
- func (s *Storage) GetWithContext(ctx context.Context, key string) ([]byte, error)
- func (s *Storage) Reset() error
- func (s *Storage) ResetWithContext(ctx context.Context) error
- func (s *Storage) Set(key string, val []byte, exp time.Duration) error
- func (s *Storage) SetWithContext(ctx context.Context, key string, val []byte, exp time.Duration) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ Address: defaultAddress, Timeout: defaultTimeout, ScopeName: defaultScopeName, Reset: false, }
DefaultConfig defines default options.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Address to connect to, defaults to "localhost:1408"
Address string
// Timeout is the default session timeout to connect to Coherence, defaults to 30s
Timeout time.Duration
// ScopeName defines a scope allowing for multiple storage sessions
ScopeName string
// Reset indicates if the store should be reset after being created
Reset bool
// TLSConfig specifies tls.Config to use when connecting, if nil then plain text is used
TLSConfig *tls.Config
// NearCacheTimeout defines the timeout for a near cache. Is this is set, then a near cache
// with the timeout is created. Note: this must be less than the session timeout or any timeout you specify
// when using Set().
NearCacheTimeout time.Duration
}
Config defines configuration options for Coherence connection.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage represents an implementation of Coherence storage provider.
func (*Storage) DeleteWithContext ¶ added in v1.4.0
func (*Storage) GetWithContext ¶ added in v1.4.0
func (*Storage) ResetWithContext ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.