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 ¶
- func Delete(ctx context.Context)
- func Load(ctx context.Context) (value grpc.ClientConnInterface, ok bool)
- func LoadAndDelete(ctx context.Context) (value grpc.ClientConnInterface, ok bool)
- func LoadOrStore(ctx context.Context, cc grpc.ClientConnInterface) (value grpc.ClientConnInterface, ok bool)
- func NewClient(cc grpc.ClientConnInterface) networkservice.NetworkServiceClient
- func Store(ctx context.Context, cc grpc.ClientConnInterface)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
func NewClient(cc grpc.ClientConnInterface) networkservice.NetworkServiceClient
NewClient - returns a clientconn chain element
Types ¶
This section is empty.