Skip to content

Commit

Permalink
fix(kuma-cp): make metadata retrieve method public (#8918)
Browse files Browse the repository at this point in the history
fix(kuma-cp): make metdata retrieve method public

Signed-off-by: Lukasz Dziedziak <[email protected]>
  • Loading branch information
lukidzi authored Jan 18, 2024
1 parent 5da4ae9 commit dadce73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kds/util/client_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const clientIDKey = "client-id"
// ClientIDFromIncomingCtx returns the ID of the peer. Global has the ID
// "global" while zones have the zone name. This is also known as the peer ID.
func ClientIDFromIncomingCtx(ctx context.Context) (string, error) {
return metadataFromIncomingCtx(ctx, clientIDKey)
return MetadataFromIncomingCtx(ctx, clientIDKey)
}

func metadataFromIncomingCtx(ctx context.Context, key string) (string, error) {
func MetadataFromIncomingCtx(ctx context.Context, key string) (string, error) {
md, ok := metadata.FromIncomingContext(ctx)
if !ok {
return "", errors.New("metadata is not provided")
Expand Down

0 comments on commit dadce73

Please sign in to comment.