Documentation ¶
Index ¶
- func SetName(name string)
- type App
- func (a *App) Close()
- func (a *App) Info() *Info
- func (a *App) Logger() *zap.Logger
- func (a *App) Router() chi.Router
- func (a *App) Run(impl ...transport.Service) error
- func (a *App) TraceLogger() tracelog.Logger
- func (a *App) Tracer() *tracing.Tracer
- func (a *App) WithRunOptions(opts ...app.RunOption) *App
- type Info
- type Option
- func AddLogCaller() Option
- func AddLogStacktrace(level string) Option
- func WithAdminHTTP(port uint16) Option
- func WithCORSAllowedAuthentication(allow bool) Option
- func WithCORSAllowedHeaders(headers []string) Option
- func WithCORSAllowedOrigins(origins []string) Option
- func WithExitSignals(sig ...os.Signal) Option
- func WithLogField(key string, value interface{}) Option
- func WithPublicGRPc(port uint16) Option
- func WithPublicHTTP(port uint16) Option
- type RunOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) TraceLogger ¶
type Option ¶
func AddLogCaller ¶
func AddLogCaller() Option
AddLogCaller configures the Logger to annotate each message with the filename and line number of zap's caller. See also WithCaller.
func AddLogStacktrace ¶
AddLogStacktrace configures the Logger to record a stack trace for all messages at or above a given level.
func WithAdminHTTP ¶
func WithCORSAllowedAuthentication ¶ added in v0.2.1
WithCORSAllowedAuthentication sets if HTTP client allows authentication like cookies, SSL certs and HTTP basic auth.
func WithCORSAllowedHeaders ¶ added in v0.2.1
WithCORSAllowedHeaders sets a list of non simple headers the HTTP client is allowed to use with cross-domain requests. If the special "*" value is present in the list, all headers will be allowed. Default value is [] but "Origin" is always appended to the list.
func WithCORSAllowedOrigins ¶ added in v0.2.1
WithCORSAllowedOrigins sets allowed origin domains for cross-domain requests. If the special "*" value is present in the list, all origins will be allowed. An origin may contain a wildcard (*) to replace 0 or more characters (i.e.: http://*.domain.com). Usage of wildcards implies a small performance penality. Only one wildcard can be used per origin. Default option enable CORS for requests on admin port.
func WithExitSignals ¶
func WithLogField ¶
WithLogField adds field to the Logger.
func WithPublicGRPc ¶
func WithPublicHTTP ¶
type RunOption ¶
func WithTLSConfig ¶
func WithTLSKeyPair ¶
func WithUnaryInterceptor ¶
func WithUnaryInterceptor(interceptor grpc.UnaryServerInterceptor) RunOption
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
protoc-gen-tron
Module
|
|
tron
Module
|
|
example
module
|
|
internal
|
|
admin
Package swagger generated by go-bindata.// sources: data/favicon-16x16.png data/favicon-32x32.png data/index.html data/oauth2-redirect.html data/swagger-ui-bundle.js data/swagger-ui-standalone-preset.js data/swagger-ui.css data/swagger-ui.js
|
Package swagger generated by go-bindata.// sources: data/favicon-16x16.png data/favicon-32x32.png data/index.html data/oauth2-redirect.html data/swagger-ui-bundle.js data/swagger-ui-standalone-preset.js data/swagger-ui.css data/swagger-ui.js |