aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/http/sctx.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/api/http/sctx.go')
-rw-r--r--swarm/api/http/sctx.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/swarm/api/http/sctx.go b/swarm/api/http/sctx.go
deleted file mode 100644
index b8dafab0b..000000000
--- a/swarm/api/http/sctx.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package http
-
-import (
- "context"
-
- "github.com/ethereum/go-ethereum/swarm/api"
- "github.com/ethereum/go-ethereum/swarm/sctx"
-)
-
-type uriKey struct{}
-
-func GetRUID(ctx context.Context) string {
- v, ok := ctx.Value(sctx.HTTPRequestIDKey{}).(string)
- if ok {
- return v
- }
- return "xxxxxxxx"
-}
-
-func SetRUID(ctx context.Context, ruid string) context.Context {
- return context.WithValue(ctx, sctx.HTTPRequestIDKey{}, ruid)
-}
-
-func GetURI(ctx context.Context) *api.URI {
- v, ok := ctx.Value(uriKey{}).(*api.URI)
- if ok {
- return v
- }
- return nil
-}
-
-func SetURI(ctx context.Context, uri *api.URI) context.Context {
- return context.WithValue(ctx, uriKey{}, uri)
-}