Documentation ¶
Index ¶
- Variables
- type CollectionConsumer
- type CollectionRcache
- func (rc *CollectionRcache) GetDeviceLastReport(ctx context.Context, id uint64) (*model.CollectionRecord, error)
- func (rc *CollectionRcache) GetDeviceLastReportFromCache(ctx context.Context, id uint64) (*model.CollectionRecord, error)
- func (rc *CollectionRcache) GetLastPredictQuality(ctx context.Context, deviceID uint64) (*model.PredictAndGuess, error)
- func (rc *CollectionRcache) GetLastPredictQualityFromCache(ctx context.Context, deviceID uint64) (*model.PredictAndGuess, error)
- func (rc *CollectionRcache) UpdateDeviceLastReport(ctx context.Context, id uint64, lastlocal *model.CollectionRecord) error
- func (rc *CollectionRcache) UpdateLastPredictQuality(ctx context.Context, deviceID uint64, data *model.PredictAndGuess) error
- type CollectionService
- func (s *CollectionService) CreateCollectionRecord(ctx context.Context, req *collectionApi.CreateCollectionRecordReq) (*collectionApi.Empty, error)
- func (s *CollectionService) GetDeviceLastReport(ctx context.Context, req *collectionApi.GetDeviceLastReportReq) (*collectionApi.CollectionRecord, error)
- func (s *CollectionService) GetDeviceStreamEvent(req *collectionApi.GetDeviceStreamEventReq, ...) error
- func (s *CollectionService) GetDeviceStreamReport(req *collectionApi.GetDeviceStreamReportReq, ...) error
- func (s *CollectionService) GetLatestIdWithinRange(ctx context.Context, req *collectionApi.GetLatestWithinRangeReq) (*collectionApi.GetLatestIdWithinRangeResp, error)
- func (s *CollectionService) GetLatestRecordsWithinRange(ctx context.Context, req *collectionApi.GetLatestWithinRangeReq) (*collectionApi.GetLatestRecordsWithinRangeResp, error)
- func (s *CollectionService) GetPredictQuality(ctx context.Context, req *collectionApi.GetPredictQualityReq) (*waterquality.PredictAndGuessResp, error)
- func (s *CollectionService) GetStreamLatestIdWithinRange(req *collectionApi.GetStreamLatestWithinRangeReq, ...) error
- func (s *CollectionService) GetStreamLatestRecordsWithinRange(req *collectionApi.GetStreamLatestWithinRangeReq, ...) error
- func (s *CollectionService) ListCollectionRecord(ctx context.Context, req *collectionApi.ListCollectionRecordReq) (*collectionApi.ListCollectionRecordResp, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewCollectionDatabase, NewCollectionConsumer)
ProviderSet is service providers.
Functions ¶
This section is empty.
Types ¶
type CollectionConsumer ¶
type CollectionConsumer struct {
// contains filtered or unexported fields
}
func NewCollectionConsumer ¶
func NewCollectionConsumer(s *CollectionService) *CollectionConsumer
func (*CollectionConsumer) Cleanup ¶
func (s *CollectionConsumer) Cleanup(sarama.ConsumerGroupSession) error
func (*CollectionConsumer) ConsumeClaim ¶
func (s *CollectionConsumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
func (*CollectionConsumer) Setup ¶
func (s *CollectionConsumer) Setup(sarama.ConsumerGroupSession) error
type CollectionRcache ¶ added in v0.3.3
type CollectionRcache struct {
// contains filtered or unexported fields
}
func NewCollectionRcache ¶ added in v0.3.3
func NewCollectionRcache(rcache *rcache.Rcache, client *dbUtils) *CollectionRcache
func (*CollectionRcache) GetDeviceLastReport ¶ added in v0.3.3
func (rc *CollectionRcache) GetDeviceLastReport(ctx context.Context, id uint64) (*model.CollectionRecord, error)
func (*CollectionRcache) GetDeviceLastReportFromCache ¶ added in v0.4.3
func (rc *CollectionRcache) GetDeviceLastReportFromCache(ctx context.Context, id uint64) (*model.CollectionRecord, error)
func (*CollectionRcache) GetLastPredictQuality ¶ added in v0.4.3
func (rc *CollectionRcache) GetLastPredictQuality(ctx context.Context, deviceID uint64) (*model.PredictAndGuess, error)
func (*CollectionRcache) GetLastPredictQualityFromCache ¶ added in v0.4.3
func (rc *CollectionRcache) GetLastPredictQualityFromCache(ctx context.Context, deviceID uint64) (*model.PredictAndGuess, error)
func (*CollectionRcache) UpdateDeviceLastReport ¶ added in v0.3.3
func (rc *CollectionRcache) UpdateDeviceLastReport(ctx context.Context, id uint64, lastlocal *model.CollectionRecord) error
func (*CollectionRcache) UpdateLastPredictQuality ¶ added in v0.4.3
func (rc *CollectionRcache) UpdateLastPredictQuality(ctx context.Context, deviceID uint64, data *model.PredictAndGuess) error
type CollectionService ¶
type CollectionService struct { collectionApi.UnimplementedCollectionServer // contains filtered or unexported fields }
func NewCollectionDatabase ¶
func NewCollectionDatabase(dc *conf.DatabaseServerConfig, cc *conf.CollectionConfig, kc sarama.Client, rc *conf.RedisConfig, reg registry.Registrar) *CollectionService
func (*CollectionService) CreateCollectionRecord ¶
func (s *CollectionService) CreateCollectionRecord(ctx context.Context, req *collectionApi.CreateCollectionRecordReq) (*collectionApi.Empty, error)
func (*CollectionService) GetDeviceLastReport ¶ added in v0.3.3
func (s *CollectionService) GetDeviceLastReport(ctx context.Context, req *collectionApi.GetDeviceLastReportReq) (*collectionApi.CollectionRecord, error)
func (*CollectionService) GetDeviceStreamEvent ¶ added in v0.2.4
func (s *CollectionService) GetDeviceStreamEvent(req *collectionApi.GetDeviceStreamEventReq, resp collectionApi.Collection_GetDeviceStreamEventServer) error
func (*CollectionService) GetDeviceStreamReport ¶ added in v0.2.4
func (s *CollectionService) GetDeviceStreamReport(req *collectionApi.GetDeviceStreamReportReq, resp collectionApi.Collection_GetDeviceStreamReportServer) error
func (*CollectionService) GetLatestIdWithinRange ¶ added in v0.4.2
func (s *CollectionService) GetLatestIdWithinRange(ctx context.Context, req *collectionApi.GetLatestWithinRangeReq) (*collectionApi.GetLatestIdWithinRangeResp, error)
func (*CollectionService) GetLatestRecordsWithinRange ¶ added in v0.4.2
func (s *CollectionService) GetLatestRecordsWithinRange(ctx context.Context, req *collectionApi.GetLatestWithinRangeReq) (*collectionApi.GetLatestRecordsWithinRangeResp, error)
func (*CollectionService) GetPredictQuality ¶ added in v0.3.3
func (s *CollectionService) GetPredictQuality(ctx context.Context, req *collectionApi.GetPredictQualityReq) (*waterquality.PredictAndGuessResp, error)
func (*CollectionService) GetStreamLatestIdWithinRange ¶ added in v0.4.2
func (s *CollectionService) GetStreamLatestIdWithinRange(req *collectionApi.GetStreamLatestWithinRangeReq, resp collectionApi.Collection_GetStreamLatestIdWithinRangeServer) error
func (*CollectionService) GetStreamLatestRecordsWithinRange ¶ added in v0.4.2
func (s *CollectionService) GetStreamLatestRecordsWithinRange(req *collectionApi.GetStreamLatestWithinRangeReq, resp collectionApi.Collection_GetStreamLatestRecordsWithinRangeServer) error
func (*CollectionService) ListCollectionRecord ¶
func (s *CollectionService) ListCollectionRecord(ctx context.Context, req *collectionApi.ListCollectionRecordReq) (*collectionApi.ListCollectionRecordResp, error)
Click to show internal directories.
Click to hide internal directories.