clientconn

package
v1.13.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package clientconn - chain element for injecting a grpc.ClientConnInterface into the client chain

Package clientconn allows storing grpc.ClientConnInterface stored in per Connection.Id metadata

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context)

Delete deletes the grpc.ClientConnInterface stored in per Connection.Id metadata

func Load

func Load(ctx context.Context) (value grpc.ClientConnInterface, ok bool)

Load returns the grpc.ClientConnInterface stored in per Connection.Id metadata, or nil if no value is present. The ok result indicates whether value was found in the per Connection.Id metadata.

func LoadAndDelete

func LoadAndDelete(ctx context.Context) (value grpc.ClientConnInterface, ok bool)

LoadAndDelete deletes the grpc.ClientConnInterface stored in per Connection.Id metadata, returning the previous value if any. The loaded result reports whether the key was present.

func LoadOrStore

func LoadOrStore(ctx context.Context, cc grpc.ClientConnInterface) (value grpc.ClientConnInterface, ok bool)

LoadOrStore returns the existing grpc.ClientConnInterface stored in per Connection.Id metadata if present. Otherwise, it stores and returns the given grpc.ClientConnInterface. The loaded result is true if the value was loaded, false if stored.

func NewClient

NewClient - returns a clientconn chain element

func Store

func Store(ctx context.Context, cc grpc.ClientConnInterface)

Store sets the grpc.ClientConnInterface stored in per Connection.Id metadata.

Types

This section is empty.

Jump to

Keyboard shortcuts

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