db

package
v0.0.0-...-8bb18f9 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func New

func New(path string, e *log.Entry) (*Store, error)

func (*Store) AllocatePeerIP

func (s *Store) AllocatePeerIP(prefix netip.Prefix) (string, error)

func (*Store) CreatePeer

func (s *Store) CreatePeer(peer *types.Peer) error

func (*Store) DeletePeer

func (s *Store) DeletePeer(peer *types.Peer) error

func (*Store) GetAllocatedIPs

func (s *Store) GetAllocatedIPs() ([]netip.Addr, error)

func (*Store) GetConnectedPeers

func (s *Store) GetConnectedPeers() ([]types.Peer, error)

func (*Store) GetPeerByMachineID

func (s *Store) GetPeerByMachineID(machineID string) *types.Peer

func (*Store) GetPeerbyID

func (s *Store) GetPeerbyID(id uint32) *types.Peer

func (*Store) GetPeers

func (s *Store) GetPeers() ([]types.Peer, error)

func (*Store) SetPeerConnected

func (s *Store) SetPeerConnected(peer *types.Peer, connected bool) error

func (*Store) UpdatePeer

func (s *Store) UpdatePeer(peer *types.Peer) error

func (*Store) UpdatePeerEndpoint

func (s *Store) UpdatePeerEndpoint(id uint32, endpoint string) error

Jump to

Keyboard shortcuts

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