grpcmetadata

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package grpcmetadata contains functions for reading and writing waypoint specific metadata to contexts, which is transmitted by RPC calls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRunner

func AddRunner(ctx context.Context, id string) context.Context

AddRunner adds gRPC metadata to an outgoing context to indicate that RPCs sent with the returned context having the given runner (specified by id) attached to the sending client, allow the server to target jobs back to the client that performed an RPC call.

func OutgoingRunnerId

func OutgoingRunnerId(ctx context.Context) (string, bool)

OutgoingRunnerId returns the runner id attached to the context as grpc Metadata. This is primarily used in tests, to validate that a context was set correctly.

func RunnerId

func RunnerId(ctx context.Context) (string, bool)

RunnerId returns the runner id attached to the incoming context as grpc Metadata. This would be set by the client to indicate there is a runner attached directly to it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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