Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option overrides behavior of Server.
func WithGracePeriod ¶
WithGracePeriod sets shutdown grace period for gRPC server. Server waits connections to drain for specified amount of time.
func WithListen ¶
WithListen sets address to listen for gRPC server. Server accepts incoming connections on given address.
func WithTLSConfig ¶
WithTLSConfig sets TLS configuration for gRPC server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(limiterService *limiter.LimiterService, logger *logrus.Logger, reg *prometheus.Registry, opts ...Option) *Server
func (*Server) ShouldRateLimit ¶
func (s *Server) ShouldRateLimit(ctx context.Context, req *pb.RateLimitRequest) (*pb.RateLimitResponse, error)
Click to show internal directories.
Click to hide internal directories.