Documentation
¶
Index ¶
- Constants
- type PlcConnectionCache
- type WithConnectionCacheOption
- func WithCustomLogger(logger zerolog.Logger) WithConnectionCacheOption
- func WithLogger(logger zerolog.Logger) WithConnectionCacheOptiondeprecated
- func WithMaxLeaseTime(maxLeaseTime time.Duration) WithConnectionCacheOption
- func WithMaxWaitTime(maxWaitTime time.Duration) WithConnectionCacheOption
- func WithTracer() WithConnectionCacheOption
Constants ¶
View Source
const ( StateInitialized cachedPlcConnectionState = iota StateIdle StateInUse StateInvalid )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlcConnectionCache ¶
type PlcConnectionCache interface {
GetConnection(ctx context.Context, connectionString string) (plc4go.PlcConnection, error)
Close() error
}
func NewPlcConnectionCache ¶
func NewPlcConnectionCache(driverManager plc4go.PlcDriverManager, withConnectionCacheOptions ...WithConnectionCacheOption) PlcConnectionCache
type WithConnectionCacheOption ¶
type WithConnectionCacheOption func(plcConnectionCache *plcConnectionCache)
func WithCustomLogger ¶
func WithCustomLogger(logger zerolog.Logger) WithConnectionCacheOption
func WithLogger
deprecated
func WithLogger(logger zerolog.Logger) WithConnectionCacheOption
Deprecated: use WithCustomLogger
func WithMaxLeaseTime ¶
func WithMaxLeaseTime(maxLeaseTime time.Duration) WithConnectionCacheOption
func WithMaxWaitTime ¶
func WithMaxWaitTime(maxWaitTime time.Duration) WithConnectionCacheOption
func WithTracer ¶
func WithTracer() WithConnectionCacheOption
Click to show internal directories.
Click to hide internal directories.