Documentation ¶
Index ¶
- Variables
- type App
- func (s *App) GetConfig() *config.Config
- func (s *App) GetLogger() logger.Logger
- func (s *App) RegisterService(sd *grpc.ServiceDesc, ss any) *App
- func (s *App) Restart()
- func (s *App) Run()
- func (s *App) Server() *grpc.Server
- func (s *App) Service() naming.Service
- func (s *App) Stop()
- func (s *App) Store(name string, st ...store.Store) store.Store
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ENV_DEV = "dev" //本地测试环境 ENV_DOCKER = "docker" //docker模式 ENV_PRODUCTION = "production" //正式环境 )
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App App
func (*App) RegisterService ¶ added in v0.0.4
func (s *App) RegisterService(sd *grpc.ServiceDesc, ss any) *App
type Option ¶
type Option func(o *Options)
Option Option
func StreamnIterceptor ¶ added in v0.0.6
func StreamnIterceptor(opt grpc.StreamServerInterceptor) Option
StreamInterceptor Stream server interceptor
func UnaryInterceptor ¶
func UnaryInterceptor(opt grpc.UnaryServerInterceptor) Option
UnaryInterceptor Unary server interceptor
type Options ¶
type Options struct {
Org, Name, Addr string
Config *config.Config
UnaryInterceptor []grpc.UnaryServerInterceptor
StreamInterceptor []grpc.StreamServerInterceptor
Server []grpc.ServerOption
}
Options 参数
Directories ¶
Path | Synopsis |
---|---|
api
|
|
debug
|
|
interceptor
|
|
ratelimit
Package ratelimit provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things.
|
Package ratelimit provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things. |
util
|
|
web
|
|
Click to show internal directories.
Click to hide internal directories.