Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidRequest = errs.NewUserError(errors.New("invalid request"))
ErrInvalidRequest is returned when the request fails validation. This error should be mapped to codes.InvalidArgument at the gRPC layer.
Functions ¶
func IsInvalidRequest ¶
IsInvalidRequest returns true if any error in the error chain is ErrInvalidRequest.
Types ¶
type LandController ¶
type LandController struct {
// contains filtered or unexported fields
}
LandController handles land business logic for the gateway
func NewLandController ¶
func NewLandController(logger *zap.SugaredLogger, scope tally.Scope, counter counter.Counter, requestLogStore storage.RequestLogStore, registry consumer.TopicRegistry) *LandController
NewLandController creates a new instance of the gateway land controller. The controller publishes land requests to the topic registered under consumer.TopicKeyStart in the registry.
func (*LandController) Land ¶
func (c *LandController) Land(ctx context.Context, req *pb.LandRequest) (*pb.LandResponse, error)
Land handles the land request and returns a response
type PingController ¶
type PingController struct {
// contains filtered or unexported fields
}
PingController handles ping business logic for the gateway
func NewPingController ¶
func NewPingController(logger *zap.Logger, scope tally.Scope) *PingController
NewPingController creates a new instance of the gateway ping controller
func (*PingController) Ping ¶
func (c *PingController) Ping(ctx context.Context, req *pb.PingRequest) (*pb.PingResponse, error)
Ping handles the ping request and returns a response