grafana/pkg/services/anonymous/service.go
Jo 1a281ac49d
Experiment: tag UI devices for anon stats (#73748)
* experiment: attempt to tag only UI devices

* lint frontend

* use await

* use shorthand check

* do not assume build info exists

* do not assume build info exists

* Apply suggestions from code review

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2023-08-28 10:49:23 +02:00

20 lines
363 B
Go

package anonymous
import (
"context"
"net/http"
)
type DeviceKind string
const (
AnonDevice DeviceKind = "anon-session"
AuthedDevice DeviceKind = "authed-session"
AnonDeviceUI DeviceKind = "ui-anon-session"
AuthedDeviceUI DeviceKind = "ui-authed-session"
)
type Service interface {
TagDevice(context.Context, *http.Request, DeviceKind) error
}