connman

package
v0.16.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoConnection = errors.New("no connection")

Functions

This section is empty.

Types

type ConnectionManager

type ConnectionManager struct {
	DialerDoneCallback      func(string, *revdial.Dialer)
	DialerKeepAliveCallback func(string, *revdial.Dialer)
	// contains filtered or unexported fields
}

func New

func New() *ConnectionManager

func (*ConnectionManager) Dial

func (m *ConnectionManager) Dial(ctx context.Context, key string) (net.Conn, error)

func (*ConnectionManager) Set

func (m *ConnectionManager) Set(key string, conn *wsconnadapter.Adapter, connPath string)

type SyncSliceMap added in v0.13.6

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

SyncSliceMap is a struct that uses sync.Map and stores values in a slice.

func (*SyncSliceMap) Delete added in v0.13.6

func (ssm *SyncSliceMap) Delete(key, value interface{})

Delete removes the value from the slice associated with the key and updates the value in sync.Map.

func (*SyncSliceMap) Load added in v0.13.6

func (ssm *SyncSliceMap) Load(key interface{}) (interface{}, bool)

Load retrieves the last value associated with the key in the slice along with the size of the slice.

func (*SyncSliceMap) Size added in v0.13.6

func (ssm *SyncSliceMap) Size(key interface{}) int

Size returns the current size of the slice associated with the key.

func (*SyncSliceMap) Store added in v0.13.6

func (ssm *SyncSliceMap) Store(key, value interface{})

Store appends the value to the slice associated with the key and updates the value in sync.Map. It returns the size of the slice after the append operation.

Jump to

Keyboard shortcuts

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