Documentation
¶
Index ¶
- Variables
- type Authenticator
- type Connection
- func (c *Connection) Alive() bool
- func (c *Connection) Close() error
- func (c *Connection) ID() uint64
- func (c *Connection) Invoke(ctx context.Context, method string, args any, reply any, ...) error
- func (c *Connection) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, ...) (grpc.ClientStream, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface {
GetToken() string
}
type Connection ¶
type Connection struct { *grpc.ClientConn // contains filtered or unexported fields }
func NewConnection ¶
func NewConnection( ctx context.Context, endpoint string, creds credentials.TransportCredentials, auth Authenticator, db string, endpointID uint64, ) (*Connection, error)
func (*Connection) Alive ¶
func (c *Connection) Alive() bool
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) ID ¶ added in v0.0.2
func (c *Connection) ID() uint64
func (*Connection) Invoke ¶
func (c *Connection) Invoke(ctx context.Context, method string, args any, reply any, opts ...grpc.CallOption) error
func (*Connection) NewStream ¶
func (c *Connection) NewStream( ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption, ) (grpc.ClientStream, error)
Click to show internal directories.
Click to hide internal directories.