Documentation ¶
Index ¶
- func Options(options ...Option) *opts
- type Contextualizer
- type ContextualizerProvider
- type DefaultContextualizer
- type Option
- func WithContextualizer(ctxer Contextualizer) Option
- func WithExtraMigrations(o ...fs.FS) Option
- func WithGRPCStreamInterceptors(i ...grpc.StreamServerInterceptor) Option
- func WithGRPCUnaryInterceptors(i ...grpc.UnaryServerInterceptor) Option
- func WithHTTPMiddlewares(m ...func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)) Option
- func WithLogger(l *logrusx.Logger) Option
- func WithMigrationOptions(o ...popx.MigrationBoxOption) Option
- func WithReadinessCheck(name string, rc healthx.ReadyChecker) Option
- func WithTracerWrapper(wrapper TracerWrapper) Option
- type TracerWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Contextualizer ¶
type ContextualizerProvider ¶
type ContextualizerProvider interface {
Contextualizer() Contextualizer
}
type DefaultContextualizer ¶
type DefaultContextualizer struct{}
type Option ¶
type Option func(o *opts)
func WithContextualizer ¶
func WithContextualizer(ctxer Contextualizer) Option
WithContextualizer sets the contextualizer.
func WithExtraMigrations ¶
WithExtraMigrations adds additional database migrations.
func WithGRPCStreamInterceptors ¶
func WithGRPCStreamInterceptors(i ...grpc.StreamServerInterceptor) Option
WithGRPCStreamInterceptors adds gRPC stream interceptors to the list of gRPC stream interceptors.
func WithGRPCUnaryInterceptors ¶
func WithGRPCUnaryInterceptors(i ...grpc.UnaryServerInterceptor) Option
WithGRPCUnaryInterceptors adds gRPC unary interceptors to the list of gRPC interceptors.
func WithHTTPMiddlewares ¶
func WithHTTPMiddlewares(m ...func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)) Option
WithHTTPMiddlewares adds HTTP middlewares to the list of HTTP middlewares.
func WithMigrationOptions ¶
func WithMigrationOptions(o ...popx.MigrationBoxOption) Option
WithMigrationOptions adds migration options to the list of migration options.
func WithReadinessCheck ¶
func WithReadinessCheck(name string, rc healthx.ReadyChecker) Option
WithReadinessCheck adds a new readness health checker to the list of checkers. Can be called multiple times. If the name is already taken, the checker will be overwritten.
func WithTracerWrapper ¶
func WithTracerWrapper(wrapper TracerWrapper) Option
WithTracerWrapper sets a function that wraps the tracer.