kubernetes/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/context.go

const MetadataHeaderPrefix

const MetadataPrefix

const MetadataTrailerPrefix

const metadataGrpcTimeout

const metadataHeaderBinarySuffix

const xForwardedFor

const xForwardedHost

var DefaultContextTimeout

func decodeBinHeader(v string) ([]byte, error) {}

/*
AnnotateContext adds context information such as metadata from the request.

At a minimum, the RemoteAddr is included in the fashion of "X-Forwarded-For",
except that the forwarded destination is not another HTTP service but rather
a gRPC service.
*/
func AnnotateContext(ctx context.Context, mux *ServeMux, req *http.Request) (context.Context, error) {}

// AnnotateIncomingContext adds context information such as metadata from the request.
// Attach metadata as incoming context.
func AnnotateIncomingContext(ctx context.Context, mux *ServeMux, req *http.Request) (context.Context, error) {}

func annotateContext(ctx context.Context, mux *ServeMux, req *http.Request) (context.Context, metadata.MD, error) {}

type ServerMetadata

type serverMetadataKey

// NewServerMetadataContext creates a new context with ServerMetadata
func NewServerMetadataContext(ctx context.Context, md ServerMetadata) context.Context {}

// ServerMetadataFromContext returns the ServerMetadata in ctx
func ServerMetadataFromContext(ctx context.Context) (md ServerMetadata, ok bool) {}

type ServerTransportStream

// Method returns the method for the stream.
func (s *ServerTransportStream) Method() string {}

// Header returns the header metadata of the stream.
func (s *ServerTransportStream) Header() metadata.MD {}

// SetHeader sets the header metadata.
func (s *ServerTransportStream) SetHeader(md metadata.MD) error {}

// SendHeader sets the header metadata.
func (s *ServerTransportStream) SendHeader(md metadata.MD) error {}

// Trailer returns the cached trailer metadata.
func (s *ServerTransportStream) Trailer() metadata.MD {}

// SetTrailer sets the trailer metadata.
func (s *ServerTransportStream) SetTrailer(md metadata.MD) error {}

func timeoutDecode(s string) (time.Duration, error) {}

func timeoutUnitToDuration(u uint8) (d time.Duration, ok bool) {}

// isPermanentHTTPHeader checks whether hdr belongs to the list of
// permanent request headers maintained by IANA.
// http://www.iana.org/assignments/message-headers/message-headers.xml
func isPermanentHTTPHeader(hdr string) bool {}