Documentation ¶
Overview ¶
Package grpcsrv provides a default set of configuration for hosting a grpc server in a service.
Index ¶
Constants ¶
View Source
const (
// Port is the default gRPC port used in examples.
Port = 50051
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Addr string
}
Config represents configuration for the GRPC server.
type Server ¶
type Server struct { Connection *grpc.Server Now func() time.Time // contains filtered or unexported fields }
Server represents a collection of functions for starting and running an RPC server.
func New ¶
func New(config *Config, options ...grpc.ServerOption) *Server
New sets up a new grpc server.
Click to show internal directories.
Click to hide internal directories.