Documentation
¶
Index ¶
- type Config
- type Logger
- type Option
- type Storage
- func (s *Storage) Close() error
- func (s *Storage) GetStreamIDs(ctx context.Context, streamType string, storeStreamID string, limit int64) ([]string, string, error)
- func (s *Storage) Read(ctx context.Context, streamType string, streamID string, eventNumber int64) iter.Seq2[es.Event, error]
- func (s *Storage) Register(streamType string, types ...es.Content) error
- func (s *Storage) StartPublish(ctx context.Context, w es.Writer) error
- func (s *Storage) Write(ctx context.Context, streamType string, events iter.Seq2[es.Event, error]) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(cfg *Config)
func WithDSN ¶
WithDSN creates a Postgresql connection pool using the provided DSN. The connection pool is closed by the Storage.
func WithDefaultSlog ¶
func WithDefaultSlog() Option
func WithLogger ¶
func WithNoopLogger ¶
func WithNoopLogger() Option
func WithPool ¶
WithPool uses an existing pgxpool.Pool instance. It is up to the caller to manage the lifecycle of the pool.
func WithStartContext ¶
WithStartContext uses the provided context during initialization.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) GetStreamIDs ¶
func (*Storage) StartPublish ¶
Click to show internal directories.
Click to hide internal directories.