grpcutils

package
v0.0.0-...-55bd4f4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectClientConn

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

func DirectDial

func DirectDial(targetUrl string, opts ...grpc.DialOption) (conn *DirectClientConn, err error)

func DirectDialContext

func DirectDialContext(ctx context.Context, targetUrl string, opts ...grpc.DialOption) (conn *DirectClientConn, err error)

func (*DirectClientConn) Close

func (cc *DirectClientConn) Close() error

func (*DirectClientConn) Invoke

func (cc *DirectClientConn) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error

impl ClientConnInterface

func (*DirectClientConn) NewStream

func (cc *DirectClientConn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)

impl ClientConnInterface

type Server

type Server struct {
	HealthAddr string

	RegisterService func(context.Context, *Server) (closeFn func(), err error)

	HttpServerRun          func(ctx context.Context) error
	HttpServerGracefulStop func()
	// contains filtered or unexported fields
}

func NewServer

func NewServer(log *logger.Logger, serverName string, disableHealth bool) *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context, addr string)

func (*Server) ServerGRPC

func (s *Server) ServerGRPC() *grpc.Server

func (*Server) SetServingStatus

func (s *Server) SetServingStatus(servingStatus grpc_health_v1.HealthCheckResponse_ServingStatus)

Jump to

Keyboard shortcuts

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