rpc

package
v0.0.0-...-808d7f4 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Set = wire.NewSet(
	New,
	Params{},
)

Set is a Wire provider set that produces a *Server.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr string
}

Config is configurations for the gRPC server.

type Params

type Params struct {
	Config       Config
	Services     []ServiceImpl
	Interceptors []grpc.UnaryServerInterceptor
}

Params is a set of parameters for New.

type Server

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

Server is a grpc server with basic functionalities.

func New

func New(params *Params) *Server

New creates a new gRPC server.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

ListenAndServe starts the server.

type ServiceImpl

type ServiceImpl interface {
	Register(*grpc.Server)
}

ServiceImpl is a server implementing a gRPC service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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