Versions in this module Expand all Collapse all v1 v1.100.0 Sep 27, 2023 Changes in this version + var ErrEmptyAddrs = errors.New("addrs (first argument) should not be empty") + var ErrIncorrectResponse = errors.New("incorrect response format") + var ErrIncorrectStatus = errors.New("incorrect instance status: status should be `running`") + var ErrNoConnection = errors.New("no active connections") + var ErrNoHealthyInstance = errors.New("can't find healthy instance in pool") + var ErrNoRoInstance = errors.New("can't find ro instance in pool") + var ErrNoRwInstance = errors.New("can't find rw instance in pool") + var ErrTooManyArgs = errors.New("too many arguments") + var ErrWrongCheckTimeout = errors.New("wrong check timeout, must be greater than 0") + type ConnectionHandler interface + Deactivated func(conn *tarantool.Connection, role Role) error + Discovered func(conn *tarantool.Connection, role Role) error + type ConnectionInfo struct + ConnRole Role + ConnectedNow bool + type ConnectionPool struct + func Connect(addrs []string, connOpts tarantool.Opts) (connPool *ConnectionPool, err error) + func ConnectWithOpts(addrs []string, connOpts tarantool.Opts, opts OptsPool) (connPool *ConnectionPool, err error) + func (connPool *ConnectionPool) Call(functionName string, args interface{}, userMode Mode) (resp *tarantool.Response, err error) + func (connPool *ConnectionPool) Call16(functionName string, args interface{}, userMode Mode) (resp *tarantool.Response, err error) + func (connPool *ConnectionPool) Call16Async(functionName string, args interface{}, userMode Mode) *tarantool.Future + func (connPool *ConnectionPool) Call16Typed(functionName string, args interface{}, result interface{}, userMode Mode) (err error) + func (connPool *ConnectionPool) Call17(functionName string, args interface{}, userMode Mode) (resp *tarantool.Response, err error) + func (connPool *ConnectionPool) Call17Async(functionName string, args interface{}, userMode Mode) *tarantool.Future + func (connPool *ConnectionPool) Call17Typed(functionName string, args interface{}, result interface{}, userMode Mode) (err error) + func (connPool *ConnectionPool) CallAsync(functionName string, args interface{}, userMode Mode) *tarantool.Future + func (connPool *ConnectionPool) CallTyped(functionName string, args interface{}, result interface{}, userMode Mode) (err error) + func (connPool *ConnectionPool) Close() []error + func (connPool *ConnectionPool) ConfiguredTimeout(mode Mode) (time.Duration, error) + func (connPool *ConnectionPool) ConnectedNow(mode Mode) (bool, error) + func (connPool *ConnectionPool) Delete(space, index interface{}, key interface{}, userMode ...Mode) (resp *tarantool.Response, err error) + func (connPool *ConnectionPool) DeleteAsync(space, index interface{}, key interface{}, userMode ...Mode) *tarantool.Future + func (connPool *ConnectionPool) DeleteTyped(space, index interface{}, key interface{}, result interface{}, ...) (err error) + func (connPool *ConnectionPool) Do(req tarantool.Request, userMode Mode) *tarantool.Future + func (connPool *ConnectionPool) Eval(expr string, args interface{}, userMode Mode) (resp *tarantool.Response, err error) + func (connPool *ConnectionPool) EvalAsync(expr string, args interface{}, userMode Mode) *tarantool.Future + func (connPool *ConnectionPool) EvalTyped(expr string, args interface{}, result interface{}, userMode Mode) (err error) + func (connPool *ConnectionPool) Execute(expr string, args interface{}, userMode Mode) (resp *tarantool.Response, err error) + func (connPool *ConnectionPool) ExecuteAsync(expr string, args interface{}, userMode Mode) *tarantool.Future + func (connPool *ConnectionPool) ExecuteTyped(expr string, args interface{}, result interface{}, userMode Mode) (tarantool.SQLInfo, []tarantool.ColumnMetaData, error) + func (connPool *ConnectionPool) GetAddrs() []string + func (connPool *ConnectionPool) GetPoolInfo() map[string]*ConnectionInfo + func (connPool *ConnectionPool) GetTyped(space, index interface{}, key interface{}, result interface{}, ...) (err error) + func (connPool *ConnectionPool) Insert(space interface{}, tuple interface{}, userMode ...Mode) (resp *tarantool.Response, err error) + func (connPool *ConnectionPool) InsertAsync(space interface{}, tuple interface{}, userMode ...Mode) *tarantool.Future + func (connPool *ConnectionPool) InsertTyped(space interface{}, tuple interface{}, result interface{}, userMode ...Mode) (err error) + func (connPool *ConnectionPool) NewPrepared(expr string, userMode Mode) (*tarantool.Prepared, error) + func (connPool *ConnectionPool) NewStream(userMode Mode) (*tarantool.Stream, error) + func (connPool *ConnectionPool) Ping(userMode Mode) (*tarantool.Response, error) + func (connPool *ConnectionPool) Replace(space interface{}, tuple interface{}, userMode ...Mode) (resp *tarantool.Response, err error) + func (connPool *ConnectionPool) ReplaceAsync(space interface{}, tuple interface{}, userMode ...Mode) *tarantool.Future + func (connPool *ConnectionPool) ReplaceTyped(space interface{}, tuple interface{}, result interface{}, userMode ...Mode) (err error) + func (connPool *ConnectionPool) Select(space, index interface{}, offset, limit, iterator uint32, key interface{}, ...) (resp *tarantool.Response, err error) + func (connPool *ConnectionPool) SelectAsync(space, index interface{}, offset, limit, iterator uint32, key interface{}, ...) *tarantool.Future + func (connPool *ConnectionPool) SelectTyped(space, index interface{}, offset, limit, iterator uint32, key interface{}, ...) (err error) + func (connPool *ConnectionPool) Update(space, index interface{}, key, ops interface{}, userMode ...Mode) (resp *tarantool.Response, err error) + func (connPool *ConnectionPool) UpdateAsync(space, index interface{}, key, ops interface{}, userMode ...Mode) *tarantool.Future + func (connPool *ConnectionPool) UpdateTyped(space, index interface{}, key, ops interface{}, result interface{}, ...) (err error) + func (connPool *ConnectionPool) Upsert(space interface{}, tuple, ops interface{}, userMode ...Mode) (resp *tarantool.Response, err error) + func (connPool *ConnectionPool) UpsertAsync(space interface{}, tuple interface{}, ops interface{}, userMode ...Mode) *tarantool.Future + func (pool *ConnectionPool) NewWatcher(key string, callback tarantool.WatchCallback, mode Mode) (tarantool.Watcher, error) + type ConnectorAdapter struct + func NewConnectorAdapter(pool Pooler, mode Mode) *ConnectorAdapter + func (c *ConnectorAdapter) Call(functionName string, args interface{}) (*tarantool.Response, error) + func (c *ConnectorAdapter) Call16(functionName string, args interface{}) (*tarantool.Response, error) + func (c *ConnectorAdapter) Call16Async(functionName string, args interface{}) *tarantool.Future + func (c *ConnectorAdapter) Call16Typed(functionName string, args interface{}, result interface{}) error + func (c *ConnectorAdapter) Call17(functionName string, args interface{}) (*tarantool.Response, error) + func (c *ConnectorAdapter) Call17Async(functionName string, args interface{}) *tarantool.Future + func (c *ConnectorAdapter) Call17Typed(functionName string, args interface{}, result interface{}) error + func (c *ConnectorAdapter) CallAsync(functionName string, args interface{}) *tarantool.Future + func (c *ConnectorAdapter) CallTyped(functionName string, args interface{}, result interface{}) error + func (c *ConnectorAdapter) Close() error + func (c *ConnectorAdapter) ConfiguredTimeout() time.Duration + func (c *ConnectorAdapter) ConnectedNow() bool + func (c *ConnectorAdapter) Delete(space, index interface{}, key interface{}) (*tarantool.Response, error) + func (c *ConnectorAdapter) DeleteAsync(space, index interface{}, key interface{}) *tarantool.Future + func (c *ConnectorAdapter) DeleteTyped(space, index interface{}, key interface{}, result interface{}) error + func (c *ConnectorAdapter) Do(req tarantool.Request) *tarantool.Future + func (c *ConnectorAdapter) Eval(expr string, args interface{}) (*tarantool.Response, error) + func (c *ConnectorAdapter) EvalAsync(expr string, args interface{}) *tarantool.Future + func (c *ConnectorAdapter) EvalTyped(expr string, args interface{}, result interface{}) error + func (c *ConnectorAdapter) Execute(expr string, args interface{}) (*tarantool.Response, error) + func (c *ConnectorAdapter) ExecuteAsync(expr string, args interface{}) *tarantool.Future + func (c *ConnectorAdapter) ExecuteTyped(expr string, args interface{}, result interface{}) (tarantool.SQLInfo, []tarantool.ColumnMetaData, error) + func (c *ConnectorAdapter) GetTyped(space, index interface{}, key interface{}, result interface{}) error + func (c *ConnectorAdapter) Insert(space interface{}, tuple interface{}) (*tarantool.Response, error) + func (c *ConnectorAdapter) InsertAsync(space interface{}, tuple interface{}) *tarantool.Future + func (c *ConnectorAdapter) InsertTyped(space interface{}, tuple interface{}, result interface{}) error + func (c *ConnectorAdapter) NewPrepared(expr string) (*tarantool.Prepared, error) + func (c *ConnectorAdapter) NewStream() (*tarantool.Stream, error) + func (c *ConnectorAdapter) NewWatcher(key string, callback tarantool.WatchCallback) (tarantool.Watcher, error) + func (c *ConnectorAdapter) Ping() (*tarantool.Response, error) + func (c *ConnectorAdapter) Replace(space interface{}, tuple interface{}) (*tarantool.Response, error) + func (c *ConnectorAdapter) ReplaceAsync(space interface{}, tuple interface{}) *tarantool.Future + func (c *ConnectorAdapter) ReplaceTyped(space interface{}, tuple interface{}, result interface{}) error + func (c *ConnectorAdapter) Select(space, index interface{}, offset, limit, iterator uint32, key interface{}) (*tarantool.Response, error) + func (c *ConnectorAdapter) SelectAsync(space, index interface{}, offset, limit, iterator uint32, key interface{}) *tarantool.Future + func (c *ConnectorAdapter) SelectTyped(space, index interface{}, offset, limit, iterator uint32, key interface{}, ...) error + func (c *ConnectorAdapter) Update(space, index interface{}, key, ops interface{}) (*tarantool.Response, error) + func (c *ConnectorAdapter) UpdateAsync(space, index interface{}, key, ops interface{}) *tarantool.Future + func (c *ConnectorAdapter) UpdateTyped(space, index interface{}, key, ops interface{}, result interface{}) error + func (c *ConnectorAdapter) Upsert(space interface{}, tuple, ops interface{}) (*tarantool.Response, error) + func (c *ConnectorAdapter) UpsertAsync(space interface{}, tuple interface{}, ops interface{}) *tarantool.Future + type Mode uint32 + const ANY + const PreferRO + const PreferRW + const RO + const RW + type OptsPool struct + CheckTimeout time.Duration + ConnectionHandler ConnectionHandler + type Pooler interface + Call func(functionName string, args interface{}, mode Mode) (*tarantool.Response, error) + Call16 func(functionName string, args interface{}, mode Mode) (*tarantool.Response, error) + Call16Async func(functionName string, args interface{}, mode Mode) *tarantool.Future + Call16Typed func(functionName string, args interface{}, result interface{}, mode Mode) error + Call17 func(functionName string, args interface{}, mode Mode) (*tarantool.Response, error) + Call17Async func(functionName string, args interface{}, mode Mode) *tarantool.Future + Call17Typed func(functionName string, args interface{}, result interface{}, mode Mode) error + CallAsync func(functionName string, args interface{}, mode Mode) *tarantool.Future + CallTyped func(functionName string, args interface{}, result interface{}, mode Mode) error + Close func() []error + ConfiguredTimeout func(mode Mode) (time.Duration, error) + ConnectedNow func(mode Mode) (bool, error) + Delete func(space, index interface{}, key interface{}, mode ...Mode) (*tarantool.Response, error) + DeleteAsync func(space, index interface{}, key interface{}, mode ...Mode) *tarantool.Future + DeleteTyped func(space, index interface{}, key interface{}, result interface{}, mode ...Mode) error + Do func(req tarantool.Request, mode Mode) (fut *tarantool.Future) + Eval func(expr string, args interface{}, mode Mode) (*tarantool.Response, error) + EvalAsync func(expr string, args interface{}, mode Mode) *tarantool.Future + EvalTyped func(expr string, args interface{}, result interface{}, mode Mode) error + Execute func(expr string, args interface{}, mode Mode) (*tarantool.Response, error) + ExecuteAsync func(expr string, args interface{}, mode Mode) *tarantool.Future + ExecuteTyped func(expr string, args interface{}, result interface{}, mode Mode) (tarantool.SQLInfo, []tarantool.ColumnMetaData, error) + GetTyped func(space, index interface{}, key interface{}, result interface{}, mode ...Mode) error + Insert func(space interface{}, tuple interface{}, mode ...Mode) (*tarantool.Response, error) + InsertAsync func(space interface{}, tuple interface{}, mode ...Mode) *tarantool.Future + InsertTyped func(space interface{}, tuple interface{}, result interface{}, mode ...Mode) error + NewPrepared func(expr string, mode Mode) (*tarantool.Prepared, error) + NewStream func(mode Mode) (*tarantool.Stream, error) + NewWatcher func(key string, callback tarantool.WatchCallback, mode Mode) (tarantool.Watcher, error) + Ping func(mode Mode) (*tarantool.Response, error) + Replace func(space interface{}, tuple interface{}, mode ...Mode) (*tarantool.Response, error) + ReplaceAsync func(space interface{}, tuple interface{}, mode ...Mode) *tarantool.Future + ReplaceTyped func(space interface{}, tuple interface{}, result interface{}, mode ...Mode) error + Select func(space, index interface{}, offset, limit, iterator uint32, key interface{}, ...) (*tarantool.Response, error) + SelectAsync func(space, index interface{}, offset, limit, iterator uint32, key interface{}, ...) *tarantool.Future + SelectTyped func(space, index interface{}, offset, limit, iterator uint32, key interface{}, ...) error + Update func(space, index interface{}, key, ops interface{}, mode ...Mode) (*tarantool.Response, error) + UpdateAsync func(space, index interface{}, key, ops interface{}, mode ...Mode) *tarantool.Future + UpdateTyped func(space, index interface{}, key, ops interface{}, result interface{}, ...) error + Upsert func(space interface{}, tuple, ops interface{}, mode ...Mode) (*tarantool.Response, error) + UpsertAsync func(space interface{}, tuple interface{}, ops interface{}, mode ...Mode) *tarantool.Future + type Role uint32 + const MasterRole + const ReplicaRole + const UnknownRole + type RoundRobinStrategy struct + func NewEmptyRoundRobin(size int) *RoundRobinStrategy + func (r *RoundRobinStrategy) AddConn(addr string, conn *tarantool.Connection) + func (r *RoundRobinStrategy) DeleteConnByAddr(addr string) *tarantool.Connection + func (r *RoundRobinStrategy) GetConnByAddr(addr string) *tarantool.Connection + func (r *RoundRobinStrategy) GetConnections() []*tarantool.Connection + func (r *RoundRobinStrategy) GetNextConnection() *tarantool.Connection + func (r *RoundRobinStrategy) IsEmpty() bool