live: various code cleanups (#37165)
This commit is contained in:
@@ -2,7 +2,6 @@ package livecontext
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/url"
|
||||
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
@@ -24,21 +23,6 @@ func GetContextSignedUser(ctx context.Context) (*models.SignedInUser, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
type valuesContextKey struct{}
|
||||
|
||||
func SetContextValues(ctx context.Context, values url.Values) context.Context {
|
||||
ctx = context.WithValue(ctx, valuesContextKey{}, values)
|
||||
return ctx
|
||||
}
|
||||
|
||||
func GetContextValues(ctx context.Context) (url.Values, bool) {
|
||||
if val := ctx.Value(valuesContextKey{}); val != nil {
|
||||
values, ok := val.(url.Values)
|
||||
return values, ok
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
|
||||
type streamIDContextKey struct{}
|
||||
|
||||
func SetContextStreamID(ctx context.Context, streamID string) context.Context {
|
||||
|
||||
Reference in New Issue
Block a user