Documentation
¶
Index ¶
- Constants
- type ChannelCache
- type ChannelChecker
- func (c *ChannelChecker) CustomMetric(name, value string)
- func (c *ChannelChecker) EventLoop()
- func (c *ChannelChecker) GetState(pubKey string, uniqueId string, getApi NewApiCall, ...) (*entities.ChannelBalanceReport, error)
- func (c *ChannelChecker) IsSubscribed(pubKey, uniqueId string) bool
- func (c *ChannelChecker) OverrideLoopInterval(duration time.Duration)
- func (c *ChannelChecker) Subscribe(pubKey string, uniqueId string, getApi NewApiCall, ...) error
- func (c *ChannelChecker) Unsubscribe(pubkey, uniqueId string) error
- type ChannelCheckerMonitoring
- type GlobalSettings
- type InMemoryChannelCache
- func (c *InMemoryChannelCache) DeferredCommit() bool
- func (c *InMemoryChannelCache) DeferredRevert() bool
- func (c *InMemoryChannelCache) DeferredSet(name, old, new string)
- func (c *InMemoryChannelCache) Get(name string) (string, bool)
- func (c *InMemoryChannelCache) Lock()
- func (c *InMemoryChannelCache) Set(name string, value string)
- func (c *InMemoryChannelCache) Unlock()
- type NewApiCall
- type OldNewVal
- type RedisChannelCache
- func (c *RedisChannelCache) DeferredCommit() bool
- func (c *RedisChannelCache) DeferredRevert() bool
- func (c *RedisChannelCache) DeferredSet(name, old, new string)
- func (c *RedisChannelCache) Get(name string) (string, bool)
- func (c *RedisChannelCache) Lock()
- func (c *RedisChannelCache) Set(name string, value string)
- func (c *RedisChannelCache) Unlock()
- type SetOfChanIds
- type Settings
Constants ¶
View Source
const PREFIX = "bolt.boltobserver.channelchecker"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelCache ¶
type ChannelChecker ¶
type ChannelChecker struct {
// contains filtered or unexported fields
}
func NewChannelChecker ¶
func NewChannelChecker(ctx context.Context, cache ChannelCache, keepAlive time.Duration, smooth bool, checkGraph bool, monitoring *ChannelCheckerMonitoring) *ChannelChecker
func NewDefaultChannelChecker ¶
func NewDefaultChannelChecker(ctx context.Context, keepAlive time.Duration, smooth bool, checkGraph bool, monitoring *ChannelCheckerMonitoring) *ChannelChecker
func (*ChannelChecker) CustomMetric ¶
func (c *ChannelChecker) CustomMetric(name, value string)
CustomMetric is a method to send custom metrics via graphite
func (*ChannelChecker) EventLoop ¶
func (c *ChannelChecker) EventLoop()
func (*ChannelChecker) GetState ¶
func (c *ChannelChecker) GetState( pubKey string, uniqueId string, getApi NewApiCall, settings entities.ReportingSettings, optCallback entities.BalanceReportCallback) (*entities.ChannelBalanceReport, error)
Get current state (settings.pollInterval is ignored)
func (*ChannelChecker) IsSubscribed ¶
func (c *ChannelChecker) IsSubscribed(pubKey, uniqueId string) bool
Check if we are subscribed for a certain public key
func (*ChannelChecker) OverrideLoopInterval ¶ added in v0.0.3
func (c *ChannelChecker) OverrideLoopInterval(duration time.Duration)
WARNING: this should not be used except for unit testing
func (*ChannelChecker) Subscribe ¶
func (c *ChannelChecker) Subscribe( pubKey string, uniqueId string, getApi NewApiCall, settings entities.ReportingSettings, callback entities.BalanceReportCallback) error
Subscribe to notifications about channel changes (if already subscribed this will force a callback, use IsSubscribed to check)
func (*ChannelChecker) Unsubscribe ¶
func (c *ChannelChecker) Unsubscribe(pubkey, uniqueId string) error
Unsubscribe from a pubkey
type ChannelCheckerMonitoring ¶
type ChannelCheckerMonitoring struct {
// contains filtered or unexported fields
}
func NewChannelCheckerMonitoring ¶
func NewChannelCheckerMonitoring(env, graphiteHost, graphitePort string) *ChannelCheckerMonitoring
func NewNopChannelCheckerMonitoring ¶
func NewNopChannelCheckerMonitoring() *ChannelCheckerMonitoring
type GlobalSettings ¶
type GlobalSettings struct {
// contains filtered or unexported fields
}
func NewGlobalSettings ¶
func NewGlobalSettings() *GlobalSettings
func (*GlobalSettings) Delete ¶
func (s *GlobalSettings) Delete(key string)
func (*GlobalSettings) Get ¶
func (s *GlobalSettings) Get(key string) Settings
func (*GlobalSettings) GetKeys ¶
func (s *GlobalSettings) GetKeys() []string
func (*GlobalSettings) Set ¶
func (s *GlobalSettings) Set(key string, value Settings)
type InMemoryChannelCache ¶
type InMemoryChannelCache struct {
// contains filtered or unexported fields
}
func NewInMemoryChannelCache ¶
func NewInMemoryChannelCache() *InMemoryChannelCache
func (*InMemoryChannelCache) DeferredCommit ¶
func (c *InMemoryChannelCache) DeferredCommit() bool
func (*InMemoryChannelCache) DeferredRevert ¶
func (c *InMemoryChannelCache) DeferredRevert() bool
func (*InMemoryChannelCache) DeferredSet ¶
func (c *InMemoryChannelCache) DeferredSet(name, old, new string)
func (*InMemoryChannelCache) Lock ¶
func (c *InMemoryChannelCache) Lock()
func (*InMemoryChannelCache) Set ¶
func (c *InMemoryChannelCache) Set(name string, value string)
func (*InMemoryChannelCache) Unlock ¶
func (c *InMemoryChannelCache) Unlock()
type NewApiCall ¶
type NewApiCall func() api.LightingApiCalls
type RedisChannelCache ¶
type RedisChannelCache struct {
// contains filtered or unexported fields
}
func NewRedisChannelCache ¶
func NewRedisChannelCache() *RedisChannelCache
func (*RedisChannelCache) DeferredCommit ¶
func (c *RedisChannelCache) DeferredCommit() bool
func (*RedisChannelCache) DeferredRevert ¶
func (c *RedisChannelCache) DeferredRevert() bool
func (*RedisChannelCache) DeferredSet ¶
func (c *RedisChannelCache) DeferredSet(name, old, new string)
func (*RedisChannelCache) Lock ¶
func (c *RedisChannelCache) Lock()
func (*RedisChannelCache) Set ¶
func (c *RedisChannelCache) Set(name string, value string)
func (*RedisChannelCache) Unlock ¶
func (c *RedisChannelCache) Unlock()
type SetOfChanIds ¶
type SetOfChanIds map[uint64]struct{}
Click to show internal directories.
Click to hide internal directories.