rpc

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialClientConnPlaintext

func DialClientConnPlaintext(addr string) (*grpc.ClientConn, error)

DialClientConnPlaintext -

func MustDialClientConnPlaintext

func MustDialClientConnPlaintext(addr string) *grpc.ClientConn

MustDialClientConnPlaintext -

Types

type ClientConns

type ClientConns interface {
	//  GetClientConn - A ClientConn can safely be accessed concurrently.
	// https://github.com/grpc/grpc-go/blob/master/Documentation/concurrency.md
	GetClientConn(svcName string) *grpc.ClientConn
	// CloseAll -
	CloseAll()
}

ClientConns -

func MustNewClientConns

func MustNewClientConns(config *nconf.Config) ClientConns

MustNewClientConns -

func NewClientConns

func NewClientConns(config *nconf.Config) (ClientConns, error)

NewClientConns -

type Server

type Server interface {
	graceful.ShutdownServer

	GRPCServer() *grpc.Server
}

Server -

func MustNewServer

func MustNewServer(config *nconf.Config, opt ...ServerOption) Server

MustNewServer -

func NewServer

func NewServer(config *nconf.Config, opt ...ServerOption) (Server, error)

NewServer -

type ServerOption

type ServerOption func(*serverOptions)

ServerOption -

func MetricsServerOption added in v0.2.1

func MetricsServerOption(s nmetrics.Server) ServerOption

MetricsServerOption -

func StreamServerInterceptorOption added in v0.2.1

func StreamServerInterceptorOption(interceptors ...grpc.StreamServerInterceptor) ServerOption

StreamServerInterceptorOption -

func UnaryServerInterceptorOption added in v0.2.1

func UnaryServerInterceptorOption(interceptors ...grpc.UnaryServerInterceptor) ServerOption

UnaryServerInterceptorOption -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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