Documentation ¶
Index ¶
- Constants
- Variables
- func New(addrs []swarm.Address, shardCnt int, g storage.Getter, p storage.Putter, ...) storage.Getter
- func SetConfigInContext(ctx context.Context, s *Strategy, fallbackmode *bool, fetchTimeout *string, ...) (context.Context, error)
- func SetFetchTimeout(ctx context.Context, timeout time.Duration) context.Context
- func SetLogger(ctx context.Context, l log.Logger) context.Context
- func SetStrategy(ctx context.Context, s Strategy) context.Context
- func SetStrict(ctx context.Context, strict bool) context.Context
- type Config
- type Strategy
Constants ¶
View Source
const ( DefaultStrategy = DATA // default prefetching strategy DefaultStrict = false // default fallback modes DefaultFetchTimeout = retrieval.RetrieveChunkTimeout // timeout for each chunk retrieval )
Variables ¶
View Source
var DefaultConfig = Config{ Strategy: DefaultStrategy, Strict: DefaultStrict, FetchTimeout: DefaultFetchTimeout, Logger: log.Noop, }
DefaultConfig is the default configuration for the getter
Functions ¶
func New ¶
func New(addrs []swarm.Address, shardCnt int, g storage.Getter, p storage.Putter, remove func(error), conf Config) storage.Getter
New returns a decoder object used to retrieve children of an intermediate chunk
func SetConfigInContext ¶
func SetConfigInContext(ctx context.Context, s *Strategy, fallbackmode *bool, fetchTimeout *string, logger log.Logger) (context.Context, error)
SetConfigInContext sets the config params in the context
func SetFetchTimeout ¶
SetFetchTimeout sets the timeout for each fetch
func SetStrategy ¶
SetStrategy sets the strategy for the retrieval
Types ¶
Click to show internal directories.
Click to hide internal directories.