inmemory

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 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 models.NodeInfo) error

func (*NodeInfoStore) Delete

func (r *NodeInfoStore) Delete(ctx context.Context, nodeID string) 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, nodeID string) (models.NodeInfo, error)

func (*NodeInfoStore) GetByPrefix added in v1.1.4

func (r *NodeInfoStore) GetByPrefix(ctx context.Context, prefix string) (models.NodeInfo, error)

func (*NodeInfoStore) List

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

func (*NodeInfoStore) ListForEngine

func (r *NodeInfoStore) ListForEngine(ctx context.Context, engine string) ([]models.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