You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
645 B
33 lines
645 B
package main
|
|
|
|
var _headerTemplate = `
|
|
// Code generated by kratos tool genbts. DO NOT EDIT.
|
|
|
|
NEWLINE
|
|
/*
|
|
Package {{.PkgName}} is a generated cache proxy package.
|
|
It is generated from:
|
|
ARGS
|
|
*/
|
|
NEWLINE
|
|
|
|
package {{.PkgName}}
|
|
|
|
import (
|
|
"context"
|
|
{{if .EnableBatch }}"sync"{{end}}
|
|
NEWLINE
|
|
"github.com/go-kratos/kratos/pkg/cache"
|
|
{{if .EnableBatch }}"github.com/go-kratos/kratos/pkg/sync/errgroup"{{end}}
|
|
{{.ImportPackage}}
|
|
NEWLINE
|
|
{{if .EnableSingleFlight}} "golang.org/x/sync/singleflight" {{end}}
|
|
)
|
|
|
|
{{if .UseBTS}}
|
|
var _ _bts
|
|
{{end }}
|
|
{{if .EnableSingleFlight}}
|
|
var cacheSingleFlights = [SFCOUNT]*singleflight.Group{SFINIT}
|
|
{{end }}
|
|
`
|
|
|