Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstrumentingMiddleware ¶
func InstrumentingMiddleware(duration metrics.Histogram) kit.Middleware
InstrumentingMiddleware returns an endpoint middleware that records the duration of each invocation to the passed histogram. The middleware adds a single field: "success", which is "true" if no error is returned, and "false" otherwise.
func LoggingMiddleware ¶
func LoggingMiddleware(logger kitlog.Logger) kit.Middleware
LoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.
func MakeFindEndpoint ¶
func MakeFindEndpoint(svc api.UserServer) kit.Endpoint
func MakeUpdateEndpoint ¶
func MakeUpdateEndpoint(svc api.UserServer) kit.Endpoint
Types ¶
type Endpoints ¶
Endpoints User endpoints
func New ¶
func New(svc api.UserServer, mdw map[string][]kit.Middleware) Endpoints
func (Endpoints) Find ¶
func (e Endpoints) Find(ctx context.Context, in *api.FindUserRequest) (*api.FindUserReply, error)
func (Endpoints) Update ¶
func (e Endpoints) Update(ctx context.Context, in *api.UpdateUserRequest) (*api.UpdateUserReply, error)
Click to show internal directories.
Click to hide internal directories.