databroker: add list types method

This commit is contained in:
Caleb Doxsey 2023-02-03 12:08:04 -07:00
parent 7a405abea1
commit 2eb24fd42a
13 changed files with 494 additions and 232 deletions

View file

@ -33,6 +33,8 @@ type Backend interface {
GetOptions(ctx context.Context, recordType string) (*databroker.Options, error)
// Lease acquires a lease, or renews an existing one. If the lease is acquired true is returned.
Lease(ctx context.Context, leaseName, leaseID string, ttl time.Duration) (bool, error)
// ListTypes lists all the known record types.
ListTypes(ctx context.Context) ([]string, error)
// Put is used to insert or update records.
Put(ctx context.Context, records []*databroker.Record) (serverVersion uint64, err error)
// SetOptions sets the options for a type.