disk

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2017 License: MIT Imports: 4 Imported by: 3

Documentation

Overview

Package disk implements an ipfs-cluster informer which determines the current RepoSize of the ipfs daemon datastore and returns it as an api.Metric.

Index

Constants

This section is empty.

Variables

View Source
var MetricName = "disk"

MetricName specifies the name of our metric

View Source
var MetricTTL = 30

MetricTTL specifies how long our reported metric is valid in seconds.

Functions

This section is empty.

Types

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

func NewInformer() *Informer

NewInformer returns an initialized Informer.

func (*Informer) GetMetric

func (disk *Informer) GetMetric() api.Metric

GetMetric uses the IPFSConnector the current repository size and returns it in a metric.

func (*Informer) Name

func (disk *Informer) Name() string

Name returns the name of this informer.

func (*Informer) SetClient

func (disk *Informer) SetClient(c *rpc.Client)

SetClient provides us with an rpc.Client which allows contacting other components in the cluster.

func (*Informer) Shutdown

func (disk *Informer) Shutdown() error

Shutdown is called on cluster shutdown. We just invalidate any metrics from this point.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL