Documentation ¶
Index ¶
- type Components
- type GRPCOptions
- type GRPCServer
- func (server GRPCServer) CheckStates(ctx context.Context, in *psc.LimitIDsByKeys) (*psc.StatesByKeysWithRequest, error)
- func (server GRPCServer) FinishRequest(ctx context.Context, in *psc.ResourcesWithRequest) (*empty.Empty, error)
- func (server GRPCServer) GetLimits(ctx context.Context, in *psc.LimitIDs) (*psc.Limits, error)
- func (server GRPCServer) GetLimitsAll(ctx context.Context, in *empty.Empty) (*psc.Limits, error)
- func (server GRPCServer) PeekStates(ctx context.Context, in *psc.LimitIDsByKeys) (*psc.StatesByKeysWithRequest, error)
- func (server GRPCServer) RemoveLimits(ctx context.Context, in *psc.LimitIDs) (*empty.Empty, error)
- func (server GRPCServer) RemoveLimitsAll(ctx context.Context, in *empty.Empty) (*empty.Empty, error)
- func (server *GRPCServer) Serve() error
- func (server GRPCServer) SetLimits(ctx context.Context, in *psc.Limits) (*emptypb.Empty, error)
- type HTTPOptions
- type HTTPServer
- type MuxServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Components ¶
type Components struct { Authenticator pa.Authenticator Limiter pl.Limiter Logger gsl.Log Listener net.Listener TLSCertFile string TLSKeyFile string }
Components contains the necessary server components.
func (*Components) CopyWithListener ¶
func (components *Components) CopyWithListener(listener net.Listener) Components
CopyWithListener attaches a listner to the associated server and returns a new copy.
type GRPCOptions ¶
type GRPCOptions struct {
Interceptors []grpc.UnaryServerInterceptor
}
GRPCOptions are gRPC optional server components.
type GRPCServer ¶
type GRPCServer struct { Components psc.LimiterServer Options *GRPCOptions }
GRPCServer is a gRCP implementation of Server.
func (GRPCServer) CheckStates ¶
func (server GRPCServer) CheckStates(ctx context.Context, in *psc.LimitIDsByKeys) (*psc.StatesByKeysWithRequest, error)
CheckStates implements limiter.CheckStates
func (GRPCServer) FinishRequest ¶
func (server GRPCServer) FinishRequest(ctx context.Context, in *psc.ResourcesWithRequest) (*empty.Empty, error)
FinishRequest implements limiter.FinishRequest
func (GRPCServer) GetLimitsAll ¶
GetLimitsAll implements limiter.GetLimitsAll
func (GRPCServer) PeekStates ¶
func (server GRPCServer) PeekStates(ctx context.Context, in *psc.LimitIDsByKeys) (*psc.StatesByKeysWithRequest, error)
PeekStates implements limiter.PeekStates
func (GRPCServer) RemoveLimits ¶
RemoveLimits implements limiter.RemoveLimits
func (GRPCServer) RemoveLimitsAll ¶
func (server GRPCServer) RemoveLimitsAll(ctx context.Context, in *empty.Empty) (*empty.Empty, error)
RemoveLimitsAll implements limiter.RemoveLimitsAll
func (*GRPCServer) Serve ¶
func (server *GRPCServer) Serve() error
Serve will run the edge in gRPC mode.
type HTTPOptions ¶
HTTPOptions are gRPC optional server components.
type HTTPServer ¶
type HTTPServer struct { Components Options *HTTPOptions }
HTTPServer is an HTTP implementation of Server.
func (HTTPServer) Serve ¶
func (server HTTPServer) Serve() error
Serve will run the edge in HTTP mode.
type MuxServer ¶
type MuxServer struct { Port string Components *Components GRPCOptions *GRPCOptions HTTPOptions *HTTPOptions }
MuxServer is a multiplexed implementation of Server.