grpc

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package grpc wraps google.golang.org/grpc

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hostname

func Hostname() string

func RemoteAddr

func RemoteAddr(ctx context.Context) string

func SplitHostPort

func SplitHostPort(addr string) (string, int64)

Types

type Server

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

func NewServer

func NewServer(cfg config.GrpcServerConfig, register func(s *grpc.Server)) (*Server, error)

func (*Server) GetLogger

func (srv *Server) GetLogger() *dlog.Logger

func (*Server) LoggerIdentity

func (srv *Server) LoggerIdentity(justCallMe func() dlog.Identity) dlog.Identity

func (*Server) Run

func (srv *Server) Run() error

func (*Server) RunWithContext

func (srv *Server) RunWithContext(ctx context.Context) error

func (*Server) SetLogger

func (srv *Server) SetLogger(logger *dlog.Logger)

func (*Server) Shutdown

func (srv *Server) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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