grpc

package
v0.0.0-...-0451d2a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(ctx context.Context, addr string, opts ...ServerOption) (*Server, error)

func (*Server) RegisterService

func (s *Server) RegisterService(sd *ggrpc.ServiceDesc, ss interface{})

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

type ServerConfig

type ServerConfig struct {
	Addr string
	// contains filtered or unexported fields
}

type ServerOption

type ServerOption func(*ServerConfig)

func WithStreamServerInterceptor

func WithStreamServerInterceptor(i ...ggrpc.StreamServerInterceptor) ServerOption

func WithUnaryServerInterceptor

func WithUnaryServerInterceptor(i ...ggrpc.UnaryServerInterceptor) ServerOption

Jump to

Keyboard shortcuts

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