Documentation
¶
Index ¶
- Constants
- type NodeStore
- func (n *NodeStore) Delete(ctx context.Context, nodeID string) error
- func (n *NodeStore) Get(ctx context.Context, nodeID string) (models.NodeState, error)
- func (n *NodeStore) GetByPrefix(ctx context.Context, prefix string) (models.NodeState, error)
- func (n *NodeStore) List(ctx context.Context, filters ...nodes.NodeStateFilter) ([]models.NodeState, error)
- func (n *NodeStore) Put(ctx context.Context, state models.NodeState) error
- type NodeStoreParams
Constants ¶
View Source
const (
// BucketNameCurrent is the bucket name for bacalhau version v1.3.1 and beyond.
BucketNameCurrent = "node_v1"
)
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 state 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 Client *nats.Conn }
Click to show internal directories.
Click to hide internal directories.