Documentation
¶
Index ¶
- type CompositeStore
- func (c *CompositeStore) Count(opts QueryOpts) (int64, error)
- func (c *CompositeStore) Delete(id string) error
- func (c *CompositeStore) Get(id string) (*MessageRecord, error)
- func (c *CompositeStore) GetStage(id, stage string) (*MessageRecord, error)
- func (c *CompositeStore) Mode() string
- func (c *CompositeStore) Prune(before time.Time, channel string) (int, error)
- func (c *CompositeStore) Query(opts QueryOpts) ([]*MessageRecord, error)
- func (c *CompositeStore) Save(record *MessageRecord) error
- func (c *CompositeStore) ShouldStore(stage string) bool
- type MemoryStore
- func (m *MemoryStore) BytesUsed() int
- func (m *MemoryStore) Count(opts QueryOpts) (int64, error)
- func (m *MemoryStore) Delete(id string) error
- func (m *MemoryStore) Get(id string) (*MessageRecord, error)
- func (m *MemoryStore) GetStage(id, stage string) (*MessageRecord, error)
- func (m *MemoryStore) Len() int
- func (m *MemoryStore) Prune(before time.Time, channel string) (int, error)
- func (m *MemoryStore) Query(opts QueryOpts) ([]*MessageRecord, error)
- func (m *MemoryStore) Save(record *MessageRecord) error
- type MessageRecord
- type MessageStore
- type PostgresStore
- func (p *PostgresStore) Close() error
- func (p *PostgresStore) Count(opts QueryOpts) (int64, error)
- func (p *PostgresStore) Delete(id string) error
- func (p *PostgresStore) Get(id string) (*MessageRecord, error)
- func (p *PostgresStore) GetStage(id, stage string) (*MessageRecord, error)
- func (p *PostgresStore) Prune(before time.Time, channel string) (int, error)
- func (p *PostgresStore) Query(opts QueryOpts) ([]*MessageRecord, error)
- func (p *PostgresStore) Save(record *MessageRecord) error
- type QueryOpts
- type S3Store
- func (s *S3Store) Close() error
- func (s *S3Store) Count(opts QueryOpts) (int64, error)
- func (s *S3Store) Delete(id string) error
- func (s *S3Store) Get(id string) (*MessageRecord, error)
- func (s *S3Store) GetStage(id, stage string) (*MessageRecord, error)
- func (s *S3Store) Prune(before time.Time, channel string) (int, error)
- func (s *S3Store) Query(opts QueryOpts) ([]*MessageRecord, error)
- func (s *S3Store) Save(record *MessageRecord) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompositeStore ¶
type CompositeStore struct {
// contains filtered or unexported fields
}
func NewCompositeStore ¶
func NewCompositeStore(inner MessageStore, mode string, stages []string) *CompositeStore
func (*CompositeStore) Count ¶ added in v1.0.4
func (c *CompositeStore) Count(opts QueryOpts) (int64, error)
func (*CompositeStore) Delete ¶
func (c *CompositeStore) Delete(id string) error
func (*CompositeStore) Get ¶
func (c *CompositeStore) Get(id string) (*MessageRecord, error)
func (*CompositeStore) GetStage ¶
func (c *CompositeStore) GetStage(id, stage string) (*MessageRecord, error)
func (*CompositeStore) Mode ¶
func (c *CompositeStore) Mode() string
func (*CompositeStore) Query ¶
func (c *CompositeStore) Query(opts QueryOpts) ([]*MessageRecord, error)
func (*CompositeStore) Save ¶
func (c *CompositeStore) Save(record *MessageRecord) error
func (*CompositeStore) ShouldStore ¶
func (c *CompositeStore) ShouldStore(stage string) bool
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore(maxRecords, maxBytes int) *MemoryStore
func (*MemoryStore) BytesUsed ¶ added in v1.0.4
func (m *MemoryStore) BytesUsed() int
func (*MemoryStore) Count ¶ added in v1.0.4
func (m *MemoryStore) Count(opts QueryOpts) (int64, error)
func (*MemoryStore) Delete ¶
func (m *MemoryStore) Delete(id string) error
func (*MemoryStore) Get ¶
func (m *MemoryStore) Get(id string) (*MessageRecord, error)
func (*MemoryStore) GetStage ¶
func (m *MemoryStore) GetStage(id, stage string) (*MessageRecord, error)
func (*MemoryStore) Len ¶ added in v1.0.4
func (m *MemoryStore) Len() int
func (*MemoryStore) Query ¶
func (m *MemoryStore) Query(opts QueryOpts) ([]*MessageRecord, error)
func (*MemoryStore) Save ¶
func (m *MemoryStore) Save(record *MessageRecord) error
type MessageRecord ¶
type MessageStore ¶
type MessageStore interface {
Save(record *MessageRecord) error
Get(id string) (*MessageRecord, error)
GetStage(id, stage string) (*MessageRecord, error)
Query(opts QueryOpts) ([]*MessageRecord, error)
Count(opts QueryOpts) (int64, error)
Delete(id string) error
Prune(before time.Time, channel string) (int, error)
}
func NewMessageStore ¶
func NewMessageStore(cfg *config.MessageStorageConfig) (MessageStore, error)
type PostgresStore ¶
type PostgresStore struct {
// contains filtered or unexported fields
}
func NewPostgresStore ¶
func NewPostgresStore(cfg *config.StoragePostgresConfig) (*PostgresStore, error)
func (*PostgresStore) Close ¶
func (p *PostgresStore) Close() error
func (*PostgresStore) Count ¶ added in v1.0.4
func (p *PostgresStore) Count(opts QueryOpts) (int64, error)
func (*PostgresStore) Delete ¶
func (p *PostgresStore) Delete(id string) error
func (*PostgresStore) Get ¶
func (p *PostgresStore) Get(id string) (*MessageRecord, error)
func (*PostgresStore) GetStage ¶
func (p *PostgresStore) GetStage(id, stage string) (*MessageRecord, error)
func (*PostgresStore) Query ¶
func (p *PostgresStore) Query(opts QueryOpts) ([]*MessageRecord, error)
func (*PostgresStore) Save ¶
func (p *PostgresStore) Save(record *MessageRecord) error
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
func NewS3Store ¶
func NewS3Store(cfg *config.StorageS3Config) (*S3Store, error)
func (*S3Store) Save ¶
func (s *S3Store) Save(record *MessageRecord) error
Click to show internal directories.
Click to hide internal directories.