Documentation
¶
Index ¶
- func VoidOnRetry(err error)
- type SmartClient
- func (c *SmartClient) Close() error
- func (c *SmartClient) DoTransaction(ctx context.Context, f func(ctx context.Context, txn types.Txn) error) error
- func (c *SmartClient) DoTransactionEx(ctx context.Context, f func(ctx context.Context, txn types.Txn) error) (types.Txn, error)
- func (c *SmartClient) DoTransactionOfOption(ctx context.Context, opt types.TxnOption, ...) (txn types.Txn, retryTimes int, retryDetails types.RetryDetails, err error)
- func (c *SmartClient) DoTransactionOfType(ctx context.Context, typ types.TxnType, ...) error
- func (c *SmartClient) DoTransactionOfTypeEx(ctx context.Context, typ types.TxnType, ...) (_ types.Txn, retryTimes int, _ error)
- func (c *SmartClient) DoTransactionRaw(ctx context.Context, opt types.TxnOption, ...) (_ types.Txn, retryTimes int, _ error)
- func (c *SmartClient) Get(ctx context.Context, key string) (val types.TValue, _ error)
- func (c *SmartClient) GetInt(ctx context.Context, key string) (int, error)
- func (c *SmartClient) MGet(ctx context.Context, keys []string, txnType types.TxnType) (values []types.TValue, _ error)
- func (c *SmartClient) MGetInts(ctx context.Context, keys []string, txnType types.TxnType) ([]int, error)
- func (c *SmartClient) MSet(ctx context.Context, keys []string, values [][]byte, txnType types.TxnType) error
- func (c *SmartClient) MSetInts(ctx context.Context, keys []string, values []int) error
- func (c *SmartClient) Set(ctx context.Context, key string, val []byte) error
- func (c *SmartClient) SetInt(ctx context.Context, key string, intVal int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VoidOnRetry ¶
func VoidOnRetry(err error)
Types ¶
type SmartClient ¶
type SmartClient struct { types.TxnManager // contains filtered or unexported fields }
func NewSmartClient ¶
func NewSmartClient(tm types.TxnManager, maxRetry int) *SmartClient
func (*SmartClient) Close ¶
func (c *SmartClient) Close() error
func (*SmartClient) DoTransaction ¶
func (*SmartClient) DoTransactionEx ¶
func (*SmartClient) DoTransactionOfOption ¶
func (*SmartClient) DoTransactionOfType ¶
func (*SmartClient) DoTransactionOfTypeEx ¶
func (*SmartClient) DoTransactionRaw ¶
Click to show internal directories.
Click to hide internal directories.