Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface { // Get gets a transaction Get(ctx context.Context, id configapi.TransactionID) (*configapi.Transaction, error) // GetByIndex gets a transaction by index GetByIndex(ctx context.Context, index configapi.Index) (*configapi.Transaction, error) // GetPrev gets the previous network change by index GetPrev(ctx context.Context, index configapi.Index) (*configapi.Transaction, error) // GetNext gets the next transaction by index GetNext(ctx context.Context, index configapi.Index) (*configapi.Transaction, error) // Create creates a new transaction Create(ctx context.Context, transaction *configapi.Transaction) error // Update updates an existing transaction Update(ctx context.Context, transaction *configapi.Transaction) error // Delete deletes a transaction Delete(ctx context.Context, transaction *configapi.Transaction) error // List lists transactions List(ctx context.Context) ([]*configapi.Transaction, error) // Watch watches the transaction store for changes Watch(ctx context.Context, ch chan<- configapi.TransactionEvent, opts ...WatchOption) error // Close closes the transaction store Close(ctx context.Context) error }
Store transaction store interface
type WatchOption ¶
type WatchOption interface {
// contains filtered or unexported methods
}
WatchOption is a configuration option for Watch calls
func WithReplay ¶
func WithReplay() WatchOption
WithReplay returns a WatchOption that replays past changes
func WithTransactionID ¶
func WithTransactionID(id configapi.TransactionID) WatchOption
WithTransactionID returns a Watch option that watches for transactions based on a given transaction ID
Click to show internal directories.
Click to hide internal directories.