streams

package
v0.11.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientStreamWithContext

type ClientStreamWithContext struct {
	Stream grpc.ClientStream
	Ctx    context.Context
}

func NewClientStreamWithContext

func NewClientStreamWithContext(stream grpc.ClientStream) *ClientStreamWithContext

func (*ClientStreamWithContext) CloseSend

func (s *ClientStreamWithContext) CloseSend() error

func (*ClientStreamWithContext) Context

func (*ClientStreamWithContext) Header

func (s *ClientStreamWithContext) Header() (metadata.MD, error)

func (*ClientStreamWithContext) RecvMsg

func (s *ClientStreamWithContext) RecvMsg(m interface{}) error

func (*ClientStreamWithContext) SendMsg

func (s *ClientStreamWithContext) SendMsg(m interface{}) error

func (*ClientStreamWithContext) SetContext

func (s *ClientStreamWithContext) SetContext(ctx context.Context)

func (*ClientStreamWithContext) Trailer

func (s *ClientStreamWithContext) Trailer() metadata.MD

type ContextSetter

type ContextSetter interface {
	SetContext(ctx context.Context)
}

type ContextStream

type ContextStream struct {
	// contains filtered or unexported fields
}

func (*ContextStream) Context

func (s *ContextStream) Context() context.Context

func (*ContextStream) RecvMsg

func (s *ContextStream) RecvMsg(m any) error

func (*ContextStream) SendMsg

func (s *ContextStream) SendMsg(m any) error

func (*ContextStream) SetContext

func (s *ContextStream) SetContext(ctx context.Context)

type ServerStreamWithContext

type ServerStreamWithContext struct {
	Stream grpc.ServerStream
	Ctx    context.Context
}

func NewServerStreamWithContext

func NewServerStreamWithContext(stream grpc.ServerStream) *ServerStreamWithContext

func (*ServerStreamWithContext) Context

func (*ServerStreamWithContext) RecvMsg

func (s *ServerStreamWithContext) RecvMsg(m interface{}) error

func (*ServerStreamWithContext) SendHeader

func (s *ServerStreamWithContext) SendHeader(md metadata.MD) error

func (*ServerStreamWithContext) SendMsg

func (s *ServerStreamWithContext) SendMsg(m interface{}) error

func (*ServerStreamWithContext) SetContext

func (s *ServerStreamWithContext) SetContext(ctx context.Context)

func (*ServerStreamWithContext) SetHeader

func (s *ServerStreamWithContext) SetHeader(md metadata.MD) error

func (*ServerStreamWithContext) SetTrailer

func (s *ServerStreamWithContext) SetTrailer(md metadata.MD)

type Stream

type Stream interface {
	Context() context.Context
	SendMsg(m any) error
	RecvMsg(m any) error
}

type StreamWrapper

type StreamWrapper interface {
	Stream
	ContextSetter
}

func NewStreamWithContext

func NewStreamWithContext(ctx context.Context, s Stream) StreamWrapper

Jump to

Keyboard shortcuts

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