mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-19 11:00:37 +08:00
Introduces an alternate to the legacyCollections and genericCollection that relies on caching resource in memory. The new collection[T] takes inspiration from the legacy collection types but aims to both simplify and break reliance on using the local storage services. The two collection mechanisms will and can coexist until all types are converted to the new mechanism. This includes an initial conversion of static tokens, users, and cert authorities to prove out the effectivenss of the strategy. Additionally, during the conversion process some refactoring will be done to try to better organize and reduce the size of cache.go. In this PR all of the code specific to static tokens was moved out of cache.go and legacy_collections.go and into static_tokens.go. This will allow separating concerns and making it much easier to identify where specific content lives.
29 lines
1.1 KiB
Go
29 lines
1.1 KiB
Go
/*
|
|
* Teleport
|
|
* Copyright (C) 2023 Gravitational, Inc.
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
// Package cache implements event-driven cache layer
|
|
// that is used by auth servers, proxies and nodes.
|
|
//
|
|
// The cache fetches resources and then subscribes
|
|
// to the events watcher to receive updates.
|
|
//
|
|
// This approach allows cache to be up to date without
|
|
// time based expiration and avoid re-fetching all
|
|
// resources reducing bandwidth.
|
|
package cache
|