package mock
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/mock"
Index ¶
- type Conn
- func (c *Conn) Endpoint() endpoint.Endpoint
- func (c *Conn) GetState() conn.State
- func (c *Conn) Invoke( ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption, ) error
- func (c *Conn) IsState(states ...conn.State) bool
- func (c *Conn) LastUsage() time.Time
- func (c *Conn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption, ) (grpc.ClientStream, error)
- func (c *Conn) Park(ctx context.Context) (err error)
- func (c *Conn) Ping(ctx context.Context) error
- func (c *Conn) SetState(ctx context.Context, state conn.State) conn.State
- func (c *Conn) Unban(ctx context.Context) conn.State
- type Endpoint
- func (e *Endpoint) Address() string
- func (e *Endpoint) Choose(bool)
- func (e *Endpoint) Copy() endpoint.Endpoint
- func (e *Endpoint) LastUpdated() time.Time
- func (e *Endpoint) LoadFactor() float32
- func (e *Endpoint) LocalDC() bool
- func (e *Endpoint) Location() string
- func (e *Endpoint) NodeID() uint32
- func (e *Endpoint) OverrideHost() string
- func (e *Endpoint) String() string
- func (e *Endpoint) Touch(opts ...endpoint.Option)
Types ¶
type Conn ¶
type Conn struct { PingErr error AddrField string LocationField string NodeIDField uint32 State conn.State LocalDCField bool }
func (*Conn) Endpoint ¶
func (*Conn) GetState ¶
func (*Conn) Invoke ¶
func (c *Conn) Invoke( ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption, ) error
func (*Conn) IsState ¶
func (*Conn) LastUsage ¶
func (*Conn) NewStream ¶
func (c *Conn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption, ) (grpc.ClientStream, error)
func (*Conn) Park ¶
func (*Conn) Ping ¶
func (*Conn) SetState ¶
func (*Conn) Unban ¶
type Endpoint ¶
func (*Endpoint) Address ¶
func (*Endpoint) Choose ¶
func (*Endpoint) Copy ¶
func (*Endpoint) LastUpdated ¶
func (*Endpoint) LoadFactor ¶
func (*Endpoint) LocalDC ¶
Deprecated: LocalDC check "local" by compare endpoint location with discovery "selflocation" field. It work good only if connection url always point to local dc. Will be removed after Oct 2024. Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
func (*Endpoint) Location ¶
func (*Endpoint) NodeID ¶
func (*Endpoint) OverrideHost ¶
func (*Endpoint) String ¶
func (*Endpoint) Touch ¶
Source Files ¶
- Version
- v3.85.0
- Published
- Oct 21, 2024
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 6 minutes ago –
Tools for package owners.