Documentation
¶
Overview ¶
Package postgres provides an opt-in metadata persistence adapter for diagnostics. It never stores diagnostic package bytes or ciphertext.
Index ¶
- Variables
- func ValidateRecord(r diagnostics.Record) error
- type Store
- func (s *Store) AppendOutbox(ctx context.Context, o diagnostics.Outbox) error
- func (s *Store) Cancel(ctx context.Context, id, reason string) error
- func (s *Store) Claim(ctx context.Context, worker string, lease time.Duration) (*diagnostics.Record, error)
- func (s *Store) Close() error
- func (s *Store) Get(ctx context.Context, id string) (diagnostics.Record, error)
- func (s *Store) MarkOutboxDelivered(ctx context.Context, eventID, worker string) error
- func (s *Store) Migrate(ctx context.Context) error
- func (s *Store) PendingOutbox(ctx context.Context, limit int) ([]diagnostics.Outbox, error)
- func (s *Store) Put(ctx context.Context, r diagnostics.Record) (diagnostics.Record, error)
- func (s *Store) Retry(ctx context.Context, id, reason string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidStore = errors.New("invalid diagnostics PostgreSQL store") ErrInvalidRecord = errors.New("invalid diagnostics metadata record") ErrNotFound = diagnostics.ErrNotFound ErrLeaseConflict = errors.New("diagnostics lease conflict") ErrStateConflict = errors.New("diagnostics state conflict") )
Functions ¶
func ValidateRecord ¶
func ValidateRecord(r diagnostics.Record) error
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AppendOutbox ¶
func (*Store) MarkOutboxDelivered ¶
MarkOutboxDelivered records delivery state without touching upload metadata.
func (*Store) PendingOutbox ¶
func (*Store) Put ¶
func (s *Store) Put(ctx context.Context, r diagnostics.Record) (diagnostics.Record, error)
Click to show internal directories.
Click to hide internal directories.