aboutsummaryrefslogtreecommitdiff
path: root/pkg/state/state_manager.go
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2022-05-24 23:33:38 +0200
committerRasmus Dahlberg <rasmus@mullvad.net>2022-06-23 11:33:17 +0200
commit559bccccd40d028e412d9f11709ded0250ba6dcd (patch)
tree50f3193dbe70fec21357963c11e5f663013f4b4c /pkg/state/state_manager.go
parent4b20ef0c1732bcef633c0ed7104501898aa84e2c (diff)
implement primary and secondary role, for replicationv0.5.0
Diffstat (limited to 'pkg/state/state_manager.go')
-rw-r--r--pkg/state/state_manager.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/pkg/state/state_manager.go b/pkg/state/state_manager.go
deleted file mode 100644
index 9533479..0000000
--- a/pkg/state/state_manager.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package state
-
-import (
- "context"
-
- "git.sigsum.org/sigsum-go/pkg/types"
-)
-
-// StateManager coordinates access to a log's tree heads and (co)signatures.
-type StateManager interface {
- // ToCosignTreeHead returns the log's to-cosign tree head
- ToCosignTreeHead(context.Context) (*types.SignedTreeHead, error)
-
- // CosignedTreeHead returns the log's cosigned tree head
- CosignedTreeHead(context.Context) (*types.CosignedTreeHead, error)
-
- // AddCosignature verifies that a cosignature is valid for the to-cosign
- // tree head before adding it
- AddCosignature(context.Context, *types.PublicKey, *types.Signature) error
-
- // Run peridically rotates the log's to-cosign and cosigned tree heads
- Run(context.Context)
-}
-
-// event is a verified cosignature request
-type event struct {
- keyHash *types.Hash
- cosignature *types.Signature
-}