Documentation ¶
Index ¶
- type Config
- type Storage
- func (s *Storage) CountErrorMessages(ctx context.Context) (int64, error)
- func (s *Storage) CreateBlock(ctx context.Context, block *model.Block) error
- func (s *Storage) GetAllBlocks(ctx context.Context) ([]*model.Block, error)
- func (s *Storage) GetBlockByHeight(ctx context.Context, height int64) (*model.Block, error)
- func (s *Storage) GetErrorBlockHeights(ctx context.Context) ([]int64, error)
- func (s *Storage) InsertErrorMessage(ctx context.Context, message model.Message) error
- func (s *Storage) Ping(ctx context.Context) error
- func (s *Storage) SetErrorStatus(ctx context.Context, height int64, msg string) error
- func (s *Storage) SetProcessedStatus(ctx context.Context, height int64) error
- func (s *Storage) Start(ctx context.Context) error
- func (s *Storage) Stop(ctx context.Context) error
- func (s *Storage) UpdateStatus(ctx context.Context, height int64, status model.Status) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { URI string `env:"MONGO_CRAWLER_URI"` User string `env:"MONGO_USER"` Password string `env:"MONGO_PASSWORD"` MaxPoolSize uint64 `env:"MAX_POOL_SIZE" envDefault:"8"` MaxConnecting uint64 `env:"MAX_CONNECTING" envDefault:"8"` MetricsEnabled bool `env:"METRICS_ENABLED" envDefault:"false"` }
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) CountErrorMessages ¶ added in v0.0.9
func (*Storage) CreateBlock ¶
func (*Storage) GetAllBlocks ¶
func (*Storage) GetBlockByHeight ¶
func (*Storage) GetErrorBlockHeights ¶
func (*Storage) InsertErrorMessage ¶ added in v0.0.9
func (*Storage) SetErrorStatus ¶
func (*Storage) SetProcessedStatus ¶
Click to show internal directories.
Click to hide internal directories.