forked from spiffe/spire
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce support to save and load the CA journal from the datastore (s…
…piffe#4690) * Save and load the CA journal from datastore Signed-off-by: Agustín Martínez Fayó <amartinezfayo@gmail.com>
- Loading branch information
1 parent
98739b9
commit 31e402c
Showing
20 changed files
with
1,341 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package datastore | ||
|
||
import ( | ||
"github.com/spiffe/spire/pkg/common/telemetry" | ||
) | ||
|
||
// StartSetCAJournal return metric for server's datastore, on setting a CA | ||
// journal. | ||
func StartSetCAJournal(m telemetry.Metrics) *telemetry.CallCounter { | ||
return telemetry.StartCall(m, telemetry.Datastore, telemetry.CAJournal, telemetry.Set) | ||
} | ||
|
||
// StartFetchCAJournal return metric | ||
// for server's datastore, on fetching a CA journal. | ||
func StartFetchCAJournal(m telemetry.Metrics) *telemetry.CallCounter { | ||
return telemetry.StartCall(m, telemetry.Datastore, telemetry.CAJournal, telemetry.Fetch) | ||
} | ||
|
||
// StartPruneCAJournalsCall return metric for server's datastore, on pruning CA | ||
// journals. | ||
func StartPruneCAJournalsCall(m telemetry.Metrics) *telemetry.CallCounter { | ||
return telemetry.StartCall(m, telemetry.Datastore, telemetry.CAJournal, telemetry.Prune) | ||
} | ||
|
||
// StartListCAJournalsForTesting return metric | ||
// for server's datastore, on listing CA journals for testing. | ||
func StartListCAJournalsForTesting(m telemetry.Metrics) *telemetry.CallCounter { | ||
return telemetry.StartCall(m, telemetry.Datastore, telemetry.CAJournal, telemetry.List) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.