Documentation ¶
Index ¶
- Constants
- type NodeStore
- func (n *NodeStore) Add(ctx context.Context, nodeInfo models.NodeInfo) error
- func (n *NodeStore) Delete(ctx context.Context, nodeID string) error
- func (n *NodeStore) FindPeer(ctx context.Context, peerID peer.ID) (peer.AddrInfo, error)
- func (n *NodeStore) Get(ctx context.Context, nodeID string) (models.NodeInfo, error)
- func (n *NodeStore) GetByPrefix(ctx context.Context, prefix string) (models.NodeInfo, error)
- func (n *NodeStore) List(ctx context.Context, filters ...routing.NodeInfoFilter) ([]models.NodeInfo, error)
- type NodeStoreParams
Constants ¶
View Source
const (
DefaultBucketName = "nodes"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeStore ¶
type NodeStore struct {
// contains filtered or unexported fields
}
func NewNodeStore ¶
func NewNodeStore(ctx context.Context, params NodeStoreParams) (*NodeStore, error)
func (*NodeStore) GetByPrefix ¶
GetByPrefix returns the node info for the given node ID. Supports both full and short node IDs band currently iterates through all of the keys to find matches, due to NATS KVStore not supporting prefix searches (yet).
type NodeStoreParams ¶
type NodeStoreParams struct { BucketName string ConnectionInfo interface{} }
Click to show internal directories.
Click to hide internal directories.