lotus/lib/valctx/context.go

29 lines
394 B
Go
Raw Normal View History

2019-09-17 14:23:08 +00:00
package valctx
import (
"context"
"time"
)
type Context struct {
Parent context.Context
}
func (c *Context) Deadline() (deadline time.Time, ok bool) {
return
}
func (c *Context) Done() <-chan struct{} {
return nil
}
func (c *Context) Err() error {
return nil
}
func (c *Context) Value(key interface{}) interface{} {
return c.Parent.Value(key)
}
var _ context.Context = &Context{}