Documentation
¶
Index ¶
- func NewLoggingService(logger *zap.Logger, underlying influxdb.AnnotationService) *loggingService
- func NewMetricCollectingService(reg prometheus.Registerer, underlying influxdb.AnnotationService, ...) *metricsService
- type Service
- func (s *Service) CreateAnnotations(ctx context.Context, orgID platform.ID, creates []influxdb.AnnotationCreate) ([]influxdb.AnnotationEvent, error)
- func (s *Service) CreateOrUpdateStream(ctx context.Context, orgID platform.ID, stream influxdb.Stream) (*influxdb.ReadStream, error)
- func (s *Service) DeleteAnnotation(ctx context.Context, id platform.ID) error
- func (s *Service) DeleteAnnotations(ctx context.Context, orgID platform.ID, delete influxdb.AnnotationDeleteFilter) error
- func (s *Service) DeleteStreamByID(ctx context.Context, id platform.ID) error
- func (s *Service) DeleteStreams(ctx context.Context, orgID platform.ID, delete influxdb.BasicStream) error
- func (s *Service) GetAnnotation(ctx context.Context, id platform.ID) (*influxdb.StoredAnnotation, error)
- func (s *Service) GetStream(ctx context.Context, id platform.ID) (*influxdb.StoredStream, error)
- func (s *Service) ListAnnotations(ctx context.Context, orgID platform.ID, filter influxdb.AnnotationListFilter) ([]influxdb.StoredAnnotation, error)
- func (s *Service) ListStreams(ctx context.Context, orgID platform.ID, filter influxdb.StreamListFilter) ([]influxdb.StoredStream, error)
- func (s *Service) UpdateAnnotation(ctx context.Context, id platform.ID, update influxdb.AnnotationCreate) (*influxdb.AnnotationEvent, error)
- func (s *Service) UpdateStream(ctx context.Context, id platform.ID, stream influxdb.Stream) (*influxdb.ReadStream, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoggingService ¶
func NewMetricCollectingService ¶
func NewMetricCollectingService(reg prometheus.Registerer, underlying influxdb.AnnotationService, opts ...metric.ClientOptFn) *metricsService
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CreateAnnotations ¶
func (s *Service) CreateAnnotations(ctx context.Context, orgID platform.ID, creates []influxdb.AnnotationCreate) ([]influxdb.AnnotationEvent, error)
CreateAnnotations creates annotations in the database for the provided orgID as defined by the provided list Streams corresponding to the StreamTag property of each annotation are created if they don't already exist as part of a transaction
func (*Service) CreateOrUpdateStream ¶
func (s *Service) CreateOrUpdateStream(ctx context.Context, orgID platform.ID, stream influxdb.Stream) (*influxdb.ReadStream, error)
CreateOrUpdateStream creates a new stream, or updates the description of an existing stream. Doesn't support updating a stream desctription to "". For that use the UpdateStream method.
func (*Service) DeleteAnnotation ¶
DeleteAnnoation deletes a single annotation by ID
func (*Service) DeleteAnnotations ¶
func (s *Service) DeleteAnnotations(ctx context.Context, orgID platform.ID, delete influxdb.AnnotationDeleteFilter) error
DeleteAnnotations deletes multiple annotations according to the provided filter
func (*Service) DeleteStreamByID ¶
DeleteStreamByID deletes a single stream by ID. Returns an error if the ID could not be found.
func (*Service) DeleteStreams ¶
func (s *Service) DeleteStreams(ctx context.Context, orgID platform.ID, delete influxdb.BasicStream) error
DeleteStreams is used for deleting multiple streams by name
func (*Service) GetAnnotation ¶
func (s *Service) GetAnnotation(ctx context.Context, id platform.ID) (*influxdb.StoredAnnotation, error)
GetAnnotation gets a single annotation by ID
func (*Service) ListAnnotations ¶
func (s *Service) ListAnnotations(ctx context.Context, orgID platform.ID, filter influxdb.AnnotationListFilter) ([]influxdb.StoredAnnotation, error)
ListAnnotations returns a list of annotations from the database matching the filter For time range matching, sqlite is able to compare times with millisecond accuracy
func (*Service) ListStreams ¶
func (s *Service) ListStreams(ctx context.Context, orgID platform.ID, filter influxdb.StreamListFilter) ([]influxdb.StoredStream, error)
ListStreams returns a list of streams matching the filter for the provided orgID.
func (*Service) UpdateAnnotation ¶
func (s *Service) UpdateAnnotation(ctx context.Context, id platform.ID, update influxdb.AnnotationCreate) (*influxdb.AnnotationEvent, error)
UpdateAnnotation updates a single annotation by ID In a similar fashion as CreateAnnotations, if the StreamTag in the update request does not exist, a stream will be created as part of a transaction with the update operation