cache

package
v0.0.0-...-ad9183a Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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(connectionString string) <-chan plc4go.PlcConnectionConnectResult
	GetConnectionWithContext(ctx context.Context, connectionString string) <-chan plc4go.PlcConnectionConnectResult
	Close() <-chan PlcConnectionCacheCloseResult
}

func NewPlcConnectionCache

func NewPlcConnectionCache(driverManager plc4go.PlcDriverManager, withConnectionCacheOptions ...WithConnectionCacheOption) PlcConnectionCache

type PlcConnectionCacheCloseResult

type PlcConnectionCacheCloseResult interface {
	GetConnectionCache() PlcConnectionCache
	GetErr() error
}

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(duration time.Duration) WithConnectionCacheOption

func WithMaxWaitTime

func WithMaxWaitTime(duration time.Duration) WithConnectionCacheOption

func WithTracer

func WithTracer() WithConnectionCacheOption

Jump to

Keyboard shortcuts

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