2019-05-14 13:57:02 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
var _headerTemplate = `
|
|
|
|
// Code generated by kratos tool mcgen. DO NOT EDIT.
|
|
|
|
|
|
|
|
NEWLINE
|
|
|
|
/*
|
|
|
|
Package {{.PkgName}} is a generated mc cache package.
|
|
|
|
It is generated from:
|
|
|
|
ARGS
|
|
|
|
*/
|
|
|
|
NEWLINE
|
|
|
|
|
|
|
|
package {{.PkgName}}
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"fmt"
|
|
|
|
{{if .UseStrConv}}"strconv"{{end}}
|
|
|
|
{{if .EnableBatch }}"sync"{{end}}
|
|
|
|
NEWLINE
|
2019-07-20 19:38:44 +08:00
|
|
|
"github.com/bilibili/kratos/pkg/stat/metric"
|
2019-05-14 13:57:02 +08:00
|
|
|
{{if .UseMemcached }}"github.com/bilibili/kratos/pkg/cache/memcache"{{end}}
|
|
|
|
{{if .EnableBatch }}"github.com/bilibili/kratos/pkg/sync/errgroup"{{end}}
|
|
|
|
"github.com/bilibili/kratos/pkg/log"
|
|
|
|
{{.ImportPackage}}
|
|
|
|
)
|
|
|
|
|
2019-07-20 19:38:44 +08:00
|
|
|
var (
|
|
|
|
_ _mc
|
|
|
|
_metricErrCount = metric.NewBusinessMetricCount("mc_error_total", "NAME")
|
|
|
|
)
|
2019-05-14 13:57:02 +08:00
|
|
|
`
|