askstore

package
v1.28.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2023 License: Apache-2.0, MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AskStoreImpl

type AskStoreImpl struct {
	// contains filtered or unexported fields
}

AskStoreImpl implements AskStore, persisting a retrieval Ask to disk. It also maintains a cache of the current Ask in memory

func NewAskStore

func NewAskStore(ds datastore.Batching, key datastore.Key) (*AskStoreImpl, error)

NewAskStore returns a new instance of AskStoreImpl It will initialize a new default ask and store it if one is not set. Otherwise it loads the current Ask from disk

func (*AskStoreImpl) GetAsk

func (s *AskStoreImpl) GetAsk() *retrievalmarket.Ask

GetAsk returns the current retrieval ask, or nil if one does not exist.

func (*AskStoreImpl) SetAsk

func (s *AskStoreImpl) SetAsk(ask *retrievalmarket.Ask) error

SetAsk stores retrieval provider's ask

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL