storage

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type Storage

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

func New

func New(path string) (*Storage, error)

func (*Storage) ActivateSharedPeer

func (storage *Storage) ActivateSharedPeer(sharingKey string, pubkey string) (int64, error)

func (*Storage) AsKeystore

func (storage *Storage) AsKeystore() auth.KeyStore

func (*Storage) CreatePeer

func (storage *Storage) CreatePeer(peer types.PeerInfo) (int64, error)

func (*Storage) DeleteAuthorizerKey

func (storage *Storage) DeleteAuthorizerKey(id string) error

func (*Storage) DeleteEventlogsSubscriber added in v0.3.5

func (storage *Storage) DeleteEventlogsSubscriber(subscriberID string) error

func (*Storage) DeletePeer

func (storage *Storage) DeletePeer(id int64) error

func (*Storage) GetAuthorizerKeyByID

func (storage *Storage) GetAuthorizerKeyByID(id string) (types.AuthorizerKey, error)

func (*Storage) GetDownstreamMetric added in v0.3.2

func (storage *Storage) GetDownstreamMetric() int64

func (*Storage) GetEventlogsSubscriber added in v0.3.5

func (storage *Storage) GetEventlogsSubscriber(subscriberID string) (*types.EventlogSubscriber, error)

func (*Storage) GetPeer

func (storage *Storage) GetPeer(id int64) (*types.PeerInfo, error)

func (*Storage) GetPeerBySharingKey added in v0.2.3

func (s *Storage) GetPeerBySharingKey(skey string) (types.PeerInfo, error)

func (*Storage) GetUpstreamMetric added in v0.3.2

func (storage *Storage) GetUpstreamMetric() int64

func (*Storage) ListAuthorizerKeys

func (storage *Storage) ListAuthorizerKeys() ([]types.AuthorizerKey, error)

func (*Storage) PutEventlogsSubscriber added in v0.3.5

func (storage *Storage) PutEventlogsSubscriber(subscriber *types.EventlogSubscriber) error

func (*Storage) Running

func (storage *Storage) Running() bool

func (*Storage) SearchPeers

func (storage *Storage) SearchPeers(filter *types.PeerInfo) ([]*types.PeerInfo, error)

func (*Storage) SetDownstreamMetric added in v0.3.2

func (storage *Storage) SetDownstreamMetric(value int64)

func (*Storage) SetUpstreamMetric added in v0.3.2

func (storage *Storage) SetUpstreamMetric(value int64)

func (*Storage) Shutdown

func (storage *Storage) Shutdown() error

func (*Storage) UpdateAuthorizerKeys

func (storage *Storage) UpdateAuthorizerKeys(keys []types.AuthorizerKey) error

UpdateAuthorizerKeys updates or inserts the given keys. The methods do not validate the key content.

func (*Storage) UpdatePeer

func (storage *Storage) UpdatePeer(peer *types.PeerInfo) (int64, error)

func (*Storage) UpdatePeerStats added in v0.3.5

func (storage *Storage) UpdatePeerStats(now time.Time, peer *types.PeerInfo) error

Update only statistics related peer details

Jump to

Keyboard shortcuts

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