// ConfigHandler sets up the server that powers the stat service
// That is, it configures the mux paths to access the service
ConfigHandler sets up the server that powers the stat service
That is, it configures the mux paths to access the service
// ConfigHandler sets up the server that powers the stat service // That is it configures the mux paths to access the service
func ConfigHandler(c *Options) {
	opts := []kithttp.ServerOption{
		kithttp.ServerBefore(transaction.Capture(c.Log)),
		kithttp.ServerErrorEncoder(transaction.ErrorLogEncoder(transaction.GetLogger, encodeError)),
		kithttp.ServerFinalizer(transaction.Log(c.Log, c.ReducedLoggingResponseCodes)),
	}
	statHandler := kithttp.NewServer(
		makeStatEndpoint(c.S),
		decodeRequest,
		encodeResponse,
		opts...,
	)
	c.APIRouter.Handle("/device/{deviceid}/stat", c.Authenticate.Then(transaction.Welcome(statHandler))).
		Methods(http.MethodGet)
}
func ConfigHandler ( c * Options ) { opts := [ ] kithttp . ServerOption { kithttp . ServerBefore ( transaction . Capture ( c . Log ) ) , kithttp . ServerErrorEncoder ( transaction . ErrorLogEncoder ( transaction . GetLogger , encodeError ) ) , kithttp . ServerFinalizer ( transaction . Log ( c . Log , c . ReducedLoggingResponseCodes ) ) , } statHandler := kithttp . NewServer ( makeStatEndpoint ( c . S ) , decodeRequest , encodeResponse , opts ... , ) c . APIRouter . Handle ( " " , c . Authenticate . Then ( transaction . Welcome ( statHandler ) ) ) . Methods ( http . MethodGet ) }
ConfigHandler sets up the server that powers the stat service
That is, it configures the mux paths to access the service
ConfigHandler sets up the server that powers the stat service That is it configures the mux paths to access the service