peer

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCPeer

func GRPCPeer(ctx context.Context, p *Peer) context.Context

GRPCPeer is used for client to get remote service address

Types

type Peer

type Peer struct {
	// Addr is the peer address.
	Addr net.Addr
}

Peer contains the information of the peer for an RPC, such as the address and authentication information.

func GetPeerFromContext

func GetPeerFromContext(ctx context.Context) (peer *Peer, ok bool)

Jump to

Keyboard shortcuts

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