mock

package
v3.65.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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(ctx context.Context, state conn.State) conn.State

func (*Conn) Unban

func (c *Conn) Unban(ctx context.Context) 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 added in v3.37.6

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 deprecated

func (e *Endpoint) LocalDC() bool

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 (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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL