node_store

package
v0.0.0-...-6af2dc9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockNodeStore

type MockNodeStore struct {
	StopFunc      func()
	GetNodeFunc   func(name string) (Node, bool)
	SetNodeFunc   func(name string, node Node)
	SerializeFunc func() []cache.CacheItem
	MergeFunc     func(items []cache.CacheItem)
}

func (MockNodeStore) GetNode

func (n MockNodeStore) GetNode(name string) (Node, bool)

func (MockNodeStore) Merge

func (n MockNodeStore) Merge(items []cache.CacheItem)

func (MockNodeStore) Serialize

func (n MockNodeStore) Serialize() []cache.CacheItem

func (MockNodeStore) SetNode

func (n MockNodeStore) SetNode(name string, node Node)

func (MockNodeStore) Stop

func (n MockNodeStore) Stop()

type Node

type Node struct {
	types.JoinPayloadNode
}

type NodeStore

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

func (*NodeStore) GetNode

func (n *NodeStore) GetNode(name string) (Node, bool)

func (*NodeStore) Merge

func (n *NodeStore) Merge(items []cache.CacheItem)

func (*NodeStore) Serialize

func (n *NodeStore) Serialize() []cache.CacheItem

func (*NodeStore) SetNode

func (n *NodeStore) SetNode(name string, node Node)

func (*NodeStore) Stop

func (n *NodeStore) Stop()

type Store

type Store interface {
	Stop()
	GetNode(name string) (Node, bool)
	SetNode(name string, node Node)
	Serialize() []cache.CacheItem
	Merge(items []cache.CacheItem)
}

func New

func New() Store

func NewWithDns

func NewWithDns(dns dns_store.Store) Store

Jump to

Keyboard shortcuts

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