Documentation ¶
Index ¶
- Constants
- Variables
- func CacheKey(networkID uint32, parts ...string) string
- func CommonAddressHexRepair(address *common.Address) string
- func ErrIsDuplicateEntryError(err error) bool
- func ErrIsLockError(err error) bool
- func ForceParseTimeParam(dsn string) (string, error)
- func KeyFromParts(parts ...string) string
- func NewAVMCodec(networkID uint32) (codec.Manager, error)
- type Cache
- type CacheJob
- type Cacheable
- type CacheableFn
- type Cacher
- type Collector
- func NewCollectors(collectors ...Collector) Collector
- func NewCounterIncCollect(key string) Collector
- func NewCounterObserveMillisCollect(key string) Collector
- func NewHistogramCollect(key string) Collector
- func NewSuccessFailCounterAdd(keySuccess string, keyFail string, count float64) Collector
- func NewSuccessFailCounterInc(keySuccess string, keyFail string) Collector
- type Conn
- func (c *Conn) Close(context.Context) error
- func (c *Conn) NewSession(name string, timeout time.Duration) (*dbr.Session, error)
- func (c *Conn) NewSessionForEventReceiver(er dbr.EventReceiver) *dbr.Session
- func (c *Conn) SetConnMaxIdleTime(d time.Duration)
- func (c *Conn) SetConnMaxLifetime(d time.Duration)
- func (c *Conn) SetMaxIdleConns(n int)
- func (c *Conn) SetMaxOpenConns(n int)
- type Connections
- type CounterID
- type DelayCache
- type EventRcvr
- type ExecIface
- type GenesisContainer
- type IndexedList
- type LCache
- type ListenCloser
- type Metrics
- func (m *Metrics) CounterAdd(name string, v float64) error
- func (m *Metrics) CounterInc(name string) error
- func (m *Metrics) CounterInit(name string, help string)
- func (m *Metrics) HistogramInit(name string, help string, buckets []float64)
- func (m *Metrics) HistogramObserve(name string, v float64) error
- func (m *Metrics) Init()
- type RetrySleeper
- type Running
- type Worker
Constants ¶
View Source
const ( DriverMysql = "mysql" DriverNone = "" )
View Source
const ( DeadlockDBErrorMessage = "Deadlock found when trying to get lock; try restarting transaction" TimeoutDBErrorMessage = "Lock wait timeout exceeded; try restarting transaction" )
View Source
const ( WorkerQueueSize = 10 WorkerThreadCount = 1 )
View Source
const (
CacheSeparator = "|"
)
View Source
const (
KeyValueBootstrap = "bootstrap"
)
View Source
const MaxCodecSize = 100_000_000
Variables ¶
View Source
var (
ErrIncorrectGenesisChainTxType = errors.New("incorrect genesis chain tx type")
)
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func CommonAddressHexRepair ¶ added in v1.2.3
func ErrIsDuplicateEntryError ¶ added in v1.6.2
func ErrIsLockError ¶ added in v1.6.2
func ForceParseTimeParam ¶ added in v1.6.2
func KeyFromParts ¶ added in v1.6.2
Types ¶
type Cache ¶ added in v1.6.2
type Cacheable ¶ added in v1.6.2
type Cacheable struct { Key []string CacheableFn CacheableFn TTL time.Duration }
Cacheable is a keyed CacheableFn
type CacheableFn ¶ added in v1.6.2
CacheableFn is a function whose output can safely be cached
type Collector ¶ added in v1.6.2
type Collector interface { Error() Collect() error }
func NewCollectors ¶ added in v1.6.2
func NewCounterIncCollect ¶ added in v1.6.2
func NewCounterObserveMillisCollect ¶ added in v1.6.2
func NewHistogramCollect ¶ added in v1.6.2
func NewSuccessFailCounterAdd ¶ added in v1.6.2
func NewSuccessFailCounterInc ¶ added in v1.6.2
type Conn ¶ added in v1.6.2
type Conn struct {
// contains filtered or unexported fields
}
Conn is a wrapper around a dbr connection and a health stream
func (*Conn) NewSession ¶ added in v1.6.2
func (*Conn) NewSessionForEventReceiver ¶ added in v1.6.2
func (c *Conn) NewSessionForEventReceiver(er dbr.EventReceiver) *dbr.Session
func (*Conn) SetConnMaxIdleTime ¶ added in v1.6.2
func (*Conn) SetConnMaxLifetime ¶ added in v1.6.2
func (*Conn) SetMaxIdleConns ¶ added in v1.6.2
func (*Conn) SetMaxOpenConns ¶ added in v1.6.2
type Connections ¶ added in v1.6.2
type Connections struct { Eventer *EventRcvr // contains filtered or unexported fields }
func NewDBFromConfig ¶ added in v1.6.2
func NewDBFromConfig(conf cfg.Services, ro bool) (*Connections, error)
func (Connections) Close ¶ added in v1.6.2
func (c Connections) Close() error
func (Connections) DB ¶ added in v1.6.2
func (c Connections) DB() *Conn
func (Connections) Stream ¶ added in v1.6.2
func (c Connections) Stream() *EventRcvr
type CounterID ¶
type CounterID struct {
// contains filtered or unexported fields
}
func NewCounterID ¶
func NewCounterID() *CounterID
type DelayCache ¶ added in v1.6.2
func NewDelayCache ¶ added in v1.6.2
func NewDelayCache(cache Cacher) *DelayCache
func (*DelayCache) Processor ¶ added in v1.6.2
func (c *DelayCache) Processor(_ int, job interface{})
type EventRcvr ¶ added in v1.6.2
type EventRcvr struct {
// contains filtered or unexported fields
}
type GenesisContainer ¶ added in v1.6.2
type GenesisContainer struct { NetworkID uint32 XChainGenesisTx *platformvm.Tx XChainID ids.ID AvaxAssetID ids.ID GenesisBytes []byte }
func NewGenesisContainer ¶ added in v1.6.2
func NewGenesisContainer(networkID uint32) (*GenesisContainer, error)
type IndexedList ¶ added in v1.6.2
type IndexedList interface { PushFront(key, val interface{}) Exists(key interface{}) bool }
func NewIndexedList ¶ added in v1.6.2
func NewIndexedList(maxSize int) IndexedList
type ListenCloser ¶ added in v1.1.3
ListenCloser listens for messages until it's asked to close
type Metrics ¶ added in v1.6.2
type Metrics struct {
// contains filtered or unexported fields
}
var (
Prometheus Metrics
)
func (*Metrics) CounterAdd ¶ added in v1.6.2
func (*Metrics) CounterInc ¶ added in v1.6.2
func (*Metrics) CounterInit ¶ added in v1.6.2
func (*Metrics) HistogramInit ¶ added in v1.6.2
func (*Metrics) HistogramObserve ¶ added in v1.6.2
type RetrySleeper ¶ added in v1.3.2
type RetrySleeper struct {
// contains filtered or unexported fields
}
func NewRetrySleeper ¶ added in v1.3.2
func (*RetrySleeper) Inc ¶ added in v1.3.2
func (r *RetrySleeper) Inc()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.