github.com/looshlee/beatles@v0.0.0-20220727174639-742810ab631c/pkg/kvstore/store/doc.go (about)

     1  // Copyright 2018 Authors of Cilium
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Package store implements a shared store backed by a kvstore or similar with
    16  // the following properties:
    17  //
    18  // * A single type is used to represent all keys
    19  // * Any number of collaborators can join the store. Typically a collaborator
    20  //   is an individual Cilium agent running on each node.
    21  // * All collaborators can own and contribute keys to the store. Each key is
    22  //   owned by exactly one collaborator. It is the responsibility of each
    23  //   collaborator to pick a key name which is guaranteed to be unique.
    24  // * All collaborate desire to see all keys within the scope of a store. The
    25  //   scope of the store is defined by a common key prefix. For this purpose,
    26  //   each collaborator maintains a local cache of all keys in the store by
    27  //   subscribing to change events.
    28  package store