package mock

import "github.com/ydb-platform/ydb-go-sdk/v3/internal/mock"

Index

Types

type Conn

type Conn struct {
	PingErr       error
	AddrField     string
	LocationField string
	NodeIDField   uint32
	State         conn.State
	LocalDCField  bool
}

func (*Conn) Endpoint

func (c *Conn) Endpoint() endpoint.Endpoint

func (*Conn) GetState

func (c *Conn) GetState() conn.State

func (*Conn) Invoke

func (c *Conn) Invoke(
	ctx context.Context,
	method string,
	args interface{},
	reply interface{},
	opts ...grpc.CallOption,
) error

func (*Conn) IsState

func (c *Conn) IsState(states ...conn.State) bool

func (*Conn) LastUsage

func (c *Conn) LastUsage() time.Time

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 (c *Conn) Park(ctx context.Context) (err error)

func (*Conn) Ping

func (c *Conn) Ping(ctx context.Context) error

func (*Conn) SetState

func (c *Conn) SetState(state conn.State) conn.State

func (*Conn) Unban

func (c *Conn) Unban() conn.State

type Endpoint

type Endpoint struct {
	AddrField     string
	LocationField string
	NodeIDField   uint32
	LocalDCField  bool
}

func (*Endpoint) Address

func (e *Endpoint) Address() string

func (*Endpoint) Choose

func (e *Endpoint) Choose(bool)

func (*Endpoint) Copy

func (e *Endpoint) Copy() endpoint.Endpoint

func (*Endpoint) LastUpdated

func (e *Endpoint) LastUpdated() time.Time

func (*Endpoint) LoadFactor

func (e *Endpoint) LoadFactor() float32

func (*Endpoint) LocalDC

func (e *Endpoint) LocalDC() bool

func (*Endpoint) Location

func (e *Endpoint) Location() string

func (*Endpoint) NodeID

func (e *Endpoint) NodeID() uint32

func (*Endpoint) String

func (e *Endpoint) String() string

func (*Endpoint) Touch

func (e *Endpoint) Touch(opts ...endpoint.Option)

Source Files

conn.go

Version
v3.44.0
Published
Apr 17, 2023
Platform
js/wasm
Imports
5 packages
Last checked
4 minutes ago

Tools for package owners.