Documentation ¶
Index ¶
- func NewClusterServer(svc cluster.Cluster, logger logging.Logger) *clusterServer
- func NewRatelimitServer(svc RatelimitService, logger logging.Logger, authToken string) *ratelimitServer
- type Config
- type RatelimitService
- type Server
- func (s *Server) AddService(svc Service) error
- func (s *Server) EnablePprof(expectedUsername string, expectedPassword string)
- func (s *Server) Listen(addr string) error
- func (s *Server) Liveness(ctx context.Context, req *connect.Request[ratelimitv1.LivenessRequest]) (*connect.Response[ratelimitv1.LivenessResponse], error)
- func (s *Server) Shutdown() error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClusterServer ¶
func NewRatelimitServer ¶
func NewRatelimitServer(svc RatelimitService, logger logging.Logger, authToken string) *ratelimitServer
Types ¶
type RatelimitService ¶
type RatelimitService interface { Ratelimit(context.Context, *ratelimitv1.RatelimitRequest) (*ratelimitv1.RatelimitResponse, error) MultiRatelimit(context.Context, *ratelimitv1.RatelimitMultiRequest) (*ratelimitv1.RatelimitMultiResponse, error) PushPull(context.Context, *ratelimitv1.PushPullRequest) (*ratelimitv1.PushPullResponse, error) CommitLease(context.Context, *ratelimitv1.CommitLeaseRequest) (*ratelimitv1.CommitLeaseResponse, error) Mitigate(context.Context, *ratelimitv1.MitigateRequest) (*ratelimitv1.MitigateResponse, error) }
type Server ¶
func (*Server) AddService ¶
func (*Server) EnablePprof ¶
func (*Server) Liveness ¶
func (s *Server) Liveness(ctx context.Context, req *connect.Request[ratelimitv1.LivenessRequest]) (*connect.Response[ratelimitv1.LivenessResponse], error)
Click to show internal directories.
Click to hide internal directories.