Documentation
¶
Index ¶
Constants ¶
const (
ProviderType = "mysql"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexStorageProvider ¶
type IndexStorageProvider struct {
// contains filtered or unexported fields
}
IndexStorageProvider implements indexstorage.IndexStorage
func NewProvider ¶
func NewProvider(dsn string, opts ...Options) (*IndexStorageProvider, error)
func (*IndexStorageProvider) LookupIndices ¶
func (isp *IndexStorageProvider) LookupIndices(ctx context.Context, keys []string) ([]string, error)
LookupIndices looks up and returns all indices for the specified keys. The key value(s) will be canonicalized by converting all characters into a lowercase value before looking up in Redis
func (*IndexStorageProvider) Shutdown ¶
func (isp *IndexStorageProvider) Shutdown() error
Shutdown cleans up any client resources that may be held by the provider
func (*IndexStorageProvider) WriteIndex ¶
WriteIndex adds the index for the specified key. The key value will be canonicalized by converting all characters into a lowercase value before appending the index in Redis
type Options ¶
type Options interface {
// contains filtered or unexported methods
}
Options configures connections to the MySQL index storage system
type RequestConnMaxIdleTime ¶
type RequestConnMaxIdleTime struct {
// contains filtered or unexported fields
}
RequestConnMaxIdleTime implements the functional option pattern for specifying the maximum connection idle time
func WithConnMaxIdleTime ¶
func WithConnMaxIdleTime(idleTime time.Duration) RequestConnMaxIdleTime
WithConnMaxIdleTime specifies the maximum connection idle time
type RequestConnMaxLifetime ¶
type RequestConnMaxLifetime struct {
// contains filtered or unexported fields
}
RequestConnMaxLifetime implements the functional option pattern for specifying the maximum connection lifetime
func WithConnMaxLifetime ¶
func WithConnMaxLifetime(lifetime time.Duration) RequestConnMaxLifetime
WithConnMaxLifetime specifies the maximum connection lifetime
type RequestMaxIdleConns ¶
type RequestMaxIdleConns struct {
// contains filtered or unexported fields
}
RequestMaxIdleConns implements the functional option pattern for specifying the maximum number of idle connections
func WithMaxIdleConns ¶
func WithMaxIdleConns(idleConns int) RequestMaxIdleConns
WithMaxIdleConns specifies the maximum number of idle connections
type RequestMaxOpenConns ¶
type RequestMaxOpenConns struct {
// contains filtered or unexported fields
}
RequestMaxOpenConns implements the functional option pattern for specifying the maximum number of open connections
func WithMaxOpenConns ¶
func WithMaxOpenConns(openConns int) RequestMaxOpenConns
WithMaxOpenConns specifies the maximum number of open connections