micro

package
v0.0.0-...-55327a3 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoveryWithLogger

func RecoveryWithLogger(options *serverOptions) grpc_recovery.RecoveryHandlerFunc

Types

type Option

type Option func(*serverOptions)

func WithAuthFunc

func WithAuthFunc(authFunc grpc_auth.AuthFunc) Option

func WithGrpcOption

func WithGrpcOption(option grpc.ServerOption) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithPrometheus

func WithPrometheus(listen string) Option

func WithRegistry

func WithRegistry(register registry.Registry, serviceName string, listen string) Option

func WithStreamServerInterceptor

func WithStreamServerInterceptor(intercoptors ...grpc.StreamServerInterceptor) Option

func WithTracer

func WithTracer(tracer opentracing.Tracer) Option

func WithUnaryServerInterceptor

func WithUnaryServerInterceptor(intercoptors ...grpc.UnaryServerInterceptor) Option

type Server

type Server struct {
	Name   string
	Option *serverOptions
}

func NewServer

func NewServer(name string, opts ...Option) (*Server, error)

func (Server) BuildGrpcServer

func (t Server) BuildGrpcServer() *grpc.Server

func (Server) Run

func (t Server) Run(rpcSrv *grpc.Server, listen string) error

func (Server) StartPrometheus

func (t Server) StartPrometheus(rpcSrv *grpc.Server)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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