grpc

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler grpc.ServiceDesc

func (Handler) GetServiceDesc

func (h Handler) GetServiceDesc() *grpc.ServiceDesc

type Options

type Options func(*Service)

type Service

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

func New

func New(address string, opts ...Options) (*Service, error)

func (*Service) Init

func (gs *Service) Init() error

func (*Service) RegisterService

func (gs *Service) RegisterService(desc *grpc.ServiceDesc, impl interface{})

func (*Service) Run

func (gs *Service) Run(ctx context.Context) error

type WrappedServerStream

type WrappedServerStream struct {
	grpc.ServerStream
	// WrappedContext is the wrapper's own Context. You can assign it.
	WrappedContext context.Context
}

WrappedServerStream is a thin wrapper around grpc.ServerStream that allows modifying context.

func WrapServerStream

func WrapServerStream(stream grpc.ServerStream) *WrappedServerStream

WrapServerStream returns a ServerStream that has the ability to overwrite context.

func (*WrappedServerStream) Context

func (w *WrappedServerStream) Context() context.Context

Context returns the wrapper's WrappedContext, overwriting the nested grpc.ServerStream.Context()

Jump to

Keyboard shortcuts

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