Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultAddress = ":0" DefaultName = "go.ebrick.server" DefaultVersion = "latest" )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Grpc GrpcServerConfig `yaml:"grpc"`
}
type GRPCOptions ¶
type GRPCOptions struct {
MaxConcurrentStreams uint32
Interceptor grpc.UnaryServerInterceptor
}
GRPCOptions holds gRPC-specific configuration options.
type GRPCServer ¶
type GRPCServer interface {
Options() Options
transport.Server
// RegisterServices allows registration of gRPC services
RegisterService(registerFunc func(s *grpc.Server))
}
GRPCServer defines the interface for a gRPC server.
func NewGRPCServer ¶
func NewGRPCServer(opts ...Option) GRPCServer
NewGRPCServer creates a new gRPC server with the given options.
type GrpcServerConfig ¶
type Option ¶
type Option func(*Options)
func WithAddress ¶
func WithInterceptor ¶
func WithInterceptor(interceptor grpc.UnaryServerInterceptor) Option
func WithVersion ¶
type Options ¶
type Options struct {
Address string
Name string
Version string
GRPCOptions GRPCOptions
}
type ServiceRegistrar ¶
type ServiceRegistrar interface {
RegisterGRPCServices(s GRPCServer)
}
Click to show internal directories.
Click to hide internal directories.