grpc

package
v0.0.0-...-9c44629 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(s *Server)

func WithAddress

func WithAddress(address string) Option

func WithRegisterFunc

func WithRegisterFunc(opts ...RegisterFunc) Option

func WithServerOption

func WithServerOption(opts ...grpc.ServerOption) Option

func WithStreamInterceptor

func WithStreamInterceptor(interceptors ...grpc.StreamServerInterceptor) Option

func WithUnaryInterceptor

func WithUnaryInterceptor(interceptors ...grpc.UnaryServerInterceptor) Option

type RegisterFunc

type RegisterFunc func(s *grpc.Server)

type Server

type Server struct {
	ServerOptions            []grpc.ServerOption
	StreamServerInterceptors []grpc.StreamServerInterceptor
	UnaryServerInterceptors  []grpc.UnaryServerInterceptor
	RegisterFuncs            []RegisterFunc
	Server                   *grpc.Server
	Address                  string
}

func New

func New(opts ...Option) *Server

func (*Server) Run

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

func (*Server) Stop

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

Jump to

Keyboard shortcuts

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