Documentation ¶
Index ¶
- func MemcacheClient() *gom.Client
- func NewProviderMock(t *testing.T, opts ...OptionMock) cache.Provider
- func PebbleDB() (*pebble.DB, func())
- func RedisClient() func(ctx context.Context) (redis.Conn, error)
- func RistrettoClient() *ristretto.Cache
- func RunSute(t *testing.T, provider cache.Provider, opts ...Option)
- type Option
- type OptionMock
- type ProviderMock
- type ProviderSuite
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MemcacheClient ¶ added in v0.2.0
MemcacheClient created memcached client.
func NewProviderMock ¶
func NewProviderMock(t *testing.T, opts ...OptionMock) cache.Provider
NewProviderMock create new mock provider.
func RedisClient ¶
RedisClient created redis client.
func RistrettoClient ¶ added in v0.2.0
RistrettoClient creates ristretto client.
Types ¶
type Option ¶
type Option func(*ProviderSuite)
Option configure sute.
func WithWaitGet ¶ added in v0.2.0
func WithWaitGet(f func()) Option
type OptionMock ¶
type OptionMock func(*ProviderMock)
OptionMock configure mock.
func WithDelete ¶
WithDelete sets delete method.
type ProviderMock ¶
type ProviderMock struct {
// contains filtered or unexported fields
}
ProviderMock mock.
type ProviderSuite ¶
ProviderSuite for testing providers.
func (*ProviderSuite) TestCacheMiss ¶
func (s *ProviderSuite) TestCacheMiss()
TestCacheMiss tested cache miss error.
func (*ProviderSuite) TestDelete ¶
func (s *ProviderSuite) TestDelete()
TestDelete tested delete method.
func (*ProviderSuite) TestExpired ¶
func (s *ProviderSuite) TestExpired()
TestExpired tested error expired.
Click to show internal directories.
Click to hide internal directories.