Documentation ¶
Index ¶
Constants ¶
View Source
const PlaceholderPrefix = "rueidisid:"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheAsideClient ¶
type CacheAsideClient interface { Get(ctx context.Context, ttl time.Duration, key string, fn func(ctx context.Context, key string) (val string, err error)) (val string, err error) Del(ctx context.Context, key string) error Client() rueidis.Client Close() }
func NewClient ¶
func NewClient(option ClientOption) (cc CacheAsideClient, err error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type ClientOption ¶
type ClientOption struct { // ClientBuilder can be used to modify rueidis.Client used by Locker ClientBuilder func(option rueidis.ClientOption) (rueidis.Client, error) ClientOption rueidis.ClientOption ClientTTL time.Duration // TTL for the client marker, refreshed every 1/2 TTL. Defaults to 10s. The marker allows other client to know if this client is still alive. }
Click to show internal directories.
Click to hide internal directories.