inmemory

package
v0.3.25 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeInfoStore

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

func NewNodeInfoStore

func NewNodeInfoStore(params NodeInfoStoreParams) *NodeInfoStore

func (*NodeInfoStore) Add

func (r *NodeInfoStore) Add(ctx context.Context, nodeInfo model.NodeInfo) error

func (*NodeInfoStore) Delete

func (r *NodeInfoStore) Delete(ctx context.Context, peerID peer.ID) error

func (*NodeInfoStore) FindPeer

func (r *NodeInfoStore) FindPeer(ctx context.Context, peerID peer.ID) (peer.AddrInfo, error)

func (*NodeInfoStore) Get

func (r *NodeInfoStore) Get(ctx context.Context, peerID peer.ID) (model.NodeInfo, error)

func (*NodeInfoStore) List

func (r *NodeInfoStore) List(ctx context.Context) ([]model.NodeInfo, error)

func (*NodeInfoStore) ListForEngine

func (r *NodeInfoStore) ListForEngine(ctx context.Context, engine model.Engine) ([]model.NodeInfo, error)

type NodeInfoStoreParams

type NodeInfoStoreParams struct {
	TTL time.Duration
}

Jump to

Keyboard shortcuts

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