options

package
v0.0.0-...-8944a85 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractCustomLogger

func ExtractCustomLogger(options ...WithOption) (customLogger zerolog.Logger, found bool)

ExtractCustomLogger can be used to extract the custom logger

func ExtractCustomLoggerOrDefaultToGlobal

func ExtractCustomLoggerOrDefaultToGlobal(options ...WithOption) (customLogger zerolog.Logger)

ExtractCustomLoggerOrDefaultToGlobal can be used to extract the custom logger or use the global log.Logger if not found

func ExtractPassLoggerToModel

func ExtractPassLoggerToModel(options ...WithOption) (passLogger bool, found bool)

ExtractPassLoggerToModel to extract the flag indicating that model should be passed to Model

func ExtractReceiveTimeout

func ExtractReceiveTimeout(options ...WithOption) (receiveDuration time.Duration, found bool)

ExtractReceiveTimeout to extract the receive-timeout for reading operations. Defaults to 10 seconds

func ExtractTraceDefaultMessageCodecWorker

func ExtractTraceDefaultMessageCodecWorker(options ...WithOption) (traceWorkers bool, found bool)

ExtractTraceDefaultMessageCodecWorker to extract the flag indicating to trace default message codec workers

func ExtractTraceTransactionManagerTransactions

func ExtractTraceTransactionManagerTransactions(options ...WithOption) (traceTransactions bool, found bool)

ExtractTraceTransactionManagerTransactions to extract the flag indicating to trace transaction manager transactions

func ExtractTracerWorkers

func ExtractTracerWorkers(_options ...WithOption) (traceWorkers bool, found bool)

ExtractTracerWorkers returns the value from WithExecutorOptionTracerWorkers

func ExtractTransactionManagerWorkers

func ExtractTransactionManagerWorkers(options ...WithOption) (traceWorkers bool, found bool)

ExtractTransactionManagerWorkers to extract the flag indicating to trace transaction manager workers

func GetLoggerContextForModel

func GetLoggerContextForModel(ctx context.Context, log zerolog.Logger, options ...WithOption) context.Context

GetLoggerContextForModel returns a log context if the WithPassLoggerToModel WithOption is set

Types

type DiscoveryOptionDeviceName

type DiscoveryOptionDeviceName interface {
	GetDeviceName() string
}

func FilterDiscoveryOptionsDeviceName

func FilterDiscoveryOptionsDeviceName(options []WithDiscoveryOption) []DiscoveryOptionDeviceName

type DiscoveryOptionLocalAddress

type DiscoveryOptionLocalAddress interface {
	GetLocalAddress() string
}

func FilterDiscoveryOptionsLocalAddress

func FilterDiscoveryOptionsLocalAddress(options []WithDiscoveryOption) []DiscoveryOptionLocalAddress

type DiscoveryOptionProtocol

type DiscoveryOptionProtocol interface {
	GetProtocolName() string
}

func FilterDiscoveryOptionsProtocol

func FilterDiscoveryOptionsProtocol(options []WithDiscoveryOption) []DiscoveryOptionProtocol

type DiscoveryOptionProtocolSpecific

type DiscoveryOptionProtocolSpecific interface {
	GetKey() string
	GetValue() any
}

func FilterDiscoveryOptionProtocolSpecific

func FilterDiscoveryOptionProtocolSpecific(options []WithDiscoveryOption) []DiscoveryOptionProtocolSpecific

type DiscoveryOptionRemoteAddress

type DiscoveryOptionRemoteAddress interface {
	GetRemoteAddress() string
}

func FilterDiscoveryOptionsRemoteAddress

func FilterDiscoveryOptionsRemoteAddress(options []WithDiscoveryOption) []DiscoveryOptionRemoteAddress

type DiscoveryOptionTransport

type DiscoveryOptionTransport interface {
	GetTransportName() string
}

func FilterDiscoveryOptionsTransport

func FilterDiscoveryOptionsTransport(options []WithDiscoveryOption) []DiscoveryOptionTransport

type Option

type Option struct {
}

Option is a marker struct which can be used to mark an option

type WithDiscoveryOption

type WithDiscoveryOption interface {
	// contains filtered or unexported methods
}

WithDiscoveryOption is a marker interface for options regarding discovery

func WithDiscoveryOptionDeviceName

func WithDiscoveryOptionDeviceName(deviceName string) WithDiscoveryOption

func WithDiscoveryOptionLocalAddress

func WithDiscoveryOptionLocalAddress(localAddress string) WithDiscoveryOption

func WithDiscoveryOptionProtocol

func WithDiscoveryOptionProtocol(protocolName string) WithDiscoveryOption

func WithDiscoveryOptionProtocolSpecific

func WithDiscoveryOptionProtocolSpecific(key string, value any) WithDiscoveryOption

func WithDiscoveryOptionRemoteAddress

func WithDiscoveryOptionRemoteAddress(remoteAddress string) WithDiscoveryOption

func WithDiscoveryOptionTransport

func WithDiscoveryOptionTransport(transportName string) WithDiscoveryOption

type WithOption

type WithOption interface {
	// contains filtered or unexported methods
}

WithOption is a marker interface for options supplied by the builders like WithDefaultTtl

func WithCustomLogger

func WithCustomLogger(logger zerolog.Logger) WithOption

WithCustomLogger is a global option to supply a custom logger

func WithExecutorOptionTracerWorkers

func WithExecutorOptionTracerWorkers(traceWorkers bool) WithOption

WithExecutorOptionTracerWorkers sets a flag which extends logging for workers

func WithPassLoggerToModel

func WithPassLoggerToModel(passLogger bool) WithOption

WithPassLoggerToModel enables passing of log to the model

func WithReceiveTimeout

func WithReceiveTimeout(timeout time.Duration) WithOption

WithReceiveTimeout set's a timeout for a receive-operation (similar to SO_RCVTIMEO)

func WithTraceDefaultMessageCodecWorker

func WithTraceDefaultMessageCodecWorker(traceWorkers bool) WithOption

WithTraceDefaultMessageCodecWorker enables trace default message codec worker

func WithTraceTransactionManagerTransactions

func WithTraceTransactionManagerTransactions(traceTransactions bool) WithOption

WithTraceTransactionManagerTransactions enables trace transaction manager transactions

func WithTraceTransactionManagerWorkers

func WithTraceTransactionManagerWorkers(traceWorkers bool) WithOption

WithTraceTransactionManagerWorkers enables trace transaction manager workers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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