powergate: github.com/textileio/powergate/index/ask Index | Files | Directories

package ask

import "github.com/textileio/powergate/index/ask"

Index

Package Files

types.go

type Index Uses

type Index struct {
    LastUpdated        time.Time
    StorageMedianPrice uint64
    Storage            map[string]StorageAsk
}

Index contains Ask information from markets.

type Module Uses

type Module interface {
    Get() Index
    Query(q Query) ([]StorageAsk, error)
    Listen() <-chan struct{}
    Unregister(c chan struct{})
}

Module provides information about storage asks.

type Query Uses

type Query struct {
    MaxPrice  uint64
    PieceSize uint64
    Limit     int
    Offset    int
}

Query specifies filtering and paging data to retrieve active Asks.

type StorageAsk Uses

type StorageAsk struct {
    Miner        string
    Price        uint64
    MinPieceSize uint64
    Timestamp    int64
    Expiry       int64
}

StorageAsk has information about an active ask from a storage miner.

Directories

PathSynopsis
internal/metrics
internal/store
rpc
runner

Package ask imports 1 packages (graph) and is imported by 14 packages. Updated 2020-09-21. Refresh now. Tools for package owners.