Versions in this module Expand all Collapse all v1 v1.0.0 Mar 24, 2023 Changes in this version + var UnableToGetPort = errors.New("unable to get port") + var UnavailableAddr = errors.New("unavailable addr") + type Option func(o *options) + func WithAddr(addr string) Option + func WithGRPCOptions(opts ...grpc.ServerOption) Option + func WithListener(listener net.Listener) Option + func WithLogger(logger xlog.Logger) Option + func WithMetadata(metadata map[string]string) Option + func WithMiddlewares(mws ...middleware.Middleware) Option + func WithName(name string) Option + func WithNetwork(network string) Option + func WithRegistrar(registrar sd.Registrar) Option + func WithTLSConfig(tls *tls.Config) Option + func WithTimeout(timeout time.Duration) Option + type Server struct + func New(optFns ...Option) (*Server, error) + func (s *Server) GracefulStop() + func (s *Server) Healthz(ctx context.Context) bool + func (s *Server) Offline(ctx context.Context) error + func (s *Server) Online(ctx context.Context) error + func (s *Server) Start() (err error) + func (s *Server) Stop() + func (s *Server) Use(selector string, mws ...middleware.Middleware)