Documentation ¶
Index ¶
- Constants
- func CreateServiceNameInterceptor(serviceName string) (grpc.UnaryServerInterceptor, grpc.StreamServerInterceptor)
- func GetServiceNameFromIncomingContext(ctx context.Context) (string, error)
- func GetServiceNameFromStream(stream grpc.ServerStream) (string, error)
- type GrpcBidiStreamServer
- type PeekableStreamServer
Constants ¶
View Source
const ServiceNameKey = "x-nitric-service-name"
Variables ¶
This section is empty.
Functions ¶
func CreateServiceNameInterceptor ¶
func CreateServiceNameInterceptor(serviceName string) (grpc.UnaryServerInterceptor, grpc.StreamServerInterceptor)
func GetServiceNameFromIncomingContext ¶
GetServiceNameFromIncomingContext extracts the nitric service name from the incoming context of a grpc request
func GetServiceNameFromStream ¶
func GetServiceNameFromStream(stream grpc.ServerStream) (string, error)
GetServiceNameFromStream extracts the nitric service name from the incoming context of a grpc stream
Types ¶
type GrpcBidiStreamServer ¶
type PeekableStreamServer ¶
type PeekableStreamServer[ServerMessage any, ClientMessage any] struct { GrpcBidiStreamServer[ServerMessage, ClientMessage] // contains filtered or unexported fields }
func NewPeekableStreamServer ¶
func NewPeekableStreamServer[ServerMessage any, ClientMessage any](stream GrpcBidiStreamServer[ServerMessage, ClientMessage]) *PeekableStreamServer[ServerMessage, ClientMessage]
func (*PeekableStreamServer[ServerMessage, ClientMessage]) Peek ¶
func (s *PeekableStreamServer[ServerMessage, ClientMessage]) Peek() (ClientMessage, error)
func (*PeekableStreamServer[ServerMessage, ClientMessage]) Recv ¶
func (s *PeekableStreamServer[ServerMessage, ClientMessage]) Recv() (ClientMessage, error)
Click to show internal directories.
Click to hide internal directories.