grpcmetadata

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Overview

Package grpcmetadata provides chain elements that transfer grpc metadata between server and client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNetworkServiceEndpointRegistryClient

func NewNetworkServiceEndpointRegistryClient() registry.NetworkServiceEndpointRegistryClient

NewNetworkServiceEndpointRegistryClient - returns grpcmetadata NSE client that sends metadata to server and receives it back

func NewNetworkServiceEndpointRegistryServer

func NewNetworkServiceEndpointRegistryServer() registry.NetworkServiceEndpointRegistryServer

NewNetworkServiceEndpointRegistryServer - returns grpcmetadata NSE server that receives metadata from client and sends it back

func NewNetworkServiceRegistryClient

func NewNetworkServiceRegistryClient() registry.NetworkServiceRegistryClient

NewNetworkServiceRegistryClient - returns grpcmetadata NS client that sends metadata to server and receives it back

func NewNetworkServiceRegistryServer

func NewNetworkServiceRegistryServer() registry.NetworkServiceRegistryServer

NewNetworkServiceRegistryServer - returns grpcmetadata NS server that receives metadata from client and sends it back

func PathWithContext

func PathWithContext(ctx context.Context, path *Path) context.Context

PathWithContext puts Path to context

Types

type Path

type Path struct {
	Index        uint32
	PathSegments []*PathSegment
}

Path represents a private path that is passed via grpcmetadata during NS and NSE registration

func PathFromContext

func PathFromContext(ctx context.Context) *Path

PathFromContext returns Path from context. If path doesn't exist fuction returns empty Path

func (*Path) Clone

func (p *Path) Clone() *Path

Clone clones Path

func (*Path) GetCurrentPathSegment

func (p *Path) GetCurrentPathSegment() *PathSegment

GetCurrentPathSegment returns path.Index segment if it exists

type PathSegment

type PathSegment struct {
	Token string `json:"token"`
}

PathSegment represents segment of a private path

Jump to

Keyboard shortcuts

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