Documentation ¶
Overview ¶
Package supply provides a cache of signets for pre-generating signets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SignetSupply ¶
type SignetSupply struct {
// contains filtered or unexported fields
}
SignetSupply is cache of signets for pre-generating signets.
func NewSignetSupply ¶
func NewSignetSupply(cacheSize int) *SignetSupply
NewSignetSupply returns a new empty *SignetSupply. `cacheSize` specifies how many Signets to cache at maximum (min 1).
func (*SignetSupply) Fill ¶
func (supply *SignetSupply) Fill(amount int) (full bool, lastErr error)
Fill fills all caches with new Signets in the specified amount (up to the cache size), and returns whether the caches are now full. This function is meant to be called periodically (when there is time) with small values for `amount` until the supply is full.
func (*SignetSupply) GetSignet ¶
func (supply *SignetSupply) GetSignet(scheme string) (*jess.Signet, error)
GetSignet returns a new signet from the supply.
func (*SignetSupply) Status ¶
func (supply *SignetSupply) Status() *Status
Status returns current status information.
Click to show internal directories.
Click to hide internal directories.