Documentation ¶
Index ¶
- Variables
- type BasicMetrics
- type BeaconNode
- func (b *BeaconNode) Name() string
- func (b *BeaconNode) OnFrame(callback func(ctx context.Context, frame *types.Frame))
- func (b *BeaconNode) Ready(ctx context.Context) bool
- func (b *BeaconNode) Start(ctx context.Context) error
- func (b *BeaconNode) Stop(ctx context.Context) error
- func (b *BeaconNode) Type() string
- type BeaconNodeConfig
- type Config
- type Data
- type Options
- type Source
- type XatuHTTP
- type XatuHTTPConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingName = errors.New("missing name") ErrFrameNotFound = errors.New("frame not found") )
View Source
var BeaconNodeType = "beacon_node"
View Source
var XatuHTTPType = "xatu_http"
Functions ¶
This section is empty.
Types ¶
type BasicMetrics ¶
type BasicMetrics struct {
// contains filtered or unexported fields
}
func NewBasicMetrics ¶
func NewBasicMetrics(namespace, sourceType, sourceName string, enabled bool) *BasicMetrics
func (*BasicMetrics) ObserveItemFetched ¶
func (m *BasicMetrics) ObserveItemFetched(itemType string)
type BeaconNode ¶
type BeaconNode struct {
// contains filtered or unexported fields
}
func NewBeaconNode ¶
func NewBeaconNode(namespace string, log logrus.FieldLogger, config *BeaconNodeConfig, name string, metrics *BasicMetrics) (*BeaconNode, error)
func (*BeaconNode) Name ¶
func (b *BeaconNode) Name() string
func (*BeaconNode) OnFrame ¶
func (b *BeaconNode) OnFrame(callback func(ctx context.Context, frame *types.Frame))
func (*BeaconNode) Type ¶
func (b *BeaconNode) Type() string
type BeaconNodeConfig ¶
type BeaconNodeConfig struct { Address string `yaml:"address"` PollingInterval string `yaml:"polling_interval"` Store store.Config `yaml:"store"` Labels []string `yaml:"labels"` }
func (*BeaconNodeConfig) Validate ¶
func (b *BeaconNodeConfig) Validate() error
type Config ¶
type Config struct { Name string `yaml:"name"` Type string `yaml:"type"` Config yaml.RawMessage `yaml:"config"` }
type Options ¶
func DefaultOptions ¶
func DefaultOptions() *Options
func (*Options) SetMetricsEnabled ¶
func (*Options) WithAllowedEthereumNetworks ¶ added in v0.0.12
func (*Options) WithMetricsDisabled ¶
func (*Options) WithMetricsEnabled ¶
type Source ¶
type Source interface { // Name returns the user-defined name of the source. Name() string // Type returns the type of the source. Type() string // Start starts the source. Start(ctx context.Context) error // Stop stops the source. Stop(ctx context.Context) error // OnFrame is called when a new frame has been received. OnFrame(func(ctx context.Context, frame *types.Frame)) }
type XatuHTTP ¶ added in v0.0.12
type XatuHTTP struct {
// contains filtered or unexported fields
}
func NewXatuHTTP ¶ added in v0.0.12
func NewXatuHTTP(namespace, name string, log logrus.FieldLogger, config *XatuHTTPConfig, metrics *BasicMetrics, opts *Options) (*XatuHTTP, error)
type XatuHTTPConfig ¶ added in v0.0.12
Click to show internal directories.
Click to hide internal directories.