refactor: add context
This commit is contained in:
parent
b231f9d769
commit
c452b0c271
|
@ -29,6 +29,7 @@ type S5File struct {
|
||||||
cid *encoding.CID
|
cid *encoding.CID
|
||||||
read bool
|
read bool
|
||||||
tus *s5.TusHandler
|
tus *s5.TusHandler
|
||||||
|
ctx context.Context
|
||||||
}
|
}
|
||||||
|
|
||||||
type FileParams struct {
|
type FileParams struct {
|
||||||
|
@ -46,6 +47,7 @@ func NewFile(params FileParams) *S5File {
|
||||||
hash: params.Hash,
|
hash: params.Hash,
|
||||||
protocol: params.Protocol,
|
protocol: params.Protocol,
|
||||||
tus: params.Tus,
|
tus: params.Tus,
|
||||||
|
ctx: context.Background(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue