ketoctx

package
v0.8.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Options

func Options(options ...Option) *opts

Types

type Contextualizer

type Contextualizer interface {
	Network(ctx context.Context, network uuid.UUID) uuid.UUID
	Config(ctx context.Context, config *configx.Provider) *configx.Provider
}

type ContextualizerProvider

type ContextualizerProvider interface {
	Contextualizer() Contextualizer
}

type DefaultContextualizer

type DefaultContextualizer struct{}

func (*DefaultContextualizer) Config

func (*DefaultContextualizer) Network

func (d *DefaultContextualizer) Network(_ context.Context, network uuid.UUID) uuid.UUID

type Option

type Option func(o *opts)

func WithContextualizer

func WithContextualizer(ctxer Contextualizer) Option

func WithGRPCStreamInterceptors

func WithGRPCStreamInterceptors(i ...grpc.StreamServerInterceptor) Option

func WithGRPCUnaryInterceptors

func WithGRPCUnaryInterceptors(i ...grpc.UnaryServerInterceptor) Option

func WithHTTPMiddlewares

func WithHTTPMiddlewares(m ...func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)) Option

func WithLogger

func WithLogger(l *logrusx.Logger) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL