Documentation ¶
Index ¶
- type BigCache
- func (c *BigCache) GetLiquidityRules(nodePubkey string) (map[uint64][]nodeguard.LiquidityRule, error)
- func (c *BigCache) MarshalLiquidityRules(rules []nodeguard.LiquidityRule) ([]byte, error)
- func (c *BigCache) SetLiquidityRules(nodePubkey string, rules []nodeguard.LiquidityRule) error
- func (c *BigCache) UnmarshalLiquidityRules(rulesBytes []byte) ([]nodeguard.LiquidityRule, error)
- type Cache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigCache ¶
type BigCache struct {
// contains filtered or unexported fields
}
func (*BigCache) GetLiquidityRules ¶
func (*BigCache) MarshalLiquidityRules ¶
func (c *BigCache) MarshalLiquidityRules(rules []nodeguard.LiquidityRule) ([]byte, error)
Marshals a slice of nodeguard.LiquidityRules to bytes
func (*BigCache) SetLiquidityRules ¶
func (c *BigCache) SetLiquidityRules(nodePubkey string, rules []nodeguard.LiquidityRule) error
Implement BigCache methods according to the Cache Interface
func (*BigCache) UnmarshalLiquidityRules ¶
func (c *BigCache) UnmarshalLiquidityRules(rulesBytes []byte) ([]nodeguard.LiquidityRule, error)
Unmarshals a slice of nodeguard.LiquidityRules from bytes
type Cache ¶
type Cache interface { //Set a slice of LiquidityRules from nodeguard grpc response SetLiquidityRules(string, []nodeguard.LiquidityRule) error //Get a slice of nodeguard.LiquidityRules from cache returns map where the key is the channel id GetLiquidityRules(string) (map[uint64][]nodeguard.LiquidityRule, error) }
Click to show internal directories.
Click to hide internal directories.