Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store interface { // Get gets the proposal intended for a given target ID Get(ctx context.Context, id configapi.ProposalID) (*configapi.Proposal, error) // Create creates a proposal Create(ctx context.Context, proposal *configapi.Proposal) error // Update updates a proposal Update(ctx context.Context, proposal *configapi.Proposal) error // List lists all the proposal List(ctx context.Context) ([]*configapi.Proposal, error) // Watch watches proposal changes Watch(ctx context.Context, ch chan<- configapi.ProposalEvent, opts ...WatchOption) error // UpdateStatus updates a proposal status UpdateStatus(ctx context.Context, proposal *configapi.Proposal) error Close(ctx context.Context) error }
Store proposal store interface
type WatchOption ¶
type WatchOption interface {
// contains filtered or unexported methods
}
WatchOption is a proposal option for Watch calls
func WithProposalID ¶
func WithProposalID(id configapi.ProposalID) WatchOption
WithProposalID returns a Watch option that watches for proposals based on a given proposal ID
func WithReplay ¶
func WithReplay() WatchOption
WithReplay returns a WatchOption that replays past changes
Click to show internal directories.
Click to hide internal directories.