Documentation ¶
Overview ¶
Package numpin implements an ipfs-cluster informer which determines how many items this peer is pinning and returns it as api.Metric
Index ¶
Constants ¶
View Source
const (
DefaultMetricTTL = 10 * time.Second
)
These are the default values for a Config.
Variables ¶
View Source
var MetricName = "numpin"
MetricName specifies the name of our metric
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config allows to initialize an Informer.
func (*Config) ApplyEnvVars ¶
ApplyEnvVars fills in any Config fields found as environment variables.
func (*Config) ToDisplayJSON ¶
ToDisplayJSON returns JSON config as a string.
type Informer ¶
type Informer struct {
// contains filtered or unexported fields
}
Informer is a simple object to implement the ipfscluster.Informer and Component interfaces
func NewInformer ¶
NewInformer returns an initialized Informer.
func (*Informer) GetMetric ¶
GetMetric contacts the IPFSConnector component and requests the `pin ls` command. We return the number of pins in IPFS.
Click to show internal directories.
Click to hide internal directories.