Documentation ¶
Index ¶
- type StateManager
- type StateManagerSingle
- func (sm *StateManagerSingle) AddCosignature(_ context.Context, vk *types.PublicKey, sig *types.Signature) error
- func (sm *StateManagerSingle) Cosigned(_ context.Context) (*types.CosignedTreeHead, error)
- func (sm *StateManagerSingle) Latest(ctx context.Context) (*types.SignedTreeHead, error)
- func (sm *StateManagerSingle) Run(ctx context.Context)
- func (sm *StateManagerSingle) ToSign(_ context.Context) (*types.SignedTreeHead, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StateManager ¶
type StateManager interface { Latest(context.Context) (*types.SignedTreeHead, error) ToSign(context.Context) (*types.SignedTreeHead, error) Cosigned(context.Context) (*types.CosignedTreeHead, error) AddCosignature(context.Context, *types.PublicKey, *types.Signature) error Run(context.Context) }
StateManager coordinates access to a log's tree heads and (co)signatures
type StateManagerSingle ¶
StateManagerSingle implements a single-instance StateManager. In other words, there's no other state that needs to be synced on any remote machine.
func NewStateManagerSingle ¶
func (*StateManagerSingle) AddCosignature ¶
func (*StateManagerSingle) Cosigned ¶
func (sm *StateManagerSingle) Cosigned(_ context.Context) (*types.CosignedTreeHead, error)
func (*StateManagerSingle) Latest ¶
func (sm *StateManagerSingle) Latest(ctx context.Context) (*types.SignedTreeHead, error)
func (*StateManagerSingle) Run ¶
func (sm *StateManagerSingle) Run(ctx context.Context)
func (*StateManagerSingle) ToSign ¶
func (sm *StateManagerSingle) ToSign(_ context.Context) (*types.SignedTreeHead, error)
Click to show internal directories.
Click to hide internal directories.