cilium: Index | Files

package store

import ""


Package Files



var (
    // NodeStorePrefix is the kvstore prefix of the shared store
    // WARNING - STABLE API: Changing the structure or values of this will
    // break backwards compatibility
    NodeStorePrefix = path.Join(kvstore.BaseKeyPrefix, "state", "nodes", "v1")

    // KeyCreator creates a node for a shared store
    KeyCreator = func() store.Key {
        n := node.Node{}
        return &n

type NodeManager Uses

type NodeManager interface {
    // NodeUpdated is called when the store detects a change in node
    // information
    NodeUpdated(n node.Node)

    // NodeDeleted is called when the store detects a deletion of a node
    NodeDeleted(n node.Node)

    // Exists is called to verify if a node exists
    Exists(id node.Identity) bool

NodeManager is the interface that the manager of nodes has to implement

type NodeObserver Uses

type NodeObserver struct {
    // contains filtered or unexported fields

NodeObserver implements the store.Observer interface and delegates update and deletion events to the node object itself.

func NewNodeObserver Uses

func NewNodeObserver(manager NodeManager) *NodeObserver

NewNodeObserver returns a new NodeObserver associated with the specified node manager

func (*NodeObserver) OnDelete Uses

func (o *NodeObserver) OnDelete(k store.NamedKey)

func (*NodeObserver) OnUpdate Uses

func (o *NodeObserver) OnUpdate(k store.Key)

type NodeRegistrar Uses

type NodeRegistrar struct {

NodeRegistrar is a wrapper around store.SharedStore.

func (*NodeRegistrar) RegisterNode Uses

func (nr *NodeRegistrar) RegisterNode(n *node.Node, manager NodeManager) error

RegisterNode registers the local node in the cluster

func (*NodeRegistrar) UpdateLocalKeySync Uses

func (nr *NodeRegistrar) UpdateLocalKeySync(n *node.Node) error

UpdateLocalKeySync synchronizes the local key for the node using the SharedStore.

Package store imports 7 packages (graph) and is imported by 16 packages. Updated 2020-04-09. Refresh now. Tools for package owners.