grpcx

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: MIT Imports: 21 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGrpcServerOption

func RegisterGrpcServerOption(name string, handler func(cnf *conf.Configuration) grpc.ServerOption) error

func RegisterGrpcUnaryInterceptor

func RegisterGrpcUnaryInterceptor(name string, handler func(*conf.Configuration) grpc.UnaryServerInterceptor) error

Types

type Option

type Option func(s *Server)

func Config

func Config(cnfops ...conf.Option) Option

func Configuration

func Configuration(configuration *conf.Configuration, configurationKey string) Option

func Use

func Use(configurable conf.Configurable, path string) Option

func UseLogger

func UseLogger() Option

func WithGrpcOption

func WithGrpcOption(opts ...grpc.ServerOption) Option

type Server

type Server struct {
	NodeInfo *registry.NodeInfo
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Server

func NewBuiltIn

func NewBuiltIn(opts ...Option) *Server

func (*Server) Apply

func (s *Server) Apply(cfg *conf.Configuration, path string)

func (*Server) ApplyOptions

func (s *Server) ApplyOptions(opts ...Option)

func (*Server) Engine

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

func (*Server) Run

func (s *Server) Run() error

func (*Server) Stop

func (s *Server) Stop() (err error)

type ServerConfig

type ServerConfig struct {
	Addr              string `json:"addr" yaml:"addr"`
	SSLCertificate    string `json:"ssl_certificate" yaml:"ssl_certificate"`
	SSLCertificateKey string `json:"ssl_certificate_key" yaml:"ssl_certificate_key"`
	Location          string `json:"location" yaml:"location"`
	Version           string `json:"version" yaml:"version"`
	// contains filtered or unexported fields
}

Directories

Path Synopsis
interceptor

Jump to

Keyboard shortcuts

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