connection

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Client *routeros.Client
	// contains filtered or unexported fields
}

func (*Connection) Free

func (c *Connection) Free(log zerolog.Logger)

func (*Connection) GetLastUse added in v0.2.0

func (c *Connection) GetLastUse() time.Time

func (*Connection) IsHealthy added in v0.2.0

func (c *Connection) IsHealthy() bool

func (*Connection) IsInUse added in v0.2.0

func (c *Connection) IsInUse() bool

func (*Connection) Use added in v0.2.0

func (c *Connection) Use(log zerolog.Logger, address string, username string) (bool, zerolog.Logger)

Check if the connection is usable, if yes mark as used (blocks during healthcheck)

type ConnectionManager

type ConnectionManager struct {
	// contains filtered or unexported fields
}

func CreateConnectionManager

func CreateConnectionManager(cleanupInterval time.Duration, useTimeout time.Duration) *ConnectionManager

func (*ConnectionManager) Get

Jump to

Keyboard shortcuts

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